What is retrieval-augmented generation (RAG)?
Retrieval-augmented generation (RAG) is a technique in which an AI system first searches a chosen set of documents or data for passages relevant to a question, then gives those passages to a large language model to write the answer. RAG lets a model answer from current, company-specific information it was never trained on.
Why it matters for your business
A large language model knows only what it was trained on. It has never seen your contracts, price list or policies, and its knowledge stops at a cut-off date. RAG is the usual way to close that gap without retraining the model, which costs more. Answers can also point to the documents they came from, so staff can check them.
How it works
Your documents are split into passages and indexed so they can be searched by meaning, not only by keyword. When someone asks a question, the system retrieves the passages that match best. Those passages are added to the question and sent to the model, which writes an answer from them.
The name comes from a 2020 research paper.
Costs, limits and when not to use it
RAG reduces invented answers; it does not remove them. If the search step returns the wrong passage, the model writes a confident answer from it. Quality therefore depends on the documents: out-of-date, duplicated or badly organised files produce poor answers, which is why data readiness comes first. Someone has to keep the index current, and access rights need care so the system does not show people documents they should not see.
RAG vs fine-tuning
RAG gives a model information to read at the moment it answers. Fine-tuning changes the model itself through further training. Use RAG when facts change often; consider fine-tuning to change style or behaviour.