The 'Satisfaction of Search' Problem in AI
AI agents often act like new employees who reset their knowledge with every task. They suffer from 'satisfaction of search'—a concept borrowed from radiology where an agent finds one plausible indicator, stops looking, and misses the broader context required for a correct diagnosis. While large context windows (e.g., 1M tokens) are helpful, they do not solve the problem of understanding. Simply dumping an entire codebase into a context window causes agents to become distracted, leading to wasted tokens and inefficient reasoning.
The Role of a Context Engine
To move from simple autocomplete to functional 'software factories,' agents need more than just raw code access. They require a context engine that bridges the gap between the code and the 'iceberg' of hidden information: team conventions, architectural rationale, past decisions, and Slack discussions.
By providing this structured context, agents can:
- Show their work: Linking answers to specific documentation or past PRs builds trust and allows for human verification.
- Improve efficiency: Using a context engine significantly reduces the time and cost of tasks. Without it, agents must 'discover' information, often landing on incorrect assumptions that force them into inefficient loops. The compounding effect of these loops is the primary driver of high costs and slow delivery.
- Leverage organizational expertise: By analyzing code review history and social graphs, agents can prioritize feedback from senior engineers, ensuring that the generated code aligns with team standards.
Practical Implementation and Tools
Building a context engine involves synthesizing data from across the organization—GitHub history, Slack, and documentation—to create a searchable, intelligent layer.
- Review Agents: By boosting comments from senior engineers, review agents can provide more relevant feedback and help debug issues (e.g., identifying why code review flags dropped by correlating them with past Slack conversations).
- Engineering Social Graphs: Visualizing team relationships and review coverage helps identify 'thin' areas in the codebase where expert knowledge is lacking.
- Open Source Utilities: Tools like document query engines can ingest historical PRs to synthesize schemas and provide deeper insights into codebase evolution.