Why More Context Makes Your Agent Dumber and What to Do About It — Nupur Sharma, Qodo

Nupur Sharma from Kodo explains that simply increasing an AI agent’s context window often leads to diminished focus and suboptimal results due to a “U-curve” attention pattern, advocating instead for strategic context optimization through methods like hierarchical summarization, knowledge graphs, and multi-agent architectures. She also highlights the importance of balancing exploratory and deterministic tasks, using specialized agents coordinated by a “judge agent,” and tailoring agents with organizational data and feedback to enhance reliability and relevance in AI workflows.

Nupur Sharma from Kodo shares insights from her experience transitioning from deterministic DevSecOps pipelines to working with AI agents, which operate in non-deterministic environments. She explains the evolution of AI agents from static prompts with limited context windows to more complex multi-agent systems. Initially, increasing the context window was thought to improve results, but in practice, agents tend to focus mainly on the beginning and end of the input context, often ignoring the middle, which can lead to suboptimal outcomes. This phenomenon, described as a “U-curve” of attention, highlights the challenge of effectively utilizing large amounts of context in AI workflows.

To address these challenges, Nupur emphasizes the importance of strategic context optimization rather than simply dumping all available data into models. She discusses various approaches such as context engines that rank and filter relevant information, hierarchical summarization to condense large codebases, knowledge graphs to map logical dependencies, and iterative retrieval methods that create indexes for efficient information access. Each method has trade-offs in terms of upfront effort, computational cost, and scalability, but they help agents focus on the most pertinent information for their tasks.

Nupur also highlights the “orchestration paradox,” where highly capable LLMs can get stuck in loops of researching how to solve a problem rather than solving it. To mitigate this, Kodo employs an 80/20 hybrid approach: agents spend 80% of their time exploring and researching solutions using advanced models, while the remaining 20% is dedicated to deterministic tasks like validation and summarization using simpler models. This balance helps prevent infinite loops and ensures that final outputs are reliable and relevant.

Another key insight is the limitation of single-agent systems overwhelmed by multiple tasks and large contexts. Kodo uses a multi-agent architecture where specialized agents handle distinct tasks such as security analysis, code review, and issue tracking. A “judge agent” then consolidates and evaluates these outputs to ensure coherence and relevance, preventing conflicting or nonsensical results. This modular approach mirrors human workflows where experts focus on their specialties, and a coordinator synthesizes their input.

Finally, Nupur discusses the importance of calibration and contextual tailoring for agents. By incorporating organizational-specific data such as PR history, compliance guidelines, and developer feedback, agents can better align with the unique priorities and standards of a team. Feedback loops that track whether developers accept or reject agent recommendations help refine the system over time. While challenges remain in balancing diverse inputs and maintaining context relevance, these strategies collectively improve the effectiveness and reliability of AI-driven agentic workflows.