hebel. today · 27 November 202654 / 79
Agentic Engineering · Agent Evals & Reliability
Engineers clash over whether to expand memory or prune context
Expanding the search space. Teams often respond to poor agent memory performance by increasing the number of retrieved items, such as raising retrieval from top-5 to top-50. Proponents of this strategy assume that increasing…
From 3 newsletters · 1 min read · one thing to try
Expanding the search space. Teams often respond to poor agent memory performance by increasing the number of retrieved items, such as raising retrieval from top-5 to top-50 (Hao Hoang from AI Interview Prep). Proponents of this strategy assume that increasing the volume of retrieved data improves the likelihood of capturing the correct fact, thereby boosting recall for agents handling complex queries.
Pruning the context window. Critics argue that this approach introduces excessive distractors, as seen when models struggle to use the correct memory among 49 competing items. These engineers prioritize context quality over retrieval volume, noting that models often ignore relevant data at middle positions or fail to reconcile stale facts when too many near-duplicates are present.
The path forward. The conflict centers on whether to invest in smarter embedding models or to implement reranking and cleanup mechanisms that filter retrieved data before it reaches the model. While some teams focus on retrieval depth, others adopt methods like cross-encoder reranking to ensure only the most relevant five items are passed to the agent, effectively shifting the bottleneck from search to reader utilization.
- Uber exhausted its 2026 AI budget in four months after agentic workflows consumed excessive tokens by re-sending identical system prompts at every step (Daily Dose of Data Science).
- Clay maintains agent reliability at scale by using LangSmith to monitor tool calls and implementing throttling to pause execution during inference spikes (Latent Space).
Try today · 45 min
Perform a retrieval-accuracy audit to identify your agent's context bottleneck.
Plot your agent's answer accuracy against the number of retrieved memories (k).
You need
- Last 50 agent execution traces
- Retrieval success logs
- Ground truth answers for test queries
Steps
- Measure retrieval success to confirm the correct memory reached the context.
- Measure answer accuracy for those specific successful retrievals.
- Identify the k-value where accuracy plateaus or drops.
- Replace a top-k dump with a reranking step using a cross-encoder.
- Verify if accuracy improves with fewer, higher-quality items.