Notes

Agentic RAG

Standard retrieval does one search with the question it was handed and hopes the answer is in the results. Agentic RAG gives that decision to the model instead: it judges whether it needs to search at all, what to search for, whether what came back is good enough, and whether to go again.

The loop

Retrieval becomes a tool the model calls rather than a pipeline stage it sits behind. A question like "how did our refund policy change after the 2023 audit?" turns into a sequence — search the audit report, notice the policy version it cites, search for that version, compare the two. Each step's result shapes the next query, which no fixed pipeline can do.

What the agent decides
  • Whether to retrieve at all — a follow-up about its own previous answer needs no search.
  • Which source to query, when several document indexes, a SQL database and a web search are all available.
  • Whether the returned passages actually support an answer, or whether to reformulate and try again.
  • When to stop, which is the decision that keeps the loop from running up a bill.
The trade

Accuracy improves on multi-hop and ambiguous questions, the cases where naive and even advanced RAG fail by construction. The cost is several model calls per answer, latency that varies with the question, and failures that are harder to reproduce — a poor judgement at step two explains a wrong answer at step five. Self-RAG, which trains the model to emit its own retrieve-and-critique decisions, is one attempt to make that judgement dependable rather than merely prompted.

Agentic RAG gives the model control over retrieval instead of running it as a fixed pipeline stage: it decides whether to search, what query to issue, whether the returned passages suffice, and whether to search again. This handles multi-hop and ambiguous questions that single-shot retrieval cannot, at the cost of several model calls per answer, variable latency, and failures that are harder to trace. Self-RAG trains this judgement into the model rather than prompting for it.

Most search-assisted AI works like a student who gets one trip to the library, grabs whatever is on the first shelf, and writes the essay from that. Agentic RAG is a student who is allowed to walk back. It looks at what it found, decides whether that really answers the question, and goes to look again with a better idea of what to ask for — maybe twice, maybe in a different section of the library. It is slower and costs more. But for a question whose answer is spread across several documents, it is the difference between a real answer and a confident guess.