AI
Retrieval-Augmented Generation
Retrieval-augmented generation (RAG) retrieves relevant source material at question time and supplies it to a language model as context for an answer.
Definition
Retrieval-augmented generation, or RAG, combines a retrieval step with text generation. Source documents are prepared for search—often split into passages, indexed and updated—then a user question retrieves relevant passages that enter the model prompt. The answer can point to those passages, but it is not guaranteed to be correct simply because they were retrieved.
Unlike fine-tuning, RAG does not change model weights to teach it new facts. Unlike ordinary search, it synthesizes an answer from retrieved material rather than only listing results. Microsoft Foundry’s RAG overview describes this grounding pattern; retrieval quality, model behavior and source permissions all affect the result.
In practical context
Hypothetical example: a staff assistant answers a procurement question using approved policy documents. The pipeline indexes the current policy and its effective date, filters out documents the employee may not access, retrieves the matching section and cites it in the response. If the evidence is absent or contradictory, the assistant should say so and route the question to a person.
Before implementation ask: who owns document updates and deletion? Can access rules survive indexing? Which languages and document formats matter? How will a test set measure missed passages as well as unsupported answers? A long prompt with pasted files may be simpler for a small, stable corpus; RAG adds indexing, latency, cost and monitoring work.
Why it matters
A useful RAG evaluation separates retrieval relevance from whether the generated answer is supported by the retrieved evidence.
Common misconceptions
RAG is the same as fine-tuning.
Questions teams ask before they start
When should we choose RAG over fine-tuning?
Choose RAG when the answer depends on changing, attributable documents. Consider fine-tuning for behavior or format adaptation, not as the default way to keep a policy corpus current.
Will citations eliminate hallucinations?
No. A model may cite a passage that does not support its conclusion. Check both whether the right material was retrieved and whether the answer actually follows from it.
What makes enterprise RAG difficult?
Document ownership, parsing, multilingual retrieval, permission filtering, refresh and deletion, evaluation and monitoring. The search index must not expose content the requester cannot read.
Related services
AI Strategy & Readiness
Choose use cases, governance boundaries, and platform direction before AI effort fragments across teams.
Knowledge Assistants & RAG Systems
Build retrieval-based assistants that connect trusted sources, permissions, grounding, and citations into answer experiences that hold up in real operations.