Agentic RAG: query routing and corrective RAG

In basic RAG, every question goes through the same search. In agentic RAG, the agent decides where and whether to look. Query routing sends each question to the right source. Corrective RAG checks whether the retrieved results are actually relevant and, if not, rewrites the query or tries another source before answering.

Everyday analogy

A smart librarian who knows which shelf to try first (routing), and who, if the first books don't answer your question, says "these won't help, let me check another section" (corrective).

Example

A company assistant routes "What's my leave balance?" to the HR database, "How do I reset my VPN?" to the IT wiki, and "Latest AI regulations?" to web search. If the IT wiki returns nothing useful, it rewrites the query and searches again.

❓ Question👩‍💼 HR questionHR policy storecheck relevanceanswer + cite💻 IT questionIT wikinothing useful?rewrite and retry📰 News questionweb searchcheck dateanswer + cite
Agentic RAG routes each question to the right source, and retries if the results aren't good enough.
Question"How do I reset my VPN?"
→
RoutePick the source: IT wiki
→
RetrieveFetch the top chunks
→
CheckAre they relevant enough?
→
Correct if neededRewrite the query or try another source
→
AnswerGrounded, with citations

Basic RAG vs agentic RAG, step by step

StepBasic RAGAgentic RAG
1Your question goes straight to the retrieverAn orchestrator agent reads the task first
2Search one prepared index (built ahead of time)Choose the best sources: vector database, documents, web search, CRM, APIs or MCP servers
3Take the top results, whatever they areAn evaluator agent checks the evidence against the task
4Build the prompt and answerNot good enough? Rewrite the query or switch source, with a limit (for example 5 tries)
5One pass, fast and cheapAnswer only once the evidence passes; slower but more reliable

Try it yourself

About 10 min

Route the questions

  1. Write 6 questions a company assistant might get (HR, IT, sales, news).
  2. For each, write the best source: HR policy, IT wiki, CRM, or web search.
  3. Add what the assistant should do if the first source has nothing useful.

What you should see: Routing plus a fallback plan is what makes RAG agentic.

Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.

Build it for real · guided projectBuild a document Q&A assistant (RAG, no code)About 60 min · No coding needed · step by step
Test what you learned

Take a quick quiz, or look up any word in the glossary.