Retrieval-augmented generation (RAG)

Retrieval-augmented generation (RAG) is an architecture that combines a search or retrieval step with a language model: instead of answering solely from training data, the system fetches relevant passages at query time and inserts them into the prompt so the model can generate a response grounded in current, specific source material. Most AI search and answer products use some form of RAG.

A typical RAG pipeline embeds the user’s query, searches a vector or web index for matching passages, ranks and trims the results to fit a context window, and passes them to the model along with instructions to answer using that material. This lets systems answer questions about events or pages published after training cutoff, and lets them cite sources directly.

For AEO, RAG is why individual pages can influence individual answers in real time: a page indexed and retrieved during RAG can be summarized, quoted, or linked within seconds of publication, without waiting for a model retrain. It also means visibility is volatile - the same query can retrieve different passages, and therefore produce different citations, from one session to the next.

See where you stand.

Run a free scan and get your own answer-engine scorecard.