Retrieval-augmented generation (RAG) combines search with a language model. The system retrieves passages relevant to a question from your own content, inserts them into the prompt, and the model writes an answer grounded in those passages.
Why it matters
RAG lets a model use current or private information without retraining, and makes answers easier to trace back to sources. It reduces, but does not remove, hallucination.
Example
For a support bot over your documentation:
Question: "How do I add a Slack alert?"
Retrieved: help article "Alert channels" (top 3 chunks)
Prompt: "Answer using only the text below. If it is
not there, say you do not know. ..."
Retrieval often uses a vector database to find the chunks.
Common mistakes
- Poor chunking: pieces that are too large or split mid-thought retrieve badly.
- Not telling the model what to do when the context lacks the answer.
- Never evaluating retrieval quality separately from answer quality.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.