Technical Aug 05, 2026 · 4 min read

How AI Assistants Decide Which Sources to Cite: A Technical Primer on RAG Retrieval

A clear breakdown of the retrieval-augmented generation pipeline—embedding similarity, reranking, and context window limits—so GEO practitioners understand what actually determines citation inclusion.

Key takeaways
  • AI assistants use retrieval-augmented generation (RAG) to pull external sources before generating answers
  • Embedding similarity scores determine which documents make the initial candidate pool
  • Reranking models then prioritize candidates based on relevance, recency, and authority signals
  • Context window limits force hard cutoffs—only a fraction of retrieved documents get cited
  • Understanding this pipeline reveals what GEO practitioners can actually influence

When a user asks ChatGPT, Claude, or Perplexity about your product category, the assistant does not simply "know" the answer. It retrieves external sources, processes them, and synthesizes a response. This is retrieval-augmented generation—RAG.

For GEO practitioners, understanding this pipeline is not optional. It determines whether your content appears, gets cited, or gets ignored entirely.

The RAG Pipeline in Three Stages

Most production RAG systems follow a consistent architecture. Knowing each stage clarifies where your content can succeed or fail.

1
Embedding & Retrieval
Query converted to vector → cosine similarity search → top-k candidates returned (typically 20-100 documents)
2
Reranking
Cross-encoder model scores each candidate against the query → documents reordered by relevance, authority, recency
3
Context Injection & Generation
Top documents inserted into prompt → model generates answer → citations attached to claims

Stage 1: Embedding Similarity

The first filter is purely mathematical. Your content gets converted into a high-dimensional vector. The user's query becomes another vector. Cosine similarity determines how "close" they are.

This stage is unforgiving. If your content does not embed near the query, it never enters the candidate pool.

What affects embedding similarity:

Factor Impact
Semantic match to query intent High. The embedding model captures meaning, not keywords.
Document chunking strategy High. A 512-token chunk mentioning the topic beats a 4,000-word page where it appears once.
Terminology alignment Medium. Using the same phrasing users search with improves vector proximity.
Document length Low direct impact, but longer documents get chunked—and some chunks may not match.

Research on dense retrieval indicates that semantic similarity models like those based on BERT architectures outperform keyword matching for complex queries (Karpukhin et al., 2020, Facebook AI Research).

Stage 2: Reranking

Initial retrieval returns candidates. Reranking decides the final order.

Cross-encoder rerankers like those in the Cohere Rerank API or open-source models (e.g., BGE-Reranker) score each document against the query using a transformer that processes both together. This is computationally expensive, which is why it happens after retrieval narrows the pool.

Reranking introduces signals beyond pure semantic similarity:

  • Relevance depth. Does the document answer the query directly, or merely mention related terms?
  • Recency. For time-sensitive queries, fresher content often ranks higher. Perplexity explicitly surfaces publication dates.
  • Source authority. Some systems weight domains by historical link signals or editorial trust scores.

The exact weighting is proprietary. But the principle holds: making the initial candidate pool is necessary. Surviving reranking is what gets you cited.

Stage 3: Context Window Limits

Here is the hard constraint most GEO practitioners underestimate.

Large language models have finite context windows. GPT-4 Turbo supports 128,000 tokens (OpenAI, 2023). Claude 3 supports up to 200,000 tokens (Anthropic, 2024). But in practice, RAG systems inject far less—often 4,000 to 16,000 tokens of retrieved context.

Why? Cost, latency, and diminishing returns. Research from Stanford's HELM benchmark suggests that model performance degrades when context is cluttered with marginally relevant documents (Liang et al., 2022).

This means even if your content survives retrieval and reranking, it competes for limited slots. A system retrieving 50 candidates may only inject 5-8 into the final prompt.

Context Window Allocation (Illustrative)
System prompt
Retrieved docs
User query
Response buffer

What GEO Practitioners Can Influence

Not everything is within your control. Model architectures, reranking weights, and context allocation are decided by AI providers.

But the inputs are yours:

  1. Semantic clarity. Write content that embeds close to how users phrase queries.
  2. Chunking-friendly structure. Use clear headings, concise paragraphs. Make each section self-contained.
  3. Direct answers. Content that states claims plainly reranks better than content that buries them in caveats.
  4. Freshness. Update pages. Publication dates matter for recency-weighted queries.
  5. Crawlability. If AI systems cannot access your content, none of this applies.

Measuring What Matters

Understanding the pipeline is one step. Knowing whether your content actually appears in AI answers is another.

Mentio tracks whether your brand is mentioned and cited across ChatGPT, Claude, and Perplexity. No speculation about embeddings—just direct visibility data. You see which queries surface your content, which competitors appear alongside you, and where you are absent.

The RAG pipeline is a black box. But the outputs are observable.

Frequently asked questions

How many sources do AI assistants typically cite per answer?

It varies by query complexity and system design. Perplexity often cites 4-8 sources per answer. ChatGPT with browsing enabled typically cites fewer. The exact number depends on retrieval settings, context window allocation, and whether the model deems multiple sources necessary for the claim.

Does link authority (like PageRank) affect RAG retrieval?

Traditional PageRank is not directly used in most RAG embedding systems. However, reranking stages may incorporate domain-level trust signals. Perplexity has indicated it considers source reliability, though exact methodologies are not public. Link authority likely influences which pages get indexed and crawled in the first place.

Can I optimize content specifically for one AI assistant over another?

Each system uses different retrieval infrastructure, embeddings, and reranking models. Optimizing for "ChatGPT specifically" is not practical—the underlying systems change frequently, and you cannot control model updates. Focus on semantic clarity and direct answers. These principles transfer across systems.

See how AI engines answer for your brand.

Mentio tracks whether ChatGPT, Claude and Perplexity mention and cite you — own your data, self-host anytime.

Start tracking