Glossary

Retrieval-augmented generation

Also known as: RAG

Retrieval-augmented generation is the standard way to make a language model answer from your data rather than from its training. When a question arrives, the system first searches your own documents for the passages most likely to be relevant, then puts those passages into the prompt and asks the model to answer using them.

It is preferred over fine-tuning for factual knowledge because the source of truth stays outside the model. Update a document and the next answer reflects it, with no retraining, and the system can cite which passage it used — which is usually the difference between a tool people trust and one they quietly stop opening.

Most RAG projects fail at the retrieval step, not the generation step. If the search returns the wrong three paragraphs, a very good model will write a very fluent answer based on them. Budget accordingly: the search quality, the chunking of documents and the handling of "nothing relevant found" are the work.

← Back to the glossary