Glossary
RAG (Retrieval-Augmented Generation)
A pattern where an AI model retrieves relevant information from a knowledge base before generating a response, grounding its output in real source data rather than relying purely on what it learned during training.
Retrieval-Augmented Generation (RAG) is the design pattern of giving an LLM access to a knowledge base — your docs, past tickets, product info, company data — at inference time, so its responses are grounded in that real source data rather than just what the model learned during training.
The flow looks like:
- Query arrives. "How do I reset my password?"
- Retrieval. System searches the knowledge base for relevant documents (typically using vector similarity + sometimes keyword search).
- Context assembly. Top N relevant docs get included in the prompt to the LLM.
- Generation. LLM produces a response grounded in those retrieved docs, with citations.
- Response. Customer gets an answer based on the actual product docs, not the model's general training.
- Hallucination. Without grounding, LLMs confidently make up plausible-sounding wrong answers. With RAG, they can only answer from real sources.
- Freshness. LLM training data has a cutoff date. RAG lets you give the model up-to-date information about your business.
Example
A customer support agent at a SaaS company has its prompt augmented with the top 5 most relevant help-center articles + the customer's last 10 tickets every time it responds. When the customer asks "why isn't my integration working," the agent's response is grounded in the actual docs for that integration + the customer's actual history with the product.
Related terms
Apply this
Get a real automation audit on your business.
Pay $4,500, fill an intake, get a Claude Opus-written strategic roadmap inside a week.
Start the audit →