Home › Key concepts › Retrieval-augmented generation (RAG)
Key concept · Walk (intermediate) · the same on every platform
Retrieval-augmented generation (RAG)
Find the right passages first, then let the model answer from them, with citations.
What it is
RAG has two steps. Retrieval searches your documents (by meaning, keywords or both) for passages relevant to the question. Generation gives those passages to the model and asks it to answer only from them and cite them.
Why it matters
It lets a model answer from your own, current documents without retraining, and lets people check the source.
An example
'What is my excess for windscreen damage?' retrieves clause 4.2 of the customer's policy, and the answer quotes it.
The common mistake
Blaming the model for wrong answers when retrieval never found the right passage. Measure retrieval separately.
Where you meet it on each platform
The idea stays the same; only the product name changes.
| Job | AWS | Azure | Google Cloud | Databricks | Open source |
|---|---|---|---|---|---|
| Vector searchfind passages by meaning, not exact words | OpenSearch Serverless / Aurora pgvector | Azure AI Search | Vertex AI Vector Search / AlloyDB | Vector Search | pgvector or Qdrant |
| Model APIcall a large language model | Amazon Bedrock | Azure OpenAI in Microsoft Foundry | Gemini on Vertex AI | Foundation Model APIs | Ollama, or a free hosted open model |
Related ideas
Where it shows up
Part of the Walk level on these paths: AI Engineering (knowledge) · LLM Engineering (adapting models).