Course lesson · Beginner
How AI Engines Build Answers
AI answer engines build an answer from two places: what the model learned in training, and what it retrieves from the web when the question is asked. Most of your GEO work targets the second, because retrieval is where a page you publish this month can change an answer next month. In Lesson 2 of GEO 101 we follow a question through that pipeline: the decision to search, query fan-out, source selection and citation. We explain why the same prompt gives different answers, and show MentionX data on how often each engine cites anything at all.
In this lesson
- Same question, two answers
- Source one: training data
- Source two: retrieval
- Step by step: what happens after you press enter
- Query fan-out
- How sources get picked and cited
- Why answers vary between runs
- From MentionX data: how often engines cite anything
- Worked example: tracing one Ledgerline answer
- What this means for your content
- Exercise: label five answers
- Quiz
- Sources
Anything marked "Our view" is our interpretation, not documented engine behaviour. Ledgerline, the company in the worked example, is fictional.
Same question, two answers
Ask ChatGPT "what's the best accounts payable software for a mid-sized company?" in the morning. Ask again after lunch in a fresh chat. You'll often get two different lists. One might lead with a vendor the other doesn't mention, and one might show six source links while the other shows none.
That isn't a bug, and it isn't the engine "changing its mind" about you. It's the normal behaviour of a system that combines a probabilistic language model with live search. Once you understand the moving parts, the variation stops being mysterious. You also know which parts you can influence.
Source one: training data
A large language model is trained on a huge body of text gathered up to a cut-off date. From it, the model learns patterns: which words go together, which products get discussed in which contexts, what a typical answer to a typical question looks like. When it answers without searching, it's drawing on those patterns.
Three things follow for brands:
- It's slow. What the model "knows" about you reflects the web as it was before its cut-off. A rebrand, new product or pricing change won't show up until a later model is trained.
- It's diffuse. There's no single page the model "read" about you. It reflects how often and in what context you were discussed across many sources.
- You can't inspect it directly. No citation is attached to knowledge from training. You can only infer it by asking questions with search turned off.
OpenAI documents a separate crawler for training: GPTBot. Disallowing it in robots.txt "indicates a site's content should not be used in training generative AI foundation models" (OpenAI crawlers).
Source two: retrieval
Retrieval-augmented generation (RAG) is the pattern of fetching relevant documents at question time and having the model write from them. The idea was formalised in a 2020 paper by Lewis and colleagues (Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks). Today's answer engines use versions of it: ChatGPT search, Gemini with Google Search grounding, Perplexity, Copilot, and Google's AI Overviews and AI Mode.
Retrieval is where GEO has the most leverage, for three reasons:
- It's fast. A page that's indexed this week can be retrieved this week.
- It's attributable. Retrieved sources are often shown as citations, so you can see which pages fed the answer.
- It runs on search indexes you already understand. Google's AI features draw on Google's index, and Google says a page must be indexed and eligible for a snippet to appear as a supporting link (Google Search Central).
OpenAI runs its own crawler for this purpose, OAI-SearchBot. Its documentation says sites opted out of OAI-SearchBot "will not be shown in ChatGPT search answers, though can still appear as navigational links." It also says it takes about 24 hours from a robots.txt change for its systems to adjust (OpenAI crawlers).
Step by step: what happens after you press enter
Google's documentation for Gemini's search grounding describes the flow plainly (Grounding with Google Search). Other engines differ in detail but follow the same shape:
- The prompt arrives, plus whatever context the product adds: chat history, memory, location, language.
- The model decides whether to search. In Google's words, it "analyzes the prompt and determines if a Google Search can improve the answer." A question like "what is accounts payable?" may be answered from training alone.
- The model writes one or more search queries and runs them. These are rewrites, not your exact words. Google's API returns them so developers can see what was searched.
- Results are processed. The engine reads the retrieved pages, or extracts from them, and decides what to use.
- The answer is written, with citations attached to specific parts of the text. In the Gemini API, each citation links a span of the answer to a source URL.
Two details in that flow matter more than they look. Step 2 means that for some questions you can't win with fresh content, because no search happens. Step 3 means the query that hits the search index isn't your buyer's question. It's the engine's rewrite of it, often several rewrites.
Query fan-out
Google's documentation for site owners says both AI Overviews and AI Mode may use a "query fan-out" technique: "issuing multiple related searches across subtopics and data sources to develop a response" (Google Search Central). Google's Gemini API pricing page confirms the same pattern from the developer side. If the model runs two searches for one prompt, that counts as two billable searches.
Take the buyer question "best AP automation for a 300-person company on NetSuite". It might fan out into searches like:
- AP automation software NetSuite integration
- accounts payable automation mid-market comparison
- AP automation pricing per invoice
- NetSuite bill capture OCR
Those sub-queries are our illustration, not a log of what Google actually ran.
The consequence: the page that gets cited may not be your "best AP software" page at all. It might be your NetSuite integration page, a pricing explainer, or a third-party review that covers OCR accuracy. Pages that answer specific sub-questions cleanly get pulled into answers for broad questions.
How sources get picked and cited
No engine publishes its source-selection logic, so be wary of anyone who claims to know it precisely. What we can say from documentation and observation:
- Indexing is the gate. For Google's AI features, a page that isn't indexed and snippet-eligible can't be a supporting link. For ChatGPT search, a site that blocks OAI-SearchBot won't be shown.
- Relevance to the sub-query matters more than domain size. The GEO paper found the biggest visibility gains went to sources that ranked lower in the original results. Content edits could move a fifth-ranked source up sharply (Aggarwal et al.).
- Citations attach to claims. In the Gemini API, a citation covers a specific span of text. A page that states a clear, checkable fact ("Ledgerline integrates natively with NetSuite and Dynamics 365") is easy to attach to a sentence. A page of vague positioning copy isn't.
- Third-party sources compete with you. Review sites, forums, video and reference sites are retrieved alongside vendor pages.
Our view: think of citation as the engine footnoting a sentence. If no sentence in the answer needs your page as its footnote, you won't be cited, however good the page is.
Why answers vary between runs
Four sources of variation stack on top of each other:
- Sampling. Language models pick each next word from a probability distribution. Settings like temperature control how much randomness there is. Google's Vertex AI documentation notes that even a fixed seed gives deterministic output only on a "best effort" basis (Gemini parameter values).
- Different searches. The model may write different sub-queries from one run to the next, so it retrieves different pages.
- Shifting results. The search index itself changes as pages are published, updated and re-ranked.
- Context. Location, language, logged-in state and memory change what the product sends to the model.
Lesson 5 shows how big that variation is in practice. Across 28 prompt-and-engine pairs re-run over six weeks, 11 flipped between mentioning and not mentioning the same brand. That's why GEO measures rates across repeated runs, never single answers.
From MentionX data: how often engines cite anything
Method. We ran read-only aggregate queries over MentionX's scan records. These covered completed engine runs with an extracted answer from 22 August to 29 October 2026 (UTC): 2,154 runs across 18 tracked projects, mostly B2B software. Engines were called through their APIs with web search or grounding enabled. "Citations" means the source URLs the API returned with the answer. Brands are anonymised.
| Engine (API surface) | Runs | Answers with no citations | Median citations per answer |
|---|---|---|---|
| Perplexity Sonar | 73 | 4% | 10 |
| Google AI Mode | 214 | 13% | 3 |
| OpenAI with web search | 864 | 30% | 6 |
| Copilot (Bing grounding) | 100 | 47% | 1 |
| Gemini with Google Search grounding | 803 | 51% | 0 |
| DeepSeek (web search) | 100 | 99% | 0 |
What it shows. "Search-on" doesn't mean "always cites". Perplexity almost always cites, and generously. Gemini through the API decided not to ground about half the time, which matches Google's description of the model deciding whether a search would help. For engines like that, a large share of answers depends on what the model already learned.
A second cut. We took the 1,684 runs on unbranded prompts (excluding brand-specific and comparison prompts, which name the brand). Answers with no citations named the tracked brand 25% of the time. Answers with citations named it 27% of the time. Answers without citations also named slightly more tracked brands on average (1.44 vs 1.11).
Caveats. API results can differ from consumer apps, which add their own context and settings. Some engines had only a few days of data (Perplexity, Copilot and DeepSeek runs all fall on 26 October 2026). The engine mix is uneven, and these are 18 projects, not the market.
Our view: the second cut is the reason GEO can't be only "get cited". Roughly half of brand visibility in these runs happened in answers with no sources at all, so it came from what the model already associated with the category. Retrieval is the fast lever. Being widely and consistently described across the web is the slow one, and it feeds both.
Worked example: tracing one Ledgerline answer
Illustrative example. Ledgerline is fictional, and the answer, queries and sources below are invented to show the method.
Ledgerline's marketing lead runs "How do I stop paying duplicate supplier invoices?" through an assistant with search on. The answer recommends three tools, none of them Ledgerline, and cites four sources. She traces it backwards.
1. Did it search? Yes: four citations are attached. So this is a retrieval answer, and new or improved pages can change it.
2. What did it probably search for? She reruns the prompt through the Gemini API with grounding on and reads the returned queries: "duplicate invoice detection accounts payable", "prevent duplicate vendor payments software", "AP duplicate payment controls".
3. Which sentences cite which sources?
| Sentence in the answer | Cited source |
|---|---|
| "Duplicate payments often come from the same invoice arriving by email and post" | An accounting body's guidance page |
| "Most AP tools flag invoices with matching vendor, amount and date" | A software review site category page |
| "Tool A and Tool B both offer fuzzy matching on invoice numbers" | Tool A's feature page; a comparison blog |
4. Where could Ledgerline fit? Ledgerline has duplicate detection, but it's one bullet on a features page, with no detail. Nothing on the web says how it works. The review site category page lists Ledgerline but doesn't mention duplicates.
5. The fix list:
- Publish a page that answers "how does duplicate invoice detection work", with specifics: which fields are matched, how fuzzy matching handles "INV-0042" vs "0042", and what share of duplicates customers report catching. Use real numbers only.
- Update the review site profile to describe the feature.
- Re-run the prompt weekly for six weeks and compare rates, not single answers.
Notice the trace didn't need any insider knowledge of the engine. It used what the answer showed (sources), what the API exposes (queries) and what the web says about Ledgerline (very little, on this topic).
What this means for your content
- Make sure you can be retrieved. Indexed, crawlable by OAI-SearchBot and other search crawlers, with important content in text rather than only in images or behind scripts.
- Answer sub-questions, not just head terms. Fan-out rewards pages that settle one specific question well.
- State checkable facts in plain sentences. Citations attach to claims. Give the engine claims worth attaching.
- Get described consistently elsewhere. Training-data visibility comes from many sources over time, and third-party pages compete for retrieval anyway.
- Measure with repeats. One answer tells you almost nothing about the next one.
Exercise: label five answers
Pick five prompts from your Lesson 1 notes. Run each once in ChatGPT and once in Gemini, logged out, and label each answer:
| Label | Meaning |
|---|---|
| R | Retrieval: shows sources |
| T | Training only: no sources shown |
| Fan-out hint | Sources cover clearly different subtopics |
For every R answer, write down which source was attached to the sentence that named (or should have named) your brand. You'll use these traces in Lesson 3.
Quiz
1. Name the two places an AI answer draws from. Training data and live retrieval.
2. What does query fan-out mean? Running multiple related searches across subtopics to build one answer.
3. Which OpenAI crawler controls whether you appear in ChatGPT search answers? OAI-SearchBot. GPTBot is for training and is set independently.
4. In MentionX data, roughly what share of Gemini API answers came back without any citations? About half (51%).
5. Why can one answer never serve as your measurement? Sampling, different sub-queries, shifting indexes and user context all vary between runs, so you need rates across repeated runs.
Next: Lesson 3: Mentions, citations and recommendations.
Sources
- OpenAI, Overview of OpenAI crawlers
- Google AI for Developers, Grounding with Google Search
- Google Search Central, AI features and your website
- Google Cloud, Adjust parameter values
- Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Aggarwal, P., et al. (2024). GEO: Generative Engine Optimization
- MentionX aggregate scan data, 22 August to 29 October 2026 (UTC), 2,154 engine runs, 18 projects. Anonymised and read-only.
Questions
Do AI engines search the web for every answer?
No. Google's Gemini API docs say the model first decides whether a search would improve the answer. In MentionX data, about half of Gemini API answers came back with no cited sources.
What is query fan-out?
Google's term for issuing multiple related searches across subtopics and data sources to build one AI answer.
Why do answers change when I ask twice?
Models sample their output, search results shift, and the engine may run different sub-queries each time, so repeated runs can differ.
Can I block AI search without blocking AI training?
For OpenAI, yes. OAI-SearchBot (search) and GPTBot (training) are separate robots.txt user agents and each setting is independent.