Guide · 10 min read

How AI search works: from your question to a cited answer

Knowing how AI search works explains why one brand gets named in an answer and another does not. This guide walks through what happens between a question typed into ChatGPT, Gemini, Perplexity, Claude, Copilot or Google AI Overviews and the answer that comes back: where the information comes from, how sources are picked, why the answer changes from one run to the next, and what a business can do about it.

Every RecommendedGEO plan tracks a fixed set of questions across ChatGPT, Gemini, Perplexity, Claude, Copilot and AI Overviews, from $449 a month with a three-month minimum.

How AI search works: from your question to a cited answer

Two ways an assistant knows things

Every AI assistant has two possible sources for an answer. The first is what the model learned during training: a large body of text collected up to a cutoff date. That knowledge is built into the model itself. It cannot be updated page by page, and the model does not keep a list of which site taught it what.

The second source is retrieval. Before answering, the assistant runs a search, reads a handful of current pages and writes its answer from them. Engineers call this retrieval-augmented generation, or RAG. It is the part that produces links and citations, and for a business it is the most useful part of how AI search works, because it can be influenced within weeks.

Assistants decide case by case which source to lean on. Anthropic's documentation for Claude, for example, says the model searches when a request depends on current or changing information, such as prices, recent news or details about a specific company, and answers directly for stable knowledge like maths or established facts. Questions about products and suppliers usually fall in the first group.

How AI search works, step by step

The details of how AI search works differ between products, and none of them publishes its full pipeline. The general flow, based on what the vendors do document, looks like this:

  1. You ask a question in natural language, often longer and more specific than a classic search query.
  2. The assistant decides whether it needs fresh information or can answer from training alone.
  3. If it searches, it rewrites your question into one or more short search queries.
  4. Those queries go to a search index: Google's, Bing's or one the company runs itself.
  5. The system reads the results and keeps the passages that best answer the question.
  6. The model writes an answer from those passages, often searching again if something is missing.
  7. It attaches citations to the sources it relied on, and the answer reaches your screen.

Steps 3 to 7 are where websites enter the picture. If your pages are not in the index the assistant uses, or no passage on them answers the question clearly, you cannot be cited, however good your product is.

Query rewriting and fan-out

Assistants rarely send your exact words to a search engine. They turn a conversational prompt into shorter queries a search index can handle, and they often send several.

Microsoft is unusually specific about this. Its documentation for Copilot says the assistant identifies the terms in a prompt where web information would help, then generates a search query of a few words and sends it to Bing; the full prompt is not sent unless it is very short. In Copilot Chat, the exact queries appear in the citation section of the answer. Source: Microsoft Learn on web search in Copilot.

Google calls its version query fan-out. Its Search Central documentation says AI Overviews and AI Mode may issue multiple related searches across subtopics and data sources while building a response. Source: Google, AI features and your website. OpenAI's help center describes something similar for ChatGPT search: the prompt is rewritten into one or more targeted queries, and more specific follow-up queries may be sent after the first results come back.

The practical effect is that a single question becomes several searches. A page can be cited because it ranks for one of those hidden sub-queries, even if it would never appear for the original question in classic search.

Which search index each assistant uses

This is where most articles on how AI search works overstate what is known. Here is only what we could confirm in each vendor's own documentation at the time of writing:

  • Google AI Overviews and AI Mode use Google Search. Google says a page must be indexed and eligible to show with a snippet to be a supporting link, with no additional technical requirements.
  • Gemini, through the Gemini API, can ground answers with Google Search: the model decides whether a search would help, generates one or more queries and returns the answer with inline citations.
  • Microsoft Copilot sends its generated queries to the Bing search service. Bing's index is what matters for Copilot.
  • ChatGPT search, according to OpenAI's help center, works with third-party search providers and content from partners. OpenAI also runs its own crawler, OAI-SearchBot, to surface sites in ChatGPT search.
  • Perplexity runs PerplexityBot, which its documentation says is designed to surface and link websites in Perplexity's search results and is not used to train foundation models.
  • Claude can search the web and always cites the results it uses. Anthropic runs Claude-SearchBot for search indexing; the documentation we read does not name an outside search provider, so we do not either.

You will find confident claims online about which provider sits behind each assistant. Treat any that are not backed by the vendor's own pages as guesses, and expect the arrangements to change.

How passages are selected and ranked

Once the results come back, the assistant does not read whole websites. It works with passages: a paragraph, a list, a table row. Systems score those passages for how well they answer the query and keep the strongest ones within a limited amount of space.

None of the vendors publishes the scoring, so what follows is what the documented behaviour implies. A passage is easier to use when it:

  • answers one specific question directly, near the top of its section;
  • names the product, brand or place explicitly instead of saying "we" or "our solution";
  • includes concrete facts such as prices, dimensions, locations or dates;
  • makes sense on its own, without the paragraphs around it;
  • comes from a page the index already trusts and can crawl without errors.

