Meet Nexus EDGE: The Agentic Desktop Ally Built for Employee Experience Automation.

Blog

17 mins read

Agentic RAG Architecture: Components and Design Guide

Published: November 25, 2026

What does your system do when the first search comes back with something that looks right and isn't? Most retrieval pipelines have no answer to that question, because nothing in them is responsible for asking it. The query goes in, chunks come back, the model writes prose, and the customer gets whatever that prose says. An agentic RAG architecture exists to insert a decision point where that blind handoff used to be, and to keep that decision point on a leash. The design work is less about adding intelligence than about sizing a loop you can afford to run.

Table of Contents

Agentic RAG at a Glance and How It Differs From Standard RAG

Say a support bot answers "what's your refund window?" cleanly from one policy document. Then a customer asks why their refund hasn't landed. The policy changed last month, the order record sits in a commerce system the vector index has never seen, and the payment processor holds the actual status. One similarity search against one index can't assemble that answer, and it won't tell you it failed.

The original pattern was deliberately simple. The NeurIPS 2020 paper on retrieval-augmented generation for knowledge-intensive NLP tasks paired a pretrained sequence-to-sequence model supplying parametric memory with a dense vector index of Wikipedia supplying non-parametric memory through a neural retriever, and reported state-of-the-art results on three open-domain question-answering benchmarks. The same work found its outputs more specific, diverse and factual than a strong parametric-only baseline. That fixed pattern still runs most enterprise deployments: retrieve at inference time, put the evidence in context, generate a grounded answer.

Agentic RAG keeps the pattern and adds a decision layer. The agent decides whether retrieval is needed at all, rewrites or splits the query, chooses among sources and tools, judges what came back, and repeats when the evidence is thin.

Where the two paths diverge

Stage Standard RAG Agentic RAG
Retrieval trigger Every query, one pass Agent decides whether and when retrieval is needed
Query formulation User text used as is Planned, decomposed and reformulated
Source selection One index Router picks keyword, vector, metadata, graph or API sources
Evidence checking Rarely done Evaluator checks citations, completeness and conflicts
Iteration None Bounded retries under a budget
Input tokens Baseline Higher, because each round re-sends accumulated evidence
Output tokens Baseline Higher, because plans and reflection are generated too
Latency Predictable, low Longer, set by retrieval rounds and tool calls

Practical test: if every question in a workload can be answered by one lookup against one clean source, the standard pipeline is enough and the loop is overhead.

The Core Components of an Agentic RAG Stack

Five responsibilities make up the stack. They're jobs, not products, and one model can hold several of them. Separating them matters because a failure you can't localize is a failure you can't fix.

A diagram outlining the five core components of an agentic RAG stack: Planner, Router, Retriever, Tool Executor, and Synthesizer.

Planner and router

The planner turns a request into sub-tasks with named evidence requirements. "Why is my refund delayed?" becomes three: fetch the order and refund state, find the refund policy in force for that region and product, and check whether the elapsed time exceeds the stated window. Write the planner prompt so it emits a fixed JSON shape (sub-task id, question, required source type, expected field) rather than free text. Structured output is what makes decomposition quality measurable later.

The router maps each sub-task to a retrieval method. It reads query type plus metadata such as region, product line and customer tier, then dispatches. A refund-state sub-task goes to an API tool; a policy sub-task goes to a metadata-filtered index. Keep the router cheap: a small model or a rules table with a model fallback handles most traffic, and you don't want your most expensive model deciding where to search.

Retriever and tool executor

The retriever searches documents and records for supporting passages. Practical defaults that hold up in enterprise corpora: chunk policy text on section boundaries rather than fixed character counts, keep the section heading attached to each chunk, and re-rank the top candidates with a cross-encoder before anything reaches the generator.

The tool executor calls live systems: the CRM for account state, the order platform for shipment and refund status, the ticketing system for prior contacts. Every tool needs a typed parameter schema, an auth scope limited to read operations, a timeout, and a retry policy that doesn't double-charge your latency budget. Return evidence with a source identifier and a timestamp attached, because "current status" without a timestamp is unusable in a dispute.

Evaluator, synthesizer and state

