Agentic Retrieval and Sufficient Context: When RAG Doesn't Know Enough
Standard RAG often answers too early. Agentic retrieval plans searches, routes sources, scores evidence and searches again until the context is truly enough.
This article is published in English.
Sources: When RAG Doesn’t Know Enough: Why Agentic Retrieval Needs Sufficient Context
Vector search isn't what sinks most RAG systems. The sharper production pain is a model that responds while still short on evidence. It isn't a case of finding nothing: the system usually pulls back something, the chunks seem on topic, and the reply is fluent and assured. Yet it's incomplete, since the needed facts sat in several documents, systems, tables, tickets, manuals, logs or graph relationships.
The classic pattern is a single pass:
User question → embed query → retrieve top-k chunks → send to LLM → generate answer
That's fine for easy questions, and enterprise ones rarely are. A policy lives in one document and its exception in another. A ticket describes the incident, a release note explains a changed behavior, a database row holds the current status, a graph edge exposes a dependency, a PDF table has the real figure, and a past conversation records what the user already attempted. Fetch only the first few similar chunks and the model replies too soon. RAG isn't dead. It needs to recognize when it lacks enough.
Premature answers
Many RAG systems fail quietly. They never say there isn't enough evidence. They hand over an answer, fluent and structured and mostly plausible, and wrong.
Picture an internal support agent asked why Acme's export broke after a workspace migration. A naive pipeline finds one export troubleshooting page and says permissions were missing. Perhaps partly right. A complete answer draws on Acme's migration record, a release note about export permission changes, last week's ticket, an internal incident write-up, the account's feature flags and a dependency graph naming the export service involved. A single document could never carry all that, so retrieval has to behave more like an agent.
What sufficient context means
Sufficient context means the evidence in hand supports a confident answer. Loosely related chunks, a high similarity score or five returned documents don't count. Prior to generating, the system ought to verify that it holds the policy, the exception, the current state, the authoritative record, the links between entities, enough to explain the cause and not just the symptom, and a route for citing the result. If something's absent, it should go back and search again. That is the jump from classic RAG to agentic retrieval.
From top-k to evidence seeking
Standard RAG treats retrieval as a single step, retrieve once and answer. Agentic retrieval treats it as a workflow:
Retrieve once → answer
Plan → retrieve → inspect → judge evidence → retrieve again → answer
Nothing obliges the model to answer from whatever came back first. It acts more like a research analyst who searches, opens documents, compares them, follows relationships, verifies and answers only when the context is adequate.
Why agents raise the stakes
A chatbot answers a question. An agent makes decisions: choosing tools, calling APIs, updating records, filing tickets, recommending actions, asking for approval or continuing through many steps. Incomplete context then spreads downstream:
Incomplete retrieval → wrong diagnosis → wrong tool call → wrong business action
A production agent shouldn't simply report a similar document. It should be able to say it located the policy, the exception, the live account state and the related incident, and that this evidence settles the question. That's a different architecture.
Where agentic retrieval is heading
Recent work on RAG and knowledge graphs points toward retrieval that is agent-controlled, graph-aware, scored on evidence and backed by memory. Not every system needs a giant knowledge graph, but the retrieval layer needs more intelligence than embedding a query and returning top-k. Several directions matter.
Cross-corpus retrieval
Enterprise knowledge isn't in one tidy vector database. It's spread over Google Drive, Confluence, Notion, Slack, Jira, GitHub, warehouses, support tickets, dashboards, internal APIs, product docs and PDF manuals. A good system must decide where to look first. A retrieval planner can classify the question as policy, product behavior, customer-specific, incident, financial metric or technical dependency, and route it accordingly. Searching everything is costly, and searching the wrong place is worse.
Retrieval as tools
One useful pattern exposes retrieval as a controlled set of tools instead of a fixed result:
search(query)
find(term, document)
open(document_id)
summarize(document_id_or_section)
This mirrors human investigation: search, open promising hits, inspect sections, refine the query and compare evidence. The reasoning model drives the process, but only within a bounded toolset, which gives flexibility without unrestricted access.
Knowledge graph traversal
Vector search finds semantically similar text, while many production questions turn on relationships. Which customers does this service affect? Which products depend on this API? Which policy applies in this region? Which deployment caused this incident? These are connected-context questions, not similarity ones. A graph can link the entities directly:
Customer → Workspace → Feature Flag → Service → Incident → Release Note
An agent can follow those links instead of hoping the right chunk surfaces in the top results. That's evidence navigation more than retrieval. Use it where relationships matter, and skip it when it merely sounds advanced.
Evidence sufficiency scoring
After retrieval the system should judge whether the evidence suffices. Does it answer the question directly? Are entities, dates or sources missing? Do sources conflict? Does the origin carry real authority? Can the answer be cited? When evidence is weak, the system keeps searching:
Evidence score: weak
Reason: found general export docs, but no customer-specific workspace state
Next action: query account configuration source
The loop prevents premature answers and eases debugging, because you can see why the agent searched again.
Context graphs and agent memory
RAG usually deals with outside knowledge, but agents also need memory: what the user asked earlier, what has been searched, which evidence was accepted, what was decided and which assumptions remain open. A flat conversation buffer won't do. A better design ties memory to entities and decisions, so the reasoning trace itself becomes memory:
User asked about Acme export failure → agent searched export docs →
found migration-related incident → checked Acme workspace state →
concluded permission-path mismatch
The next time a similar issue shows up, the agent doesn't start from zero, which matters for long-running agents.
Multimodal and document-aware RAG
A lot of enterprise knowledge isn't plain text. It sits in PDFs, tables, screenshots, diagrams, formulas, scans, charts, slide decks and forms. Ordinary chunking mangles structure: tables degrade into jumbled text, formulas lose their surroundings, diagrams shrink to OCR guesses, and sections are split from the captions that explain them. A document-aware pipeline understands text, tables, figures, layout, heading hierarchy, captions, form fields and how visuals relate to prose. Finance, healthcare, manufacturing, legal, insurance and technical documentation depend on it most.
Tool and context budgets
Tools consume context too. Load dozens of retrieval, graph, database and search tools, and their schemas compete with the evidence:
Tool definitions + retrieved evidence + conversation history + room for the answer
= one finite context window
Agentic RAG therefore needs a budget-aware runtime that decides which tools to show, how many chunks to include, whether to summarize tool output and, importantly, when to stop. The aim is to retrieve enough, not endlessly.
A production architecture
Put together, a production system for agentic retrieval resembles a control plane far more than a pipeline:
User Question
↓
Intent + Risk Classifier
↓
Retrieval Planner
↓
Source Router
├── Enterprise Search
├── Vector Search
├── Keyword Search
├── Knowledge Graph
├── Structured Data
├── Document Parser
└── Agent Memory
↓
Evidence Inspector
↓
Sufficiency Gate
├── If insufficient → refine query / follow graph / open document
└── If sufficient → generate answer
↓
Answer with Evidence Trace
The practical message is simpler: don't let RAG answer until it has enough evidence.
The Acme case, end to end
Asked why an export failed after the workspace migration, standard RAG fetches the export troubleshooting guide and the migration FAQ, and replies that the export likely failed for lack of permissions. An agentic system investigates:
- Search support docs for export failures.
- Search release notes for workspace migration changes.
- Open the customer's account configuration.
- Check the feature-flag state.
- Search incident history.
- Follow the dependency graph from the export service to the permission service.
- Decide whether the evidence is now sufficient.
- Write the answer with sources.
The answer that comes out: Acme was migrated to the new workspace model while the export service kept checking the legacy permission path. The workspace flag is enabled, yet the export policy was never upgraded, so the remedy is updating that policy for the workspace model. A stronger model isn't what changed the outcome. Better evidence gathering did.
What to build first
With an existing RAG system, don't rebuild everything. Take these steps in order:
- Add a sufficiency check. Before generating, ask whether the retrieved evidence is enough for this exact question, and if it isn't, either run another retrieval or put a clarifying question to the user.
- Add source routing. Searching every source each time wastes effort. Classify the query first: policy questions go to policy docs, customer problems to tickets together with account state, technical faults to docs, logs and the service graph, and metric questions to the semantic layer.
- Add retrieval tools such as
search,open,find,summarize,follow_entity_relationandquery_structured_record, so retrieval becomes iterative. - Add graph traversal where answers depend on ownership, dependency, lineage, causality, hierarchy, multi-hop links or policy exceptions.
- Preserve document structure. For PDFs, reports, slides, tables and diagrams, use document-aware parsing and store the structure instead of plain chunking.
- Keep an evidence trace that records the sources searched, documents opened, facts accepted, gaps found and the reason the system decided it had enough. That record is what earns trust in agentic RAG.
What not to overbuild
This can get too elaborate, and not every technique belongs in every use case. A simple FAQ search probably doesn't need a knowledge graph, plain-text docs don't need multimodal parsing, one-shot Q&A doesn't need long-term graph memory, and a fully internal domain doesn't need external search. The question to ask is what kind of evidence this question needs. For one clean document, normal RAG may do. When the answer spans sources, relationships, memory and current state, agentic retrieval earns its complexity.
The shift
The current movement in RAG isn't about replacing vector search. It adds control around retrieval. Vector search still matters, as does keyword search. Knowledge graphs matter when relationships do, document parsing when structure does, and memory when an agent works over time. The production task is combining them. The next generation looks less like this:
Vector DB → top-k chunks → LLM
and more like this:
Planner → source routing → retrieval tools → graph traversal → evidence scoring → answer
RAG doesn't fail only when it fetches bad chunks. It also fails when it fetches partly useful chunks and answers early. For simple questions top-k may still do. For enterprise, research, support, ops and document-heavy agents, retrieval needs a stronger loop:
plan the search → route to the right sources → inspect evidence →
follow relationships → check sufficiency → retrieve again if needed →
answer only when grounded
That is the move from standard RAG to agentic retrieval. It isn't because RAG is dead. Production agents have to recognize when they don't know enough.