At a glance
The brief is enough
- Relevance
- Practical value
- Radar
- Time horizon
- Now
- Warnings
- None
Ricardo Ferrer built an Alexa skill and learned that better models don't fix context issues. Patterns like reranking, summarization, and semantic caching are the real solution—but they come with calibration costs and architectural complexity.
Context engineering is the hidden architecture behind usable AI; better models won't fix bad context design.
Watch if you're building a conversational AI assistant and want to see a full set of context engineering patterns in action.
Summary
The proposal. Ricardo Ferrer, a software engineer at Redis, built an Alexa skill called MyJarvis to test the company's open-source Agent Memory Server. The goal was to create a conversational assistant that could remember context, set reminders, and answer household questions. What started as a simple LLM call quickly revealed that the hard problems were not about model capability but about how context is managed.
The first lessons. Upgrading from GPT-3.5 to GPT-4 increased cost but did nothing to fix the bad experiences: context poisoning, distraction, confusion, rot, and clash. Ferrer realized that prompting alone was insufficient. He needed intentional techniques like injecting date/time tools, adding short-term session memory, and implementing long-term memory via vector search. Each fix solved one problem but introduced new complexities, such as infinite loops in tool calls or memory TTL expirations.
The architectural layer. Ferrer gradually built a pipeline of context engineering patterns: query transformation for pronoun resolution, few-shot design to teach the model behavior, reranking using Cohere to prioritize relevant memories, and a content aggregator to filter top results. He also added knowledge bases separate from user memories, using an LLM to route between them. This pipeline turned a single LLM call into a multi-step orchestration, all running within Alexa's 8-second timeout on AWS Lambda.
The cost trap. A naive implementation that appended every interaction to context led to exponential token growth. Ferrer's family of three generated about 30 queries per day, but the memory structure ballooned costs. He switched to token window memory, which capped tokens at the model's limit but risked losing relevant old context. He then built a summarization-based chat memory that used another LLM call to condense important facts, keeping cost flat while preserving signal.
Semantic caching. Ferrer reduced redundant LLM calls by 75% using semantic caching, which checks whether a new query is semantically similar to a previous one. This required careful calibration—too tight a similarity threshold and valid rephrasings miss the cache; too loose and wrong answers are returned. He implemented a cache-aside pattern, querying the cache first and falling back to the LLM only on miss. This technique became essential for cost control and latency.
The bottom line. Ferrer argues that context engineering should be part of the architecture from the start, not added reactively. The Alexa skill worked, but only after systematically applying patterns like few-shot design, reranking, summarization, and caching. The main lesson: upgrading the model is rarely the fix. Engineering leaders should budget for context engineering patterns—they are what make AI applications actually usable in production.
My take
I've seen teams pour budget into model upgrades while ignoring context design. This talk validates what I've observed: the hard part isn't the LLM, it's managing what goes in and out. The reranking and caching patterns are practical, but the calibration effort is real, every model change shifts thresholds. I'd add that few-shot examples must be versioned alongside the model. The Alexa lambda constraints are a useful reminder that AI patterns need to fit deployment limits. For enterprise teams, I'd recommend starting with summarization before caching: losing relevant old context is worse than a slightly slower response. Overall, this is a solid operational playbook.
What to do with this
- Audit your current AI app for context poisoning and growing token costs; measure per-interaction token usage.
- Implement token-window or summarization-based memory before scaling to more users; test with your model's token limits.
- Run a small experiment with semantic caching using a vector similarity threshold; measure cache hit rate and answer quality.
Watch the video
This video is blocked due to your privacy settings. To watch this video, please accept YouTube marketing cookies.
Related breakdowns
Computer-use agents beat benchmarks but fail the reliability test
Computer-use agents are hitting human-level benchmark scores, but fail the repeatability test. Here is why reliability, not capability, is the real adoption…
AI Futures Without Lock-In: Decouple Before You Consolidate
Remy Guercio makes a case for ROI maxing over token maxing: decouple your AI stack to control costs and avoid vendor lock-in. Tailscale's Aperture demo shows…
NASA's 2030 CFD goal is within reach, but vendor proof isn't validation
12,000 drone CFD simulations in 39 hours, no geometry failures. But this is a vendor proof of concept, and mesh-free accuracy is unproven.
Get TL;DW
Too Long; Didn't Watch.
A concise breakdowns of the AI and devtools videos that actually matter for engineering leaders.
Free. Weekly. No hype.
Video and thumbnails remain the property of their respective creators. tldw.news provides editorial analysis, commentary, and discovery links to original content.