7 min read · Updated July 2026
When you ask Perplexity a question and get a five-sentence answer with three citations, an entire pipeline fired in under two seconds. Understanding how AI search works behind the scenes is not academic — it tells you precisely where your website can win or lose visibility. This guide walks through the three stages every AI search system shares, what happens inside each, and where your optimization effort actually moves the needle. If you are new to the topic, start with our complete beginner’s guide to AI search, then come back for the machinery.

The Three-Stage AI Search Pipeline
Every major AI search system — ChatGPT search, Perplexity, Gemini, Copilot, and Google AI Mode — follows the same core pipeline: retrieve candidate sources, select the best few, and generate a cited answer. The brands differ; the architecture barely does.
This design is called retrieval-augmented generation (RAG). Instead of answering purely from training data, the model is handed fresh documents at question time and instructed to ground its answer in them. That grounding step is why citations exist — and why your content can appear in an answer written seconds ago.
Stage 1: Retrieval — Getting Into the Candidate Pool
When a question arrives, the system first rewrites it into one or more search queries — a step often called query fan-out. Those queries hit a search index: Bing powers ChatGPT search and Copilot, Google powers Gemini and AI Mode, and Perplexity blends its own crawl with partner indexes.
The retrieval stage returns dozens of candidate pages. To be among them you need the unglamorous fundamentals:
- Crawlability — bots can reach and render your pages (see our crawlability guide)
- Indexation — pages are actually stored in the underlying index
- Relevance — your content matches the rewritten queries, which are usually longer and more specific than classic keywords
- AI crawler access — GPTBot, ClaudeBot, and PerplexityBot are not blocked in robots.txt
This is why technical SEO did not die with AI search — it became the entry ticket. Google’s own documentation on how search works still describes the crawl-index-serve foundation everything else sits on.
Stage 2: Selection — Surviving the Cut
From dozens of candidates, the system selects a handful — typically three to eight — to actually read. Selection weighs relevance to the specific question, domain authority and consistency on the topic, freshness, and how directly a page appears to answer.
Two practical implications stand out. First, topical depth compounds: sites repeatedly associated with a subject get selected more often, which is the engine behind topical authority. Second, page-level clarity beats site-level fame for specific questions — a focused, well-structured article from a smaller site regularly outranks a generic page from a big one. We break down the specific signals in Ranking Factors for AI Search.
Stage 3: Generation — How Answers Get Written and Cited
The selected pages are chunked into passages and fed into the language model’s context window along with the user’s question. The model writes a synthesized answer and attaches citations to the passages that support each claim.
Here is the part most people miss: models cite passages, not pages. A 2,000-word article is only as citable as its clearest 100-word passage. Content that wins at this stage tends to have:
- Self-contained sections that make sense out of context — what we call chunk-friendly content
- Direct answers stated before elaboration
- Specific facts, numbers, and definitions rather than vague generalities
- Clean HTML structure the parser can segment reliably
The mechanics of which passages earn citations — and why — get full treatment in How AI Citation Systems Work. Anthropic’s citations documentation shows the same passage-grounding pattern from the model side.
Where Your SEO Effort Actually Fits
Map your work to the pipeline and priorities become obvious:
| Pipeline stage | What decides the outcome | Your highest-leverage work |
|---|---|---|
| Retrieval | Index presence, crawl access, query match | Technical SEO, AI crawler access, conversational keyword coverage |
| Selection | Authority, relevance, freshness | Topical clusters, entity consistency, content updates |
| Generation | Passage clarity and extractability | Direct answers, structure, chunk-friendly formatting |
If you need a structured starting point, our AI SEO guide covers strategy end to end, and the retrieval optimization article goes deeper on stage one. For the full topic cluster, browse all AI SEO articles.
- Every AI search product runs the same pipeline: retrieve candidates, select a few sources, generate a cited answer.
- Retrieval is the entry ticket — crawlability, indexation, and AI crawler access decide whether you exist at all.
- Selection rewards topical depth and entity consistency; isolated articles struggle against clustered coverage.
- Models cite passages, not pages — self-contained, direct-answer sections are what actually get quoted.
- Optimize stage by stage: technical foundations first, authority second, extractable structure third.
Frequently Asked Questions
What is retrieval-augmented generation (RAG) in simple terms?
RAG means the AI looks up fresh documents at question time and writes its answer grounded in them, instead of relying only on training data. It is why AI search tools can discuss recent news and why they cite sources — the citations point to the retrieved documents the answer was built from.
Which search indexes power the big AI search tools?
ChatGPT search and Microsoft Copilot retrieve primarily from Bing. Gemini and Google AI Mode use Google’s index. Perplexity operates its own crawler (PerplexityBot) alongside partner data. Ranking well in Google and Bing therefore feeds your visibility in most AI answers downstream.
Does blocking GPTBot stop ChatGPT from citing my site?
Blocking GPTBot stops OpenAI from crawling your content for training and search retrieval, so over time your pages drop out of ChatGPT’s answer pool. Search-time browsing may still occasionally fetch pages via Bing, but sustained visibility requires allowing the relevant crawlers.
Why do AI tools cite some pages but paraphrase others without credit?
Citation systems attach references to passages that directly support specific claims. If your page supplied background understanding rather than a quotable fact or definition, the model may synthesize without citing. Direct, specific, self-contained passages earn citations; vague prose gets absorbed silently.
How fast does new content enter AI search results?
Once a page is crawled and indexed by the underlying engine — often within hours to days — it becomes retrievable. Perplexity and ChatGPT search can cite genuinely fresh pages. Consistent selection, however, builds over weeks as topical and authority signals accumulate.
Conclusion
AI search looks like magic from the outside, but it is a pipeline you can reason about: get retrieved, get selected, get quoted. Audit your site against those three stages and you will know exactly what to fix first. For the strategic layer on top of the mechanics, continue with Ranking Factors for AI Search — or get one plainly-explained trend each week via the Plain Intelligence newsletter.