AI agents & concepts

What is RAG (Retrieval-Augmented Generation)?

Definition: RAG (Retrieval-Augmented Generation) is a technique where an AI model retrieves relevant documents from an external knowledge source and uses them as context to generate a more accurate, grounded answer — reducing hallucination.

Instead of relying only on what a model memorized in training, RAG fetches fresh, specific data at query time (from a vector database, search index or API) and feeds it into the prompt. The model then answers from that retrieved context.

RAG is how assistants stay current and cite sources. MCP servers are increasingly the retrieval layer — exposing live data an agent pulls in on demand.

Does RAG stop hallucinations?

It reduces them by grounding answers in retrieved sources, but doesn't eliminate them — retrieval quality and how the model uses the context still matter.

Put it into practice

Exposing data to agents via MCP? Test it →

Related terms