How does an AI search engine turn a question into an answer?
An AI search engine runs 6 stages: it interprets the query, expands it into related searches, retrieves pages from a web index, reranks the passages, writes an answer grounded in them, and links each claim to its source. Classic search stops after ranking.
An AI search engine is a search system that retrieves web pages and uses a large language model (LLM) to write an answer that cites them. The language model is the part that writes; the search system is the part that finds. Google AI Overviews, Google AI Mode, ChatGPT search, Perplexity and Microsoft Copilot all combine the two, and all of them move a question through the same sequence of work:
- Query understanding — the model reads the question and decides whether it needs fresh web data at all.
- Query fan-out — the question is rewritten into one or more search queries, often several at once on different subtopics.
- Retrieval — each query pulls candidate pages and passages from a web index that crawlers built earlier.
- Reranking — a second model rescores the retrieved passages against the query and keeps the best.
- Grounded generation — the language model writes the answer from the passages placed in its prompt.
- Citation — the engine links spans of the answer back to the sources that support them.
A classic search engine runs a version of stages 2 to 4 and then hands the ranked list to the user, who opens pages and reads them. An AI search engine does the reading itself. The output changes from a list of ten links to a written answer with a few sources attached, and the unit of success for a website changes with it: from a rank position to a citation inside the text.
The stages are not equally visible. Google, OpenAI and Perplexity document which crawlers feed their indexes, and Google documents its fan-out and grounding steps. No engine publishes its reranker, the number of passages it reads or the limit on citations per answer. The sections below state what each engine documents and mark where the documentation stops.
What happens to a query before any page is retrieved?
The model first decides whether the question needs fresh web data, then rewrites it into one or more search queries. For broad questions, Google AI Mode issues many concurrent sub-queries on subtopics, a step Google names query fan-out.
Query understanding is the stage where the engine interprets what was asked. Google’s developer documentation for grounding Gemini with Google Search describes the decision in plain steps: “The model analyzes the prompt and determines if a Google Search can improve the answer.” Then: “If needed, the model automatically generates one or multiple search queries and executes them.”
Two things follow from those sentences. First, search is conditional. A question the model can answer from what it learned in training, such as a stable definition, may produce an answer with no retrieval and no citations. Second, the query the engine sends is not the question the user typed. Microsoft describes the same behaviour for Copilot: it identifies the terms where web information would help and generates a search query that “is different from the user’s original prompt”, consisting of “a few words informed by the user’s prompt”. A page is therefore matched against the engine’s rewritten query, not against the user’s exact phrasing.
Query fan-out: one question, many searches
Query fan-out is the step that turns one question into several searches. Google’s AI optimization guide defines it as “a set of concurrent, related queries generated by the model to request more information and fetch additional relevant search results to address the user’s query.” Its example starts from “how to fix a lawn that’s full of weeds” and fans out into:
- “best herbicides for lawns”
- “remove weeds without chemicals”
- “how to prevent weeds in lawn”
At Google I/O on 20 May 2025, Google said AI Mode “uses our query fan-out technique, breaking down your question into subtopics and issuing a multitude of queries simultaneously.” The same announcement said Deep Search, a mode for research questions, “can issue hundreds of searches … and create an expert-level fully-cited report in just minutes.” Each sub-query retrieves its own results, so a page can enter an answer by matching a sub-query the user never typed. The mechanics, the AI Mode examples and how to cover sub-queries are covered in the guide to the query fan-out step.
Where do AI search engines get the pages they read?
AI search engines read pages from a search index built by crawlers. Google AI Overviews and AI Mode use the Google Search index. ChatGPT search relies on pages surfaced by OAI-SearchBot, and Perplexity on pages surfaced by PerplexityBot.
Retrieval is the stage where each query pulls candidate documents from an index. A web index is a stored, searchable copy of pages that a crawler — an automated program that requests pages over HTTP — has fetched and processed. Retrieval does not visit the live web page by page at query time; it searches what the crawler already collected. That is why a page blocked to the relevant crawler, or never indexed, cannot be retrieved however well it answers the question.
A passage is the unit that retrieval and the later stages work with: a paragraph, a list or a table section rather than a whole page. Engines split pages into passages so that the model receives the few hundred words that answer a query instead of an entire article.
| Engine | Index and crawler | Operator documentation |
|---|---|---|
| Google AI Overviews and AI Mode | Google Search index, crawled by Googlebot | Google's AI optimization guide: RAG retrieves "relevant, up-to-date web pages from our Search index"; Google-Extended does not affect inclusion in Google Search |
| ChatGPT search | Pages surfaced by OAI-SearchBot | OpenAI: OAI-SearchBot is used to surface websites in ChatGPT's search features |
| Perplexity | Pages surfaced by PerplexityBot | Perplexity: PerplexityBot surfaces and links websites in Perplexity search results |
| Microsoft Copilot | Bing search service | Microsoft: Copilot sends generated search queries "to the Bing search service to ground responses in web data" |
The table shows that each engine has its own gate. Google’s AI features reuse the ordinary Search index, so a page that Googlebot can crawl and index is already in the pool. Google-Extended, the token that controls use of content for Gemini models, has no effect on Search inclusion and therefore does not control AI Overviews or AI Mode. OpenAI and Perplexity each run a separate search crawler, and blocking it removes a site from that engine’s retrieval pool while leaving Google untouched. Copilot retrieves through Bing, so the Bing index is its gate.
How are retrieved passages reranked?
A reranker is a second model that rescores each retrieved passage against the exact query and reorders the list. Only the top-scored passages reach the language model, so a page can be retrieved and still never be read or cited.
Retrieval is built for speed across billions of documents, so its first pass is broad and approximate. Reranking is the precision pass. The reranker reads the query and one candidate passage together and outputs a relevance score; the candidates are then sorted by that score and cut to a short list.
The method has a clear research origin. In “Passage Re-ranking with BERT” (arXiv 1901.04085, 2019), Rodrigo Nogueira and Kyunghyun Cho fed each query–passage pair into BERT, a language model, and trained it to judge relevance. On the MS MARCO passage ranking benchmark the approach improved on the previous best result by 27% relative in MRR@10, a metric that rewards putting the correct passage near the top of the list. That figure is the paper’s result on a benchmark, not a measurement of any engine in production.
None of the engines on this page names its reranking model or states how many passages survive the cut. What the stage explains is a pattern site owners observe: a page that ranks in classic search is not guaranteed a citation, because ranking a page and selecting a passage from it are different judgements. A passage that answers the rewritten query in its own words, without depending on the paragraphs around it, is the kind a reranker can score highly. The signals involved in that choice, and how they differ by engine, have their own page.
How does the model write a grounded answer?
The language model writes the answer from the retrieved passages placed in its prompt, a method called retrieval-augmented generation (RAG) or grounding. Google defines grounding as relying on its core ranking systems to fetch relevant, up-to-date pages from the Search index.
Retrieval-augmented generation was named in “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks” by Patrick Lewis and colleagues (arXiv 2005.11401), published at NeurIPS 2020. The paper combined two kinds of memory. Parametric memory is the knowledge stored in a pre-trained sequence-to-sequence model’s weights. Non-parametric memory is a dense vector index of Wikipedia, searched by a neural retriever. At answer time the retriever fetched relevant passages and the generator wrote its output conditioned on them. The authors reported that this produced more specific and more factual language than a model working from its weights alone.
Production AI search keeps the same structure and replaces the Wikipedia index with a web-scale one. Google’s AI optimization guide describes its version as RAG, “also known as grounding”, which relies on core Search ranking systems “to retrieve relevant, up-to-date web pages from our Search index.” The Gemini API documentation describes the step from the model’s side: “The model processes the search results, synthesizes the information, and formulates a response.”
Grounding changes what the model can say. Without retrieval, the model answers from training data that stops at a fixed date and cannot point to a source. With retrieval, the answer draws on pages fetched for this question, and every claim has a candidate source. The model still writes in its own words — it paraphrases, merges and orders the passages — so the passage that shaped a sentence and the wording of that sentence are rarely identical.
How do citations get attached to the answer?
Citations attach to specific spans of the answer text. Each generated claim is mapped back to the passage that supports it, and the engine displays that source as a numbered marker, a link card or an inline link beside the sentence.
A citation, in an AI answer, is a link from a piece of the answer to the page it came from. The Gemini API shows the mechanism most plainly. Its grounded responses carry url_citation annotations with a start_index and an end_index, which mark where the cited text segment begins and ends; developers use them to display sources in their interface. The span, not the whole answer, is what points to a source.
Illustration · not a real engine response
When did AI Overviews launch in the US?
AI Overviews appear above the classic results for some queries. Google launched AI Overviews to all users in the US in May 2024.1 The summary links to the pages it drew on.
- 1 Source page · annotation start_index → end_index
Engines render the same underlying link differently. Google says its AI features show “prominent, clickable links to relevant web pages that support the information in the response.” ChatGPT search places source links inline and in a source list, and Perplexity numbers its sources beside each sentence. In each case the attribution is claim-level: a page is credited for the sentence it supports, and a page that shaped the answer without supporting a specific span may go uncredited. Which pages end up in that position is the subject of how AI search chooses sources.
Every one of these six stages runs on pages a crawler fetched first — which is where a website owner enters the pipeline.
Which stages can a website owner influence?
A website owner influences 4 of the 6 stages — retrieval, reranking, generation and citation — through crawl access, index eligibility, passage retrievability and citation-worthy wording. The fan-out queries, the reranker and the model's weights stay under the engine's control.
| Stage | Controlled by | Site-owner lever |
|---|---|---|
| Query understanding | Engine: the user's prompt and the model's decision to search | None |
| Query fan-out | Engine: the model writes the sub-queries | None; coverage of likely sub-topics raises the number of queries a site can match |
| Retrieval | Engine index, fed by the site's crawl access | Crawl access for each engine's search crawler; index eligibility — indexed and eligible to show with a snippet |
| Reranking | Engine's reranker model | Passage retrievability: answers stated in self-contained passages that match the question |
| Grounded generation | Engine's language model | Citation-worthy wording: specific facts, numbers and named sources the model can use |
| Citation | Engine's attribution step | Citation-worthy wording: one clear claim per sentence, traceable to the page |
The table sorts the pipeline into two halves. The first two stages happen inside the engine before any site is involved, so no on-site change alters them. The last four stages all act on material the site supplies, and each has a lever that can be checked.
For Google, the entry requirement is written down. The AI optimization guide says a page “must be indexed and eligible to be shown in Google Search with a snippet” to appear in AI features, and Search Console has a setting for generative AI features, so check that setting before diagnosing anything else. For ChatGPT search, Perplexity and Copilot, the equivalent requirement is access for OAI-SearchBot, PerplexityBot and Bingbot.
The work of pulling these levers deliberately — access, eligibility, answer-first passages and evidence the model can quote, then measuring the citations that result — is the practice called GEO.
Explore each stage in depth
The guides below take one part of the pipeline each and go further than this overview, with the engines’ own documentation and the evidence behind every claim.
What Is Query Fan-Out?
How one prompt becomes many searches, with Google's AI Mode examples and a method for covering sub-queries.
How AI Search Chooses Sources to Cite
Crawl access, retrievability, passage relevance, authority and freshness, and how each engine weighs them.
Is SEO Dead?
What AI answers changed after AI Overviews launched in May 2024, what they did not, and what the data shows.
More guides in this section are being written. Not yet published: passage retrieval, retrieval-augmented generation, grounding, reranking, embeddings, training data versus retrieval, the knowledge graph, zero-click search, hallucinations and the history of AI search.
Each engine applies these stages with its own crawler, index and citation style; the differences are laid out in AI search engines compared. For the question most site owners ask after reading about this pipeline, the evidence is collected on the page about whether AI search ends SEO.
Frequently asked questions
Does every AI answer run a web search?
No. Google's Gemini API documentation says the model first analyzes the prompt and determines whether a Google Search can improve the answer. Questions the model can answer from its training, such as simple definitions, can be answered without retrieving any page.
Is AI search different from enterprise AI site search?
Yes. Enterprise AI site search answers from a company's own documents, such as help centres or intranets. Public AI search engines such as AI Overviews, ChatGPT search and Perplexity answer from a web index built by crawlers, so any public site can be cited.
Do AI search engines answer from training data or live pages?
Both, depending on the question. The model always writes with knowledge learned in training, but when it runs a search it grounds the answer in pages retrieved at that moment. Only retrieved pages can be linked as citations in the answer.
Related guides
Generative engine optimization (GEO)
The practice built on this pipeline: how sources get retrieved, selected and cited, and how to measure it.
AI search engines compared
Each engine's crawler, index, citation style and reporting, side by side.
Sources
- Google Search Central — Optimizing your website for generative AI features on Google Search (updated 10 July 2026)
- Google — AI Mode in Google Search: Updates from Google I/O 2025 (20 May 2025)
- Google AI for Developers — Grounding with Google Search (Gemini API)
- Lewis et al. — Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (arXiv 2005.11401, NeurIPS 2020)
- Nogueira & Cho — Passage Re-ranking with BERT (arXiv 1901.04085)
- OpenAI — Overview of OpenAI Crawlers
- Perplexity — Perplexity Crawlers
- Google — Google's common crawlers
- Microsoft Learn — Data, privacy, and security for web search in Microsoft Copilot and Microsoft Copilot Chat