Skip to content
Agents

RAG (retrieval-augmented generation)

Retrieval-augmented generation is a technique where relevant documents are fetched from an external store and inserted into a language model’s prompt, so the model answers from that specific source material rather than from its training data alone.

RAG is the standard way to make a model answer about private or current information. Most RAG failures are retrieval failures, not generation failures: the model answered faithfully from the wrong passage. This is why retrieval quality should be measured separately from answer quality — otherwise you tune the prompt to fix a chunking problem.

Related terms

  • Agentic RAG

    Agentic RAG is a retrieval-augmented generation architecture in which the model decides when and what to retrieve — issuing its own queries, evaluating results, and retrieving again — rather than receiving a single fixed retrieval before generating.

  • Vector database

    A vector database stores text as numerical embeddings and retrieves entries by semantic similarity rather than keyword match, forming the retrieval layer of most RAG systems.

  • Chunking

    Chunking is the process of splitting source documents into smaller passages for embedding and retrieval, and the chunk size and boundary strategy largely determine how well a RAG system can find relevant information.

← All terms

Tell us what you are building

Send us the problem in a paragraph. You will get a straight answer on whether we can help, and what we would do first.

Book a call