Retrieval-Augmented Generation (RAG)
Synonyms: retrieval-augmented generation, grounded generation, retrieval-augmented LLM, knowledge-grounded AI, document-grounded generation
Definition
Use cases
- The support bot that invents policies. A chatbot answers refund questions from training data and gets your actual policy wrong. RAG pulls the real help article so the answer matches your docs, with a link to prove it.
- The "as of when?" problem. A user asks about something that changed last week, and a plain LLM answers from a year-old cutoff. RAG retrieves the latest doc, so the answer reflects today.
How it's used in practice
- Design the citation UI: show which sources the answer came from, linked and clickable, so users verify instead of trusting blindly.
- Design the empty-retrieval state: when nothing relevant is found, say "I couldn't find that in our docs" rather than letting the model guess.
- Budget for the extra latency: retrieval adds a step before generation, so build loading or streaming states that cover the wait.
- Surface freshness: answers are only as good as what's indexed, so show "last updated" on sources and flag stale ones.
Challenges & limitations
- Garbage in, garbage out. RAG only retrieves what you indexed. Outdated, contradictory, or badly chunked docs mean the AI grounds its answer in bad material.
- Retrieval can miss. If vector search pulls the wrong passages or none, the model falls back to guessing, and that failure is invisible to the user.
- It adds cost and complexity. You're now running an embedding model, a vector database, and a retrieval step, plus keeping the index fresh. That's infrastructure, not a prompt tweak.
Free resources
- NVIDIA: What Is RAG? — a plain-English explainer with an interview with the term's lead author.
- Microsoft Learn: RAG in Azure AI Search — architecture and retrieval design for production RAG.
- LangChain: RAG Tutorial — a hands-on build of a retrieval pipeline with code.

