What does RAG actually solve, and why is it common in enterprise AI?
Retrieval-augmented generation, or RAG, addresses how an application finds and uses updatable external knowledge while answering. It makes company material easier to update and cite, but it neither guarantees factual output nor replaces training, access control, or data governance.
When a user asks a question, a RAG system searches only the material that user may access, selects relevant passages, and gives those passages and the question to a generative model. This partly separates where business knowledge lives from how an answer is expressed. A company can update a policy document rather than wait for a foundation model to be retrained with private facts.
When defining model, data, and production boundaries, also compare What should you prepare before building an enterprise AI assistant? and How should a battery company build an AI technical assistant?; the linked guidance adds context that should be considered in the same decision.
| Approach | Knowledge source | Best fit | Main limitation |
|---|---|---|---|
| Model alone | Training parameters and current prompt | General writing and open discussion | Does not know current company facts |
| Full document in context | Material attached to this request | Temporary analysis of a small document set | Costly; long-context use is inconsistent |
| RAG | Retrieved external passages | Many changing sources that need citations | Retrieval and content governance create new failure points |
| Fine-tuning | Training examples that shape behaviour | Stable format, classification, or style | Inefficient for frequently changing facts |
The original NeurIPS 2020 RAG paper combines parametric language-model knowledge with retrievable non-parametric memory and discusses knowledge-intensive tasks and provenance. Enterprises emphasize the approach because manuals, policies, and cases change often, while few should train a foundation model on internal documents. Retrieval can supply the current approved version and return a document, page, or passage with the answer.
A production answer passes through more than a vector database. Sources are parsed while preserving headings, tables, and metadata; documents are chunked and indexed; the query may be rewritten and constrained by identity; keyword and vector retrieval apply product, region, and time filters; reranking selects evidence; generation composes the answer; and a final layer checks citations, permissions, and logs. Any stage can fail.
Authorization must run before retrieval. Dealer pricing, for example, should be filtered out at the index query for unauthorized users, not sent to the model with an instruction to keep it secret. A citation should also identify the exact supporting passage and version, not merely display an impressive-looking document title.
RAG does not cure hallucination. Search may miss the correct passage or return a similar obsolete version, and the model may add unsupported general knowledge. The Lost in the Middle study shows that a model's use of relevant information varies with its position in a long context. Limit irrelevant passages, resolve source conflicts, refuse when evidence is insufficient, and check whether each material claim is supported.
Evaluate retrieval and generation separately. Retrieval metrics include recall@k, rank, and permission filtering; generation metrics include evidence-supported correctness, faithfulness, citation consistency, appropriate refusal, and severe errors. System measures include P95 latency, cost, and time from knowledge update to activation. The RAGAS paper likewise separates context relevance, faithfulness, and answer quality. Automated scoring can assist triage, while authoritative business reviewers decide the facts.
Wavesteam can build parsing, indexing, retrieval, permissions, and operating tools, but the task should decide whether RAG is needed. Ten fixed FAQs are simpler as rules; one temporary contract may fit directly in context. RAG earns its complexity when knowledge comes from multiple changing sources and users need to verify the answer.