Retrieval augmented generation

Retrieval augmented generation, or RAG, is a method in which the system searches a defined knowledge base for relevant passages before answering and hands them to the language model together with the question. The model then writes from text in front of it rather than from memory, and every claim carries a source a person can check. The bottleneck is almost never the model, it is retrieval: what is not found does not exist as far as the answer is concerned.

What does retrieval augmented generation mean?

Retrieval augmented generation is a method in which a system searches a defined knowledge base for relevant passages before answering and passes them to the language model along with the question, so that the answer is built from text at hand rather than from model memory.

The term gets confused with three other ways of getting knowledge into an AI system. They differ in effort, freshness and verifiability:

Short definition
ApproachHow knowledge gets inFreshnessWhen it fits
Retrieval augmented generationDocuments are retrieved at run time and passed alongImmediate, as soon as the document is updatedKnowledge changes, evidence is required
Fine-tuningModel weights are further trained on examplesFrozen at training timeStyle, format and task patterns must stick
Context in the promptText is pasted into the request by handAlways current, but manualOne-offs, small volume, no operation
Classic searchThe person reads the hits themselvesImmediateNothing needs writing, something needs finding

The most expensive misconception is that fine-tuning teaches the model your product data. Fine-tuning shapes behaviour and form. Anyone expecting current factual knowledge that changes next week needs retrieval, not training.

We find that RAG models generate more specific, diverse and factual language than a state-of-the-art parametric-only baseline.
Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, NeurIPS 2020

What the flow actually looks like

RAG is not a product, it is a chain of five steps. Each of them can ruin the answer, and four of them have nothing to do with the language model.

In sales, such a chain typically covers three jobs. It answers questions about your own offering without anyone digging through a shared drive. It supplies the basis for drafts by pulling the trigger event and the matching reference. And it condenses call notes into preparation that points at specific sentences from earlier meetings. In all three, the real value is not the wording but the traceability: the proposed claim sits next to the document it came from, and the reviewer decides in seconds instead of minutes.

There are cases where building it is not worth it. If your knowledge base is five documents everybody already knows, the effort exceeds the benefit. If the answers should come from structured fields, contract terms or revenue figures for instance, an ordinary query is more precise and cheaper than a text search followed by generation. And if the sources themselves are contradictory, unmaintained and ownerless, RAG only makes that state visible faster. That, incidentally, is the most common quiet benefit of such a project: it exposes the true condition of your own documentation.

  • Step 1, the knowledge base.

    You decide which documents count at all: product material, pricing logic, reference texts, call notes, the CRM. What is not in here cannot be cited later. What is in here twice shows up later as a contradiction.

  • Step 2, chunking.

    Documents are cut into passages. Chunks that are too large dilute the search; chunks that are too small tear context apart. Tables inside PDFs are the classic case where chunking destroys the answer before anyone has asked a question.

  • Step 3, search.

    Retrieval runs on semantic similarity, usually combined with a classic keyword search. That combination matters more than it sounds: product names, part numbers and proper nouns are found reliably by keyword search and missed regularly by pure semantic search.

  • Step 4, hand-off.

    The best passages go to the model with the question, plus the instruction to answer only from them and to claim nothing where coverage is missing.

  • Step 5, an answer with citations.

    Every claim carries a pointer to document, section and date. Without that pointer, RAG is just a more complicated way of guessing, because nobody reading the answer can tell whether it came from the source.

Use case 1: the source was right, it just was not valid any more

Constructed example scenario, not a client case. A maintenance contract vendor builds a knowledge base for its sales team. Everything on the shared drive goes in: proposal templates, service descriptions, technical sheets. From day one the answers are convincing and carry a source.

Six weeks later a rep commits to a response time that has not existed in that form for two years. The source existed, it was cited correctly, and it was an archived 2023 version. The case became expensive because the commitment was in writing.

The cause was missing curation, not missing technology. The fix was three rules: every document carries a validity date and a status, superseded versions are removed from the knowledge base rather than renamed, and the answer shows the source date next to the claim. Since then an outdated source is visible in the answer before it reaches a proposal.

Use case 2: the system could do it, it just never found it

