AI
Building Production AI: Why Upgrading Models Isn't Enough—Context Engineering Is
A Redis engineer's hard-won lessons from building a voice assistant reveal that AI applications need smarter memory management and time awareness, not just bigger models.
InfoQ
From Simple Prompting to Practical Problem-Solving#
Most AI developers' first instinct when an LLM application underperforms is to upgrade to a newer or larger model. Ricardo Ferreira, a developer at Redis, learned this approach doesn't work the hard way. While building an intelligent voice skill called My Jarvis on top of Amazon's Alexa, he discovered that simply switching to a more capable language model and expanding the context window did nothing to improve the user experience. The real problem lay not in raw model power, but in how information flows into and through the system.
Ferreira's work centered on Redis Agent Memory Server (AMS), an open-source project designed to give AI agents human-like memory capabilities. When he set out to stress-test it by adding LLM smarts to Alexa—which operates under a rigid 8-second timeout constraint—he bumped into a series of interconnected challenges that revealed a gap between what LLMs excel at and what production applications need.
The Hidden Problems: Context Poisoning and Decay#
As Ferreira built out more features, he encountered a spectrum of issues that lacked obvious solutions. Context poisoning occurred when irrelevant or confusing data corrupted the model's reasoning. Context distraction emerged when the system drowned in too much information, burying the signal. Then there was the fundamental problem of context rot—the degradation that happens as stored knowledge accumulates and becomes stale or contradictory. Finally, context clash created logical tangles when conflicting versions of the truth, timing information, and data mutations collided.
These weren't model failures; they were architectural failures. The realization crystallized a concept that was beginning to circulate in AI engineering circles: context engineering—the discipline of deliberately designing how information gets fed to and maintained within AI systems, rather than relying on prompts and model capacity alone.
Solving Time and Statefulness First#
Two foundational problems emerged immediately:
-
LLMs have no sense of time. They can't reliably know whether today is 2024 or 2021, and they fumble relative dates like "next Wednesday" or "in two hours." Ferreira's first fix was to create a tool that injected current date and time information into the agent's context, giving the system an external reference point for understanding temporal relationships.

