Retrieval and RAG

Agentic RAG vs Classic RAG: When Iterative Retrieval Helps

Compare agentic RAG and classic RAG through evidence dependencies, bounded retrieval loops, stopping rules, and fair evaluation of answer quality.

· · 8 min read

Prepared with AI research assistance. Sources are linked throughout; worked examples are illustrative unless stated otherwise. Editorial approach.

Agentic RAG helps when the next useful search depends on evidence discovered during an earlier search. It adds a decision loop around retrieval: inspect what is known, identify a missing fact, issue a targeted query, and decide whether the collected evidence supports an answer. That additional loop is valuable only when it resolves uncertainty that a simpler retrieval pipeline leaves open.

The architectural choice is not between an unintelligent search box and an autonomous researcher. A fixed pipeline can use excellent search, query expansion, reranking, and validation. The question is whether retrieval needs to change its course after inspecting intermediate results.

Define the baseline before comparing architectures

In this guide, classic RAG means an application pipeline that retrieves a bounded evidence set, prepares context, and generates an answer without a model repeatedly choosing new searches. It can include multiple predetermined retrieval operations. Agentic RAG means a model-controlled loop can decide which permitted retrieval operation to perform next, based on the current evidence.

These are operational definitions for an architecture experiment, not a universal taxonomy. The original RAG paper combines a generative model with non-parametric retrieval and studies both sequence-level and token-level conditioning on retrieved passages. It would be inaccurate to describe all historical RAG research as simply one search followed by one prompt. Lewis et al., Retrieval-Augmented Generation.

For the baseline, implement strong retrieval before adding autonomy. Preserve document metadata, apply access filters, combine suitable search methods, and measure whether relevant evidence appears among candidates. A loop cannot reliably repair a corpus with missing documents or an index that consistently excludes the required passage. See hybrid search for RAG agents for that retrieval foundation.

What iterative retrieval research establishes

IRCoT studies multi-step questions where later retrieval depends on intermediate reasoning. Its method interleaves retrieval and generated reasoning steps, rather than using the initial question as the only search signal. The important architectural lesson is dependency: an early result can reveal an entity or relationship needed to formulate a productive later query. Its reported benchmark improvements remain results for the evaluated systems and datasets. IRCoT, ACL 2023.

Adaptive-RAG addresses a different decision: selecting among no retrieval, single-step retrieval, and iterative retrieval based on predicted question complexity. Its framework uses a trained classifier. A production application need not reproduce that classifier to test the broader hypothesis that different questions justify different retrieval budgets. A hand-written routing rule is an engineering alternative to evaluate, not an implementation of the paper. Adaptive-RAG, NAACL 2024.

Self-RAG learns specialized reflection tokens for retrieval decisions and critique during generation. It is not equivalent to adding a generic “check your answer” prompt to an arbitrary model. Its project description also emphasizes that retrieved passages do not guarantee that generated claims follow from them. These distinctions matter when translating research ideas into product architecture. Self-RAG project.

Together, these works motivate experiments with conditional retrieval. They do not establish that an agent loop improves every internal knowledge assistant, or that reflection can replace independent evidence checks.

Look for questions with an evidence dependency

A question such as “What is the published deployment freeze window?” often needs one authoritative policy passage. Repeated searching can add latency and introduce superseded versions without improving the answer.

A question such as “Which of our services are affected by the advisory mentioned in yesterday's checkout incident?” has a dependency chain. The incident record identifies an advisory. The advisory identifies affected package versions. Deployment manifests identify which services use those versions. The initial question may not contain the identifiers needed for the later searches.

Before choosing an agent, draw that chain as explicit missing facts. If all useful queries can be constructed directly from the request, a deterministic parallel search pipeline may be sufficient. If the process requires discovering a new identifier and then following it, iterative retrieval has a clearer job to perform.

Also separate retrieval uncertainty from business ambiguity. If “affected” could mean deployed in production, present in a repository, or reachable through a vulnerable code path, more searches do not resolve the user's intended scope. Clarify the definition or state the answer's scope explicitly.

A proposed bounded retrieval loop

The following is an illustrative design, not code from the cited papers. Maintain a compact evidence ledger rather than treating the full conversation as the research record:

question and permitted scope
required claims and unresolved dependencies
queries already attempted
source IDs, versions, timestamps, and access context
supported findings, conflicts, and unknowns
remaining searches, deadline, and context allowance

At each iteration, the planner proposes one missing fact and the query intended to resolve it. Application code checks whether the query is permitted, sufficiently distinct from previous attempts, and affordable within the remaining budget. Retrieval returns evidence with stable source identifiers. A verifier then updates the ledger without treating the planner's interpretation as a source fact.

