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:

  1. Query arrives. "How do I reset my password?"
  2. Retrieval. System searches the knowledge base for relevant documents (typically using vector similarity + sometimes keyword search).
  3. Context assembly. Top N relevant docs get included in the prompt to the LLM.
  4. Generation. LLM produces a response grounded in those retrieved docs, with citations.
  5. Response. Customer gets an answer based on the actual product docs, not the model's general training.
RAG is critical for AI automation because it solves the two biggest problems with naked LLMs:
  • 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.
Most production AI automation uses RAG somewhere — customer support agents grounded in product docs, sales agents grounded in past deal history, legal agents grounded in precedent libraries.

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.

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 →