Constructed example scenario, not a client case. A team sets up an assistant to answer questions about product variants. Two weeks in, the mood is poor: many questions return "I have nothing on that", although the information demonstrably sits in the knowledge base. The debate is about the model and about switching vendors.

Measurement says something else. Across 30 real questions, the correct passage was among the retrieved hits only about half the time. The cause was chunking: the variants lived in PDF tables that fell apart on import into row fragments with no column headers. A passage reading "variant C, 400 mm" with no context is almost invisible to a semantic search.

The fix touched only the data side: tables were imported structurally, every passage received the document title and heading as a header line, and the search gained a keyword component. The model stayed the same. What stood out was how quickly the vendor-switching debate disappeared afterwards.

What a dependable RAG chain requires

What a dependable RAG chain requires
ComponentConcrete targetCommon failure
Source selectionDeliberately curated knowledge base with an ownerDumping the whole shared drive in
ChunkingPassages along document structure, tables kept structuredFixed character length across everything
MetadataTitle, date, validity, access right per passageBare text with no provenance
Search methodSemantic search combined with keyword searchVector search only, proper nouns lost
Hand-off volumeFew good passages instead of many mediocre onesStuffing the context and hoping
Citation displayPointer with date next to the claimA source list at the end with no mapping
Empty answer"Nothing on that" is a permitted resultFalling back to memory when coverage fails
PermissionsRetrieval respects the asker's access rightsOne knowledge base, everyone sees everything
MeasurementRetrieval hit rate measured separately from answer qualityUser sentiment only

A one-hour diagnostic for your team

This order shows within about an hour where your chain breaks.

  1. Collect 30 real questions from daily sales work, not invented ones

    For each, note which document holds the answer.

  2. Ask them and log one thing only

    was the correct passage among the retrieved hits? That hit rate is your actual metric.

  3. Only then judge the wording

    A poor answer on a correct hit is a model or instruction problem; everything else is data work.

  4. Look for duplicates and superseded versions

    Two documents with contradictory claims produce random answers depending on which one ranks first.

  5. Check what the system does when coverage is missing

    If it writes something anyway, the most important instruction in the chain is absent.

  6. Check permissions

    can someone reach content through a question that they could not open in the file system?

Blog and articles

More terms

All terms
  • Glossary

    EU AI Act

    The EU AI Act is Regulation (EU) 2024/1689. It classifies AI systems by risk and attaches different duties to each tier. Three points matter for…

  • Glossary

    Hallucination

    A hallucination is a language model output that reads as fluent and confident but is not supported by any source. It is not a defect, it is the…

  • Glossary

    Human-in-the-loop

    Human-in-the-loop describes a working model in which an AI system researches, scores and drafts, while a named person approves every output that…

  • Glossary

    Training data

    Training data is the set of examples a model derives its patterns from. In sales that usually means your own history: won and lost opportunities,…

Booking

Book a strategy call

Pick a slot directly in the calendar.

Or send an email to hello@ki-vertrieb.co

Book a strategy call
Book a strategy call

The calendar only loads after your click. Loading it transfers data to Cal.com Inc. (USA). Privacy policy

Frequently asked questions

Questions and answers

Do we need a vector database for this?

Not necessarily for small corpora. What decides quality is chunking, metadata and the combination of semantic and keyword search. A specialised database becomes interesting as corpus and traffic grow, not as a first step.

Is RAG more expensive than fine-tuning?

The two compare badly, because they solve different problems. RAG creates ongoing effort for curation and retrieval; fine-tuning creates one-off training effort and then goes stale. For knowledge that changes, the ongoing effort is the cheaper route.

Does RAG reliably prevent hallucination?

No, it reduces it substantially. Two residual risks remain: the model can draw a wrong conclusion from a correct passage, and it can start writing again when coverage is missing. Both are only handled by a citation duty and a permitted empty result.

How often does the knowledge base need curating?

As often as the content changes, and with a named owner. The most expensive failure is not a missing document but an old version left sitting next to the new one, winning by chance.

Does this respect our access rights?

Only if you build it that way. Retrieval has to evaluate the asker's permissions, otherwise the knowledge base becomes a way around your rights structure. How we anchor that in operations is described under sales automation with handoff.