Keep observations distinct from conclusions. “Manifest M lists package version 2.4” is an observation. “Service S is affected” additionally depends on the advisory's version range, environment, and any relevant conditions. This separation makes unsupported leaps visible and allows the final answer to explain which condition remains unknown.

Context selection remains necessary after each search. Appending every retrieved passage can bury the evidence that matters. Use a bounded, diverse context set while preserving references to the complete ledger. RAG reranking and context selection examines that separate decision.

Walk through a hypothetical advisory investigation

Assume an internal assistant can read approved incident records, package advisories, and deployment manifests. It cannot modify deployments. The user asks whether production checkout and billing services need review after an incident mentioning an authentication SDK.

The first search retrieves the incident report, which names advisory ADV-example-17 but omits the SDK version range. The ledger records the advisory identifier and marks affected versions as unresolved. A second targeted lookup retrieves the advisory, which hypothetically lists versions before 2.5 as affected under a specified configuration.

The third lookup retrieves current production manifests. Checkout uses 2.4; billing uses 2.6. The assistant can now distinguish a version match from a confirmed exploit condition. If the configuration evidence is unavailable, it should recommend review of checkout based on the version match, explain that exposure is unconfirmed, and identify billing as outside the stated version range in the observed manifest.

Suppose an older incident appendix lists checkout at 2.3. That is not a reason to average versions or choose the more alarming value. The answer should use the designated deployment source for the relevant environment and timestamp, retain the conflicting record, and explain the provenance decision. If the manifest is stale, the final status remains uncertain.

A fixed pipeline might solve this same example by retrieving all three source classes in advance. The loop earns its complexity only if targeted follow-up searches improve coverage or efficiency on representative questions. This example establishes a testable hypothesis, not an inherent advantage.

Stop on evidence conditions, not fluent confidence

A planner's statement that it is confident is a weak stopping rule. In the proposed design, an answer is ready when required claims have qualifying evidence, relevant conflicts have an explicit disposition, and the conclusion stays within the observed scope.

Use several terminal outcomes:

Outcome Trigger Response behavior
Supported answer Required evidence conditions are met Answer with claim-level citations
Partial answer Some claims are supported; others remain unresolved Separate findings from missing evidence
Budget exhausted Search, time, or context allowance is consumed Explain the remaining gap without inventing completion
Access boundary Required material is unavailable to this identity Report the limit without exposing restricted information
No useful progress Repeated searches add no relevant evidence Stop or request a more specific question

Define progress through new relevant evidence, not changes in wording. Normalize repeated queries and track document versions already examined. A search that returns the same ten passages is not a successful investigation step merely because the query was paraphrased.

Compare the systems without giving one an unfair advantage

Evaluate at least three variants: a strong fixed pipeline, a bounded iterative pipeline, and an adaptive route that reserves iteration for selected questions. Keep the corpus snapshot, permissions, generator capability, acceptance criteria, and source availability consistent.

Build task groups for direct lookups, entity discovery, cross-document joins, contradictory versions, missing evidence, and malicious instructions embedded in retrieved documents. Hold out related question families together so near-duplicate incident cases do not leak between development and evaluation. Agent evaluation dataset design explains the broader leakage problem.

Measure supported-answer rate, unsupported critical claims, correct abstentions, evidence coverage, latency distributions, retrieval calls, and cost per accepted answer. Count timeouts and incomplete runs. Inspect whether improved average accuracy hides worse performance on straightforward questions or more confident errors on unanswerable ones.

Review retrieval traces as well as final prose. A plausible answer may rest on an unauthorized source, an incorrect entity join, or a citation that does not support the associated claim. More steps create more opportunities to observe useful evidence and more opportunities to drift; the evaluation must capture both.

Frequently asked questions

Is query rewriting enough to make RAG agentic?

Not under this guide's definition. A predetermined rewrite step remains a fixed workflow. The distinguishing feature is choosing subsequent retrieval actions from intermediate evidence. The label matters less than documenting the actual control flow.

Does agentic RAG require multiple agents?

No. One bounded controller can choose searches and maintain an evidence ledger. Separate workers may help independent investigations, but they add coordination and merging requirements that should be evaluated separately.

When should I keep classic RAG?

Keep it when a strong bounded pipeline satisfies the required evidence and outcome criteria at acceptable cost and latency. Add iteration for demonstrated dependency gaps, then retain it only where evaluation shows useful gains.

Source reference list

Agentic RAG
Retrieval-Augmented Generation
AI Agents
Retrieval Evaluation