The evaluator asks three questions of the gathered evidence: does every claim in the draft answer have a supporting passage, is anything required by the plan still missing, and do any two sources contradict each other. It then decides answer, retry once, or escalate. The synthesizer writes only from approved evidence with citations attached.

Memory and state holds the plan, intermediate queries, retrieved passages, tool parameters and reflection decisions for the run. Persist it as a replayable trace keyed to the conversation id, not as a summary.

Build the router and the evaluator first. The router stops unnecessary calls, the evaluator stops unsupported answers, and together they remove most of the damage an autonomous loop can do.

Single Agent and Multi Agent Architecture Patterns

Topology is a choice you make before you write a prompt, and it is often made by accident. A scaffold ships with a single retrieve-and-answer chain, the team inherits it, and a year later the traffic mix has outgrown a design nobody deliberately chose. A survey of agentic RAG designs organizes the field on four measurable dimensions, which gives you a vocabulary for making the choice on purpose.

  • Agent cardinality. A single-agent loop runs planner, router, executor and evaluator as sequential roles inside one model. It is the cheapest to ship and fits refund triage, where one assistant owns the whole conversation. Multi-agent designs split retrieval, policy interpretation and validation behind a coordinator. Adopt them when the policy index, the order system and account data belong to different teams with different release cycles, and accept the wider trace surface that comes with them: every added agent is another place a run can stall and another component you have to test in isolation.
  • Control structure. A centralized orchestrator that hands out sub-tasks is easier to budget than peer agents delegating to each other, because every round passes one checkpoint where you can count rounds and stop. Peer delegation spreads that accounting across agents, and nobody owns the ceiling. If you are weighing either shape, the trade-offs in multi-agent orchestration for enterprise conversations are worth reading before you commit.
  • Autonomy. Level one retrieves once, always. Level two reformulates and allows a single corrective retry. Level three plans multi-step tool use across sources. Most CX teams should launch at level two and raise autonomy only for the specific question types that fail there, not for the whole traffic mix.
  • Knowledge representation. Flat document stores suit policy prose. Metadata-tagged indexes suit region and product scoping. Knowledge graphs suit ownership chains, such as which contract covers which subsidiary. Live APIs suit order state. Most enterprises need three of the four, which is exactly why the router earns its place.

Splitting roles is what makes each role testable, whether or not you split them across processes. A coordinator that cannot name which sub-agent failed is a system you cannot debug, price or bound.

How Information Flows Between Agents and Retrieval Systems

The loop is the architecture. A paper on agentic RAG design argues for a bounded control loop rather than a single retrieve-then-generate chain, separating query understanding and planning, retrieval and tool orchestration, multi-hop decomposition, and self-reflection, and it identifies modular separation of planning, active retrieval and state management as necessary for genuine autonomy. The same work calls for hard budgets on retrieval rounds, token context, latency and tool calls, since autonomous reformulation improves difficult multi-hop answers while making cost and response time unpredictable.

A cyclic diagram explaining how agentic RAG systems flow from planning and routing to retrieval and validation.

The seven handoffs

  1. Plan. The planner reads the request and emits sub-tasks. This handoff exists so retrieval targets a specific evidence gap instead of the average meaning of a compound question.
  2. Route. The router assigns a source per sub-task using query type and metadata such as region or product line. Routing before searching keeps out-of-scope documents out of the candidate set entirely.
  3. Execute. The executor runs the retrieval or API call and returns passages with source identifiers and timestamps. Without identifiers, nothing downstream can be cited or audited.
  4. Evaluate. The evaluator scores citation coverage and completeness, and flags contradictions. This is the checkpoint standard RAG lacks, and it's the only place where "relevant-looking" gets distinguished from "answers the sub-task."
  5. Branch. On marginal evidence, run one corrective pass with a rewritten query or a different source. On conflicting sources, escalate or abstain rather than picking a winner.
  6. Generate. The synthesizer writes from approved evidence only, with citations attached to each claim. Restricting it to the approved set is what makes groundedness enforceable instead of aspirational.
  7. Log. Persist the plan, queries, tool parameters, evidence, reflection decisions and final citations as one trace. Replay is how you diagnose a bad answer without guessing.

Confidence thresholds that set the branch

