RAG (Retrieval Augmented Generation)
Updated
Also known as: Retrieval Augmented Generation, RAG, Retrieval-Augmented
Retrieval Augmented Generation (RAG) is a technique that enriches large language models with current external sources. Instead of drawing solely on the knowledge stored during training, a retrieval phase is triggered first for the search query: relevant web sources are located and retrieved, their content is passed to the LLM as context, and the model answers on the basis of this fresh data. RAG is the technical basis of almost every modern AI search engine — ChatGPT Search, Perplexity, Gemini and Google AI Overviews all use variants of it.
How RAG works technically
- Query processing — the user request is converted into a semantic search query.
- Retrieval — relevant web sources are searched via a search API or a vector index and the top-K hits are retrieved.
- Context construction — the full text (or extracts) of the sources is fed into the LLM prompt, often with source IDs for later linking.
- Generation — the LLM composes the answer on the basis of the context, ideally with numbered source references.
- Citation mapping — the source IDs mentioned are translated into clickable links.
What RAG means for GEO
RAG is the mechanism that makes the elusive question ”how does my domain get into an AI answer?” answerable: while pre-training knowledge is static and hard to influence, the retrieval phase is live and can be shaped — through classic SEO. If my page ranks in the top 10 for the main keyword and is cleanly structured, it is highly likely to be included in the retrieval phase and made available to the model as a source. Classic SEO plus citation readiness optimisation is therefore the direct entrance to RAG-based AI search.
What governs source selection in RAG
- Classic search engine ranking — usually the top 10 as the pool.
- Semantic similarity to the question via embeddings.
- Source quality filters — domain authority, spam filters, E-E-A-T.
- Freshness — for time-critical topics, current sources are preferred.
- Diversity — some systems enforce sources from different domains in order to avoid single-source bias.
- Structural quality — an easily parsable HTML structure with clear H2s helps in extracting the relevant answer passage.
Example from practice
Example: a specialist domain ranks in position 5 for ”What is RLHF”. For a Perplexity query on the topic, the RAG pipeline runs: the top 8 Google hits are retrieved, their content is parsed and ranked semantically. The specialist domain is selected as one of the three main sources because of its clear H2 structure, an explicit definition in the first paragraph and cited sources — and is linked in the answer as source 1. Effect: after four weeks, the direct referral traffic from Perplexity for this single term is higher than the classic Google click from position 5.
Frequently asked questions
What does RAG mean?
Where is RAG used in practice?
How does RAG work technically?
What is the difference between RAG and fine-tuning?
How do you optimise content for RAG systems?
Used in rankmio for
Citation readiness check in the page analysis
Free SEO & GEO Check
SEO score, AI visibility and citation readiness of your website in 30 seconds — no registration required.
Ready to optimize your website?
Register for free, get 10 credits and start right away.
Register now