We cover how to write pages like that in how to write content AI cites.

How citations are chosen

A citation is the assistant showing which retrieved passage supports which part of its answer. In the Gemini API and the Claude API, the response carries citation data that links a span of the answer to a source URL and title. Anthropic's docs state that citations are always enabled for Claude's web search. Source: Claude web search tool documentation.

Two consequences follow. First, a source can shape an answer without being shown as a link, because only some retrieved pages end up cited. Second, a brand can be mentioned in an answer without its own site being cited at all, because the mention came from a review site, a directory or a comparison article.

That is why the sources assistants cite for your category matter as much as your own pages. Google notes that AI features can show a wider and more diverse set of links than classic results, so the list of sites that count is often longer than your usual competitor set.

Why answers vary between runs

Ask the same question twice and you may get different brands, different order and different links. That is expected behaviour, and there are several reasons for it:

  • Language models generate text with some randomness, so wording and emphasis change between runs.
  • Query rewriting can produce different sub-queries each time, which return different results.
  • Search indexes update constantly, so the pages available today are not the ones from last week.
  • Location, language and account settings change what is retrieved. Copilot, for instance, sends the user's IP address to Bing to localize results.
  • Products ship new models often. Google says AI Overviews and AI Mode may use different models and techniques, so their responses and links will vary.

Variation is built into how AI search works, so one screenshot proves very little. Visibility has to be measured as a rate over many runs of the same questions, which is the method we explain in how to measure AI visibility.

Memory and personalization

Some assistants remember things about the person asking. OpenAI's help center describes two kinds of memory in ChatGPT: saved memories, which the user asked it to keep, and reference to past chats. It also gives an example of memory feeding search, where a user known to be vegan who asks for nearby restaurants may get a search for vegan restaurants in their city.

For brands, memory is the least predictable piece of how AI search works: two people asking the same question can see different answers for reasons you do not control. You cannot optimize for each user's memory. You can make sure that, for the common versions of the question in your market, the facts the assistant finds about you are clear, consistent and easy to retrieve.

What this means for brands

Understanding how AI search works turns a vague goal ("be in ChatGPT") into a list of things you can check. Each step of the flow has a matching task:

  • Be in the indexes. Make sure Googlebot, Bingbot, OAI-SearchBot, PerplexityBot and Claude-SearchBot can reach your pages, and that your CDN does not block them.
  • Answer the sub-queries. Think in terms of the shorter questions an assistant fans out to, and give each one a clear passage.
  • Write passages that stand alone. Name your brand, state facts and keep each answer self-contained.
  • Be present where assistants look. Directories, comparison pages and reviews in your category are frequent sources of mentions.
  • Measure over time. Track a fixed set of questions across assistants and watch the trend, not single answers.

This overlaps with classic SEO more than many people expect, and differs in a few important places. We go through those differences in AI SEO, and the assistant-specific steps in how to appear in AI Overviews and how to rank on Perplexity.

If you are new to the field, our overview of generative engine optimization puts all of this in context.

Frequently asked questions

Does ChatGPT search the web for every question?

No. Assistants decide when a search would help. Questions about current prices, recent events or specific companies usually trigger a search; general knowledge questions are often answered from training data alone. Users can also ask the assistant to search explicitly.

Do AI assistants use Google or Bing?

It depends on the assistant. Google's AI features use Google Search, Copilot uses Bing, and Perplexity and OpenAI run their own crawlers for search. Anthropic does not name an outside provider in the documentation we read. Check each vendor's own pages, because these arrangements change.

Can I get my brand into a model's training data?

Not directly or quickly. Training data is collected up to a cutoff and you cannot edit it. Retrieval is where you can act: pages that are indexed, crawlable and clearly written can be cited in answers within weeks.

Why does the answer mention my competitor and not me?

Usually because the retrieved passages mention them. That can come from their own site or from third-party pages such as reviews, directories and comparisons. Knowing how AI search works helps you trace which sources were cited and what they say about your category.

How often do AI answers change?

Constantly. Randomness in generation, different sub-queries, index updates and new models all change results. That is why visibility should be tracked as a rate over repeated runs rather than judged from one answer.

The four workstreams of GEO: measuring AI answers, citable content, outside presence and technical GEO
AI assistants tracked every month: ChatGPT, Gemini, Perplexity, Claude, Copilot and Google AI Overviews
Monthly GEO process: measure, fix, publish and report

Pay with Stripe

On the live site this button takes you straight to secure card payment (Stripe). This prototype doesn't charge yet.

Scroll to Top