Three thresholds do the work: answer directly on high-confidence retrieval, allow one corrective pass on marginal evidence, escalate on conflict. Set them per question type, not globally, because a billing dispute and a shipping FAQ don't deserve the same evidence bar.

The common slip is letting reflection run unbounded. Each extra round adds latency and re-sends context, and a weak evaluator can talk itself out of good evidence and into worse evidence. Cap rounds in code, not in the prompt.

Because the responsibilities are separate, you can measure them separately: planner decomposition quality, retriever recall and precision, tool-invocation accuracy, and parameter-level F1 on tool arguments. A single end-to-end correctness score hides all four.

Choosing Retrieval Sources and Routing Queries

Retrieval is a routing decision, not a technology choice. No single method covers the question mix in a large enterprise, and pretending otherwise is how teams end up with a vector index full of order numbers nobody can find.

Retrieval method Best for Typical weakness Enterprise example
Keyword search Exact identifiers and codes Misses paraphrased questions What does the error code printed on my invoice mean
Dense vector search Paraphrased or open questions Can miss exact codes and numbers How do I dispute a late delivery charge
Metadata filtering Scoping by region, product or tier Depends on clean tagging Only EU enterprise policies in force today
Knowledge graph Multi-hop relationships Costly to build and maintain Which entity owns the contract for this subsidiary
API call Live data that changes by the minute Needs authentication and latency budget Current order status from the order system

A routing rule of thumb

For lookups, apply metadata filters first and keyword search inside them. A policy number or error string is an exact-match problem, and narrowing by region and effective date before ranking removes the most common wrong answer: last year's policy for the wrong market. For open questions, use dense vector search, and run it hybrid with keyword scoring when the corpus mixes prose and identifiers. Call APIs only when the answer changes by the minute, because every live call spends authentication, latency and error-handling budget that a document lookup doesn't.

Two implementation details decide whether this works in practice. Tag content consistently at ingestion (region, product line, effective date, superseded flag) or metadata filtering returns nothing and the router falls back to unscoped search. And log the routing decision with the reason, so you can see when the router keeps sending policy questions to the vector index because the tagging job broke. The mechanics of retrieval-augmented generation for enterprise knowledge are worth grounding your team in before you add routing logic on top.

A router that can't explain its choice in the trace is a router you can't debug.

Setting Budgets, Costs and Guardrails for the Loop

More autonomy isn't automatically better, and the token bill is where that becomes obvious.

A man in a server room analyzing a rising token usage chart on a computer monitor.

A comparative study of RAG designs in production settings reports that agentic RAG used approximately 3.3× more input tokens, 1.9× more output tokens and 1.5× the latency of enhanced RAG. Read that against a workload of password resets, order status and policy lookups. You'd be paying several times the inference cost and adding half again the wait for questions that a deterministic lookup already resolves correctly. The same work frames the missing piece as a workload-level routing framework: when to escalate from deterministic retrieval to agentic decomposition, how to cap tool calls, and how to measure incremental containment or first-contact resolution against the added latency and cost.

Four budgets to write into the design document

  • Maximum retrieval rounds. Cap reformulation at one corrective pass for most CX traffic. Without a cap, the evaluator can keep requesting evidence that doesn't exist in the corpus.
  • Maximum tool calls per request. Set it per question type and count failures against it. A tool that times out twice shouldn't get a third attempt inside a live chat turn.
  • Context token ceiling. Long policy documents crowd out the question and the customer record. Trim to the sections the plan asked for, and drop superseded versions before they enter context.
  • End-to-end latency target. Decide the wall-clock point where the system stops looping and hands off. In voice and live chat, that ceiling arrives long before the reasoning is finished.

Those budgets change answers, not just spend. A round cap forces the evaluator to commit, a token ceiling forces retrieval to be selective, and a latency target converts "keep thinking" into "escalate now."

Here's where the loop's operational shape becomes concrete.

Escalation and citation guardrails

When the evaluator can't reach its confidence threshold inside budget, hand the conversation to a human with the trace attached: the plan, what was retrieved, which sources conflicted, and what's still missing. That's a useful handoff, not a failure state, and it's faster than making the human reconstruct the investigation.

