Encyclopedia

Retrieval-augmented generation (RAG)

What retrieval-augmented generation is, the retrieve-then-generate steps, and why it matters for accurate answers.

Retrieval-augmented generation (RAG) is a technique where an AI model first retrieves relevant information from a knowledge source and then generates its answer from that retrieved content, instead of relying only on what it learned during training.

The two steps

  1. Retrieve: given a question, the system searches a knowledge base and pulls the most relevant passages.
  2. Generate: the language model writes its answer using those passages as the source, so the reply reflects the company's real content.

Why it matters

A language model on its own only knows its training data, which is general and frozen in time. RAG lets it answer from a specific, up-to-date knowledge base without retraining the model. That grounding is what makes an AI agent accurate about one company and is a main defence against hallucination.

From reference to practice

Turn what you just read into a working AI agent on your own customer contact. Start free, no credit card needed.

    Retrieval-augmented generation (RAG) | Conveya