← All questions
AgentsEasy· RAG vs Agents

What is RAG, and how is it fundamentally different from...

RAG is a specific technique, not a system category: retrieve relevant documents from a knowledge base, feed them into the prompt, and generate an answer grounded in what was retrieved. It’s a one-shot pipeline — retrieve, augment, generate — and it stops there.

An agent is a different kind of thing entirely: an autonomous system that can plan across multiple steps, use several different tools, make decisions, and iterate based on what it finds. RAG can be one of an agent’s tools, but it isn’t a substitute for the rest of what an agent does. “What’s our refund policy” is answerable by RAG alone — retrieve the policy document, generate the answer, finished. “Process a refund for order #123” needs an agent: look up the order, check the policy (which might use RAG as one step), calculate the amount, call a payment API, send a confirmation — several tools and several decisions, not one retrieval-and-generate pass.

The practical mistake this distinction prevents is trying to solve an action problem with a retrieval technique — no amount of better retrieval turns a pure Q&A pipeline into something that can actually process the refund.

Code playground (Python)