For regulated work, make citations required for every response. Every claim maps to a retrieved passage, and any answer without citations is withheld rather than softened. Write the abstention wording in advance so the system says something honest and specific instead of improvising a hedge.

Observability and Evaluation Signals to Track

Agentic failures usually sit between the agent and its tools. The final sentence can sound right while the path behind it is wrong, so retrieval relevance plus answer correctness is too thin a scorecard. A findings paper on evaluating agentic RAG in enterprise knowledge bases argues for logging the plan, intermediate queries, selected tools, retrieved evidence, state transitions, reflection decisions and final citations. That record lets you see whether a wrong answer came from poor decomposition, low document recall, faulty tool parameters, context loss or unsupported synthesis.

Think of the trace as the black box of the loop. You do not need it for every simple lookup, but once the system can plan, call tools and revise, the number of failure points grows. Without a replayable path, teams end up debating the wording of the answer instead of finding the step that caused it.

The production scorecard

  • Task completion tells you whether the request was resolved, which exposes plans that retrieved well and still missed the point.
  • Groundedness via citation entailment catches unsupported synthesis, where the prose is fluent and the passages don't say it.
  • Retrieval recall on a labelled set diagnoses missing or badly chunked content, and separates it from generation problems.
  • Duplicate and irrelevant-context rate flags router mistakes and wasted token ceiling.
  • Tool-call success and parameter accuracy surface faulty arguments, such as an order id passed where a refund id belongs.
  • Latency per iteration shows which round is expensive, rather than averaging the pain across the whole request.
  • Token use per resolved query is the number that decides whether autonomy pays for itself on a given question type.
  • Abstention quality checks that the system declines when it should, instead of escalating everything or guessing.

These signals work best when they are read together. Strong retrieval recall with weak Task completion points to planning or synthesis. Good Tool-call success and parameter accuracy with rising Latency per iteration points to a loop that is technically healthy but too expensive for the question type. High Abstention quality with low containment may mean the escalation rule is doing its job, while high guesses with poor citations mean the loop needs tighter groundedness gates.

Training and test data should preserve interaction traces rather than query-document pairs alone. The system is judged on sequences of planning, retrieval and tool actions, not isolated matches. Benchmark design also needs heterogeneous sources and correction-aware answers, especially when the knowledge base mixes policy text, records and live systems. A benchmark that only checks clean single-source answers will miss the moments where the loop is most likely to fail.

Keep traces replayable and gate each release on answer quality and operational risk together. Set up AI agent observability before you widen autonomy, not after the first incident.

Choose the Right Architecture for Your Workload

Start from the question mix, not the architecture diagram. Fixed answers at high volume want the cheapest reliable path. Compound questions that cross policy, records and workflow want the loop. Everything else is a judgement call you should make with a baseline in hand.

Workload Recommended architecture Main constraint to set
Password resets and order status Standard RAG or deterministic lookup Latency and unit cost per contact
Single authoritative policy source Enhanced RAG with metadata filters Freshness of the indexed policy
Mixed policy, customer record and workflow questions Agentic RAG Retrieval rounds and tool-call cap
Regulated decisions with conflicting sources Agentic RAG with human escalation Citation requirement and abstention rule

Run the pilot in this order:

  1. List your top 20 question types by volume.
  2. Tag each type as single-source lookup or multi-source reasoning.
  3. Measure containment and first-contact resolution on the standard path, and treat that as the baseline.
  4. Enable agentic handling only on the types that fail that baseline, with the round and tool caps already set.
  5. After four weeks, review traces and cost per resolved query, and turn off autonomy wherever the quality gain didn't materialize.

If you'd rather not build the loop from scratch, our Conversational Knowledge Base uses agentic RAG, so you can test it on the failing question types while keeping your own budgets, citation rules and trace retention in place.


Yellow.ai's enterprise agentic AI platform runs on a multi-LLM architecture with 15+ models, so you can match each planning, routing and evaluation role to the model that handles it best without single-vendor lock-in. Our Conversational Knowledge Base applies agentic RAG to enterprise knowledge sources, and human fallback keeps complex or conflicting cases with a person instead of a guess. Visit Yellow.ai to see how the bounded loop, budgets and escalation paths described here map onto your own CX and EX workloads.