« Back to Glossary Index

Retrieval-augmented generation (RAG) is a technique that combines information retrieval with text generation. Instead of relying solely on what a language model learned during training, a RAG system first retrieves relevant content from an external source (i.e., a knowledge base, document repository, or database) and then uses that content to inform the generated response.

The result is a system that can produce contextually grounded answers based on current, specific, or proprietary information that the underlying model was never trained on. The model doesn’t “know” the retrieved content in the way it knows its training dat. It uses it in the moment to shape its output.

RAG is one of the primary architectural patterns behind AI search and retrieval products. When an AI search feature returns an answer grounded in your company’s internal documentation rather than general knowledge, RAG is typically what makes that possible.

Why This Matters for Technical Writers

RAG directly affects what an AI system can and can’t answer accurately, and where its answers come from. If you’re documenting an AI search feature, a knowledge assistant, or any product that retrieves and summarizes content, understanding RAG helps you explain scope and limitations honestly — including why the system may return outdated results if the underlying source hasn’t been updated, or why it may not answer questions outside its configured knowledge base. The quality of a RAG system’s outputs depends heavily on the quality of what it retrieves, which is a documentation concern as much as a technical one.

Common Confusion

RAG is sometimes confused with fine-tuning, but they solve different problems. Fine-tuning retrains a model on new data to change its behavior permanently. RAG retrieves information at the moment of a request without changing the model itself. RAG is also not the same as AI search — it’s the underlying technique that many AI search and retrieval products are built on.

AI search and retrieval, large language model (LLM), generative AI, knowledge base, fine-tuning, hallucination, foundation model