Glossary · How AI reads content
Retrieval-Augmented GenerationRAG
A technique where a model retrieves relevant documents before answering, grounding its response in real sources instead of memory alone.
Retrieve, augment, generate
Question
“Does yourbrand support multi-entity?”
Retrieve · knowledge store
- 01docs · multi-entity setup
- 02pricing page
- 03changelog
Generate · grounded answer
Yes — yourbrand supports multi-entity accounting1, set up in its onboarding.
the answer is grounded in retrieved sources, not the model’s memory
Retrieval-Augmented Generation (RAG) is a technique that gives a language model access to knowledge it wasn’t trained on. Before it answers, the system retrieves the most relevant documents from an external store and puts them in front of the model, so the answer is built from real sources rather than from memory alone.
What RAG actually means
RAG was introduced by Lewis et al. at Facebook AI (now Meta) in 2020. It combines two parts: a retriever that finds relevant documents in an external knowledge store — often a vector database of embeddings — and a generator, which is a large language model. Neither is new on its own; the idea is to wire them together so the model always writes with the right source material in hand.
The name describes the flow. Generation is augmented by retrieval: instead of asking the model to recall an answer from its weights, you first fetch the passages that actually contain it, then ask the model to compose a response from them.
How it works at query time
When a question comes in, a RAG pipeline runs three steps in order:
- Retrieve.Search the knowledge store for the documents most relevant to the question — typically by comparing the query’s embedding against the stored document embeddings and taking the closest matches.
- Augment.Insert those retrieved passages into the model’s prompt as context, alongside the original question. This is the “augmentation” — the model now sees the source material it needs.
- Generate. The language model writes an answer grounded in that retrieved context, often with citations pointing back to the documents it used.
Why it matters
RAG addresses the two biggest weaknesses of a language model used on its own:
- It sharply reduces hallucination. Because the answer is grounded in real, retrieved sources, the model has less room to invent — and the citations let a reader check the claim against the document it came from.
- It uses fresh or proprietary knowledge without retraining.New facts, internal docs, and changing details live in the knowledge store, so the system can answer from them the moment they’re added — no new training run required.
- It makes attribution possible. Every answer can point back to the specific passages it was built from, which is what turns a confident paragraph into a sourced, verifiable one.
RAG vs. fine-tuning
Both are ways to give a model knowledge it didn’t start with, but they work at opposite ends. Fine-tuning changes the model; RAG changes what the model is given to read.
Why RAG matters for GEO
Most modern answer engines — AI search, ChatGPT Search, Perplexity — run RAG-style pipelines under the hood. They retrieve pages relevant to a buyer’s question, feed those pages to a language model, and generate a cited answer from them. That mechanism is the reason being retrievable and quotable is the core of Generative Engine Optimization.
The logic is direct: if your content is in the set of documents the engine retrieves, the model can generate from it and cite you. If it isn’t retrieved, you cannot be part of the answer, no matter how good the page is. Getting into that retrieved set — with clear, self-contained, verifiable passages — is exactly the work GEO describes.
Frequently asked
- What problem does RAG solve?
- A language model only knows what was in its training data, which is fixed at training time and has no notion of your private documents. That leads to two failures: it can't answer from fresh or proprietary knowledge, and when it doesn't know something it may confidently invent an answer. RAG fixes both by retrieving relevant documents at query time and having the model generate from that real, citable context — so answers stay current and grounded in sources rather than in the model's memory alone.
- How is RAG different from fine-tuning?
- Fine-tuning bakes new knowledge into the model's weights by continuing to train it — it's expensive, and whatever it learns is static until you retrain. RAG leaves the model untouched and instead fetches knowledge from an external store at the moment of the question. Updating what a RAG system knows is as cheap as editing a document; updating a fine-tuned model means another training run. The two are complementary: fine-tuning is well suited to teaching style or behavior, RAG to supplying facts that change.
- Do AI search engines use RAG?
- Most modern answer engines — AI search, ChatGPT Search, Perplexity — run RAG-style pipelines: they retrieve pages relevant to your question, feed them to a language model as context, and generate an answer that cites those sources. That is precisely why being retrievable and quotable matters. If your content is in the set of documents the engine retrieves, the model can generate from it and cite you; if it isn't, you can't be part of the answer.