Library
8 min read

Agentic RAG

Classic RAG retrieves once, then answers. That is fine for "what is the refund window?". It breaks on "which of our three pricing plans would have been cheapest for this customer last quarter, given their usage?": the first search reveals what to search next, and nothing in a single shot pipeline can act on that.

Agentic RAG turns retrieval into a tool. The model decides whether to search, what to search for, reads the results, and searches again until it has enough, or decides the answer is not there. It is the agent loop with search as the main tool, and it is how deep research features and coding assistants find things.

Your answer

Your one-shot RAG system gets multi-step questions wrong. What would the model need to be able to do, that the fixed pipeline does not let it do?

From pipeline to loop#

Shape
Code decides: always retrieve, always once, always answer. Fast, cheap and predictable, and it has no way to recover when the first search misses or the question needs several hops.