In short. Retrieval-augmented generation supplies retrieved document context to a language model when it generates an answer.
Definition: Retrieval-augmented generation (RAG) combines document retrieval with a language model that generates an answer using the question and retrieved material. Retrieved information supplies context for the answer.
Key facts
- Patrick Lewis and colleagues introduce RAG models using a searchable Wikipedia collection in their paper submitted on 22 May 2020.
- As of 17 October 2026, Microsoft's .NET documentation describes making data available through RAG without first training the model on it.
- As of 17 October 2026, Microsoft's Azure AI Search documentation describes hybrid retrieval, which combines keyword search with vector search based on numerical representations of content.
- As of 17 October 2026, Google's website guidance requires indexing and eligibility for a search snippet before a page can appear as a supporting link in AI Overviews or AI Mode.
How does the retrieval and answer workflow work?
A chunk is a smaller piece of a source document. Microsoft's basic RAG process divides documents into chunks, converts them into searchable data, and stores them for retrieval. Relevant material then accompanies the question in a prompt, the input supplied to the language model.
This schematic follows that documented process:
Source documents -> text chunks -> searchable storage
Question -> retrieval of relevant context
Question + retrieved context -> language model -> response
Retrieval can involve different search methods. Azure AI Search's overview describes keyword searches and searches using embeddings, numerical representations of content. Hybrid queries combine results from both methods. The documentation also describes semantic ranking, which reorders results according to meaning. These choices affect which passages reach the answer-writing stage.
Microsoft identifies limited model input capacity as a retrieval constraint: the system needs to return concise, relevant material. For private documents, its overview also requires access controls so that retrieval respects user permissions.
What does the original RAG paper describe?
The Lewis et al. paper combines a pretrained model's stored knowledge with an external Wikipedia index. An index is a searchable representation of a document collection. A retrieval component accesses this collection for language generation.
The paper compares a formulation that uses the same retrieved passages throughout a generated sequence with another that can vary passages during generation. Its architecture makes retrieved documents part of the generation process.
What does RAG change for a website?
For a public website, Google's AI features documentation provides concrete eligibility requirements for its own search features. It recommends allowing crawling through robots.txt and hosting infrastructure, exposing important content as text, and making pages accessible through internal links.
Google also says that AI Overviews and AI Mode may issue several related searches across subtopics and data sources while developing a response. This helps explain why retrieval can involve more than the wording of the initial question. Google requires no additional technical markup for these features. A practical review therefore starts with crawl access and the availability of the page's substantive text.
Related terms
FAQ
Does RAG require training a model on my documents?
Microsoft's .NET guidance describes supplying retrieved data through prompts without first training the model on that data.
How are retrieved passages connected to citations?
Microsoft's RAG process stores links to source data as metadata associated with chunks. This information helps the model generate citations in its responses.
Does every RAG workflow use a single search?
Microsoft's Azure overview distinguishes a classic single-query workflow from agentic retrieval, in which a model breaks a complex question into focused subqueries executed in parallel.
Sources
- Patrick Lewis et al., "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks", submitted 22 May 2020
- Microsoft Learn, "Retrieval-augmented generation (RAG) provides LLM knowledge", 14 September 2026
- Microsoft Learn, "Retrieval-augmented generation (RAG) in Azure AI Search", 4 August 2026
- Google Search Central, "AI features and your website", 10 December 2025
Check how a page reads to answer engines. Open the GEO score analyzer