LLMs and Chatbots · Source: SixtyMind Editorial (opens the original source)
What Is Retrieval-Augmented Generation (RAG)?
5 min read
In 60 words
Retrieval-augmented generation, usually shortened to RAG, is a pattern that pairs a language model with a search step. Instead of relying only on what the model learned during training, the system first retrieves relevant passages from a trusted knowledge source and then asks the model to answer using those passages.
How RAG works
A typical RAG pipeline splits documents into chunks, converts each chunk into a numerical embedding, and stores them in a vector index. When a user asks a question, the question is embedded too, the most similar chunks are retrieved, and they are inserted into the prompt as context for the model.
Why teams use it
RAG makes it possible to answer questions about private or frequently changing information, such as internal policies or product documentation, without retraining a model. Because the retrieved passages are known, answers can also include citations so readers can verify them.
Common pitfalls
Answer quality depends heavily on retrieval quality. Chunks that are too large or too small, outdated source documents, and weak search can all lead to poor answers. Evaluating retrieval separately from generation helps pinpoint where problems come from.
Official source
- Published on Sixty Mind on
- Reviewed by Lingaraj Mulge
Every Sixty Mind story links to its original source. Editorial policy