What is retrieval-augmented generation (RAG)?
Retrieval-augmented generation, or RAG, is a pattern where a system first retrieves documents relevant to a question and then asks a model to write the answer using those documents. The reply can cite the retrieved pages. RAG is an architecture for fresh, source-backed answers, not a promise that your page will be the one retrieved.
Why it matters for AI visibility
Many live AI answers are not a pure replay of training data. A retriever selects pages, and the model composes from that set. That is why a new or updated URL can appear in an answer without waiting for a model to be retrained, and why two runs can cite different pages. For AI visibility, RAG means the retrievable page matters: it has to be fetchable, relevant to the question, and clear enough to quote. It also means you compete with every other page the retriever might select, including rivals, reviews, and community threads. You will not see the full candidate set. You see the answer and, when the product shows them, the citations. Optimize the page for the question a buyer asks, keep facts consistent with the rest of the web, and measure by logging citations over time.
Example
A documentation page published this week is cited in Perplexity for a how-to prompt, while a chat answer with browsing turned off still describes the product from older knowledge and shows no link. The first path behaved like RAG. The second did not. They should not be scored as the same event.
Related terms
Grounding is the aim of using those retrieved pages so claims stay attached to sources. Training data versus live retrieval explains why some answers have no fresh link. Hallucination is what still happens when retrieval is missing, ignored, or wrong.