AI Visibility Guide
Chapter 28— Modern AI Search Pipeline
Chapter Goal
In Chapter 27, we learned how search engines discover, crawl, index, and retrieve information from the web.
But modern AI Search systems can go further than returning a list of webpages. They can retrieve information from multiple sources, evaluate its relevance, and use an LLM to generate an answer.
Consider this question:
Which dental clinics in Toronto offer appointments in Persian?
An AI Search system may need to understand the question, find relevant websites, identify useful information, and generate an answer supported by sources.
The Modern AI Search Pipeline describes how these operations can work together.
This chapter explains four main stages:
- Query Understanding and Expansion — Understanding the user's question and deciding what to search for.
- Retrieval and Ranking — Finding candidate sources and identifying the most relevant ones.
- Passage Selection and Evidence — Extracting useful information and preparing it for the LLM.
- Answer Generation and Citations — Producing an answer and connecting its claims to supporting sources.
Together, these stages create the following conceptual pipeline:
USER QUERY
↓
Query Understanding
↓
Query Rewriting / Expansion / Fan-Out
↓
Retrieval
↓
Candidate Sources
↓
Ranking and Reranking
↓
Passage Selection
↓
Evidence and Context
↓
LLM Generation
↓
Claims and Citations
↓
FINAL ANSWER
This is a conceptual model, not the exact internal architecture of every AI Search product. Some systems combine stages, skip certain operations, or perform additional searches during answer generation.
28.1 Query Understanding — Deciding What to Search For
The first challenge is understanding what the user actually wants.
Consider our example:
Which dental clinics in Toronto offer appointments in Persian?
The system needs to recognize three important requirements:
Service:
Dental Appointments
Location:
Toronto
Language:
Persian
This is Query Understanding: interpreting the user's question and identifying the information needed to answer it.
But understanding the question is only the beginning.
The system may need to transform it into more effective searches.
Query Rewriting and Expansion
Query Rewriting means reformulating a question into a search-friendly expression while preserving its meaning.
For example:
Original Question:
Which dental clinics in Toronto
offer appointments in Persian?
Rewritten Query:
Toronto dental clinics with
Persian-language appointments
Query Expansion means adding related expressions that may help retrieve relevant information.
For example, some websites might use Farsi instead of Persian.
An expanded search could consider:
Persian-speaking dental clinic Toronto
Farsi dental appointments Toronto
Dental clinic Toronto Persian language
These queries use different expressions to search for information related to the same user need.
Query Fan-Out
Some AI Search systems take this further through Query Fan-Out.
Instead of relying on one search, the system can issue multiple related searches to investigate different aspects of a question.
For example:
USER QUESTION
|
Which dental clinics
in Toronto offer
appointments in Persian?
|
+-----------+-----------+
| | |
Search A Search B Search C
| | |
Persian- Farsi Dental clinics
speaking dental Toronto language
dentists bookings services
Toronto Toronto
The results from these searches can help the system find information that a single query might miss.
Not every AI Search system uses Query Fan-Out, and not every question requires multiple searches.
Why This Matters for AI Visibility
A business may be discovered through searches that are not identical to the user's original question.
For example, a page explaining that a clinic offers appointments in Farsi may be relevant to a query using the word Persian.
The practical lesson is to describe services clearly and naturally, including relevant terminology that customers actually use.
The objective is not to repeat every possible keyword variation. It is to make the underlying information understandable and retrievable.
28.2 Retrieval and Ranking — Finding the Most Relevant Sources
Once the search queries are prepared, the system needs to find information.
This is the Retrieval stage, which we introduced in earlier chapters.
Imagine the system retrieves these three hypothetical sources.
Source A — Official Business Website
Northstar Dental Clinic offers dental appointments in English and Persian at its Toronto location.
Source B — Local Business Directory
Northstar Dental Clinic is a dental clinic located in Toronto, Canada.
Source C — Healthcare Article
Toronto is home to a large Persian-speaking community with access to various healthcare providers.
All three sources contain information related to the search.
But they do not answer the question equally well.
Source A directly establishes Persian-language appointment availability.
Source B identifies a dental clinic in Toronto but says nothing about appointment languages.
Source C provides broader context without identifying a clinic that offers the requested service.
These retrieved documents are called Candidate Sources.
Ranking and Reranking
An AI Search system may retrieve many candidate sources.
It then needs to identify which ones deserve further attention.
Ranking orders candidate results according to their estimated usefulness for the query.
A system might initially place Source A above Sources B and C because its content directly addresses the user's question.
Some systems also perform Reranking: a more detailed evaluation of a smaller set of already retrieved candidates.
For example:
Retrieval
↓
50 Candidate Sources
↓
Initial Ranking
↓
10 Promising Sources
↓
Reranking
↓
3 Sources Selected for Further Analysis
These numbers are illustrative.
The important principle is that retrieving a source does not mean it will be used in the final answer.
A source may be retrieved but receive insufficient priority during ranking or reranking.
Why This Matters for AI Visibility
Consider two websites.
Website A discusses dental services in Toronto generally.
Website B directly explains which dental services a clinic provides, where it operates, and whether Persian-language appointments are available.
For this specific question, Website B contains more directly relevant information.
For AI Visibility, being discoverable is only the first step. The source must also contain information relevant to the particular question.
How systems evaluate source authority, relevance, freshness, diversity, and other selection factors will be covered in Chapter 29.
28.3 Passage Selection — Turning Retrieved Content into Evidence
Retrieving a relevant webpage is not necessarily enough.
A webpage might contain thousands of words, while only one paragraph answers the user's question.
This is where Passage Selection becomes important.
Suppose Northstar Dental Clinic's website contains:
Homepage
|
|-- About the Clinic
|
|-- Dental Services
|
|-- Appointment Information
| |
| |-- Appointments are
| available in
| English and Persian.
|
|-- Contact Information
The system may identify the appointment-information passage as particularly relevant.
That passage provides potential Evidence for an answer.
From Passage to Evidence
Consider the selected passage:
Northstar Dental Clinic offers dental appointments in English and Persian at its Toronto location.
This statement supports the claim that the clinic offers Persian-language appointments in Toronto.
Now compare it with:
Northstar Dental Clinic serves Toronto's multicultural community.
The second statement may be relevant to the business, but it does not establish the requested language capability.
This connects to Chapter 24, where we learned that Entity Associations are not substitutes for verified business Attributes.
A useful source must contain information that supports the specific claim being made.
Context Construction
After selecting relevant passages, an AI Search system may assemble them into the information provided to the LLM.
This is called Context Construction.
For example:
User Question
+
Selected Source Passages
+
Source References
+
Answer Instructions
↓
LLM Context
The LLM can then use this information when generating a response.
This connects directly to the RAG concepts introduced earlier in the course.
A system may also need to limit or prioritize the information included because an LLM has a finite Context Window and a limited processing budget.
Why This Matters for AI Visibility
A webpage might be highly relevant overall, yet fail to contain a clear passage supporting the requested answer.
For example, repeatedly mentioning Persian-speaking patients without explicitly stating the clinic's appointment-language availability leaves an important information gap.
The practical lesson is to express important facts clearly within meaningful passages that can stand on their own.
Good information should not require the system to combine several weak hints to infer a business capability.
28.4 Answer Generation — From Evidence to Claims and Citations
At this stage, the system has identified potentially useful evidence and provided relevant context to an LLM.
The LLM can now generate an answer.
This stage is called LLM Generation or Inference.
Our user asked:
Which dental clinics in Toronto offer appointments in Persian?
Based on the available evidence, the system might generate:
Northstar Dental Clinic is one possible option in Toronto. According to its official website, the clinic offers dental appointments in Persian.
This answer contains factual Claims.
For example:
Claim 1:
Northstar Dental Clinic is located in Toronto.
Claim 2:
The clinic offers dental appointments in Persian.
Both claims need appropriate support.
Connecting Claims to Citations
A Citation is a reference to a source used to support information in the answer.
Conceptually:
SOURCE
Northstar Dental Clinic Website
|
| Supports
↓
CLAIM
The clinic offers appointments
in Persian.
|
| Referenced by
↓
CITATION
Link to the supporting webpage
If the system provides a citation to the clinic's official website, the user can inspect the source.
But a citation must actually support the associated claim.
For example, citing an article about Toronto's Persian-speaking population would not establish that Northstar Dental Clinic provides appointments in Persian.
Why This Matters for AI Visibility
There are several possible outcomes for a business:
- Its webpage is retrieved but not used in the final answer.
- Its information contributes to the generated answer.
- Its business name appears in the answer.
- Its webpage receives a visible citation.
These outcomes are related, but they are not identical.
A business might be mentioned without its website being cited. A website might also be cited without the business receiving a prominent recommendation.
For AI Visibility, the objective is not simply to get a webpage retrieved. It is to make accurate business information useful enough to support relevant answers.
Even when a system provides citations, the answer may still contain mistakes. Citations help users inspect evidence; they do not guarantee factual correctness.
Practical Example — Following One Question Through the Entire Pipeline
Let's connect everything using a single example.
A user asks an AI Search system:
Where can I book a dental appointment in Persian in Toronto?
Step 1 — Understand and Expand the Query
The system identifies:
Location: Toronto
Service: Dental Appointment
Language: Persian
It may search using several related expressions, including Farsi dental appointments Toronto.
Step 2 — Retrieve Candidate Sources
The system retrieves relevant webpages.
Among them are:
- Northstar Dental Clinic's website.
- A Toronto business directory.
- A general article about Persian-speaking communities.
Step 3 — Rank the Sources
The system evaluates which sources are most relevant to the question.
Northstar Dental Clinic's website is a strong candidate because it directly addresses dental appointment availability in Persian.
Step 4 — Select Supporting Evidence
The system identifies this passage:
Northstar Dental Clinic offers dental appointments in English and Persian at its Toronto location.
The passage provides direct evidence for the business's location and language availability.
Step 5 — Construct Context and Generate the Answer
The selected evidence is included in the LLM's context.
The model produces an answer:
Northstar Dental Clinic is one possible option for dental appointments in Persian in Toronto.
A citation may reference the clinic's supporting webpage.
The overall journey is:
USER QUESTION
|
v
Understand the Request
|
v
Rewrite / Expand / Fan Out
|
v
Retrieve Candidate Sources
|
v
Rank and Rerank
|
v
Select Relevant Passages
|
v
Build Evidence-Based Context
|
v
LLM Generates Claims
|
v
Attach Supporting Citations
|
v
FINAL AI ANSWER
In real systems, some of these operations may overlap, repeat, or occur in a different order.
What This Reveals About AI Visibility
A business's information can pass through several stages before reaching a user.
Even if the business has a well-structured website and is indexed by search engines, it may not appear in an AI-generated answer.
Its information must also be relevant to the question, retrieved by the system, selected as useful evidence, and incorporated into the answer.
This provides a practical framework for investigating AI Visibility problems.
If a business is not appearing in AI Search results, the next question should be:
At which stage is its information failing to reach the final answer?
That question is more useful than assuming every visibility problem can be solved by adding keywords or Structured Data.
Chapter 28 Recap
| Stage | What It Does | Why It Matters |
|---|---|---|
| Query Understanding and Expansion | Interprets the user's question and may generate related searches | Determines what information the system looks for |
| Retrieval and Ranking | Finds candidate sources and prioritizes them | Determines which sources receive further consideration |
| Passage Selection and Context | Identifies useful evidence and prepares it for the LLM | Determines which information can support the answer |
| LLM Generation and Citations | Produces an answer and may reference supporting sources | Determines which claims and sources become visible to the user |
The Single Most Important Idea from Chapter 28
Modern AI Search is not simply a process of finding webpages and summarizing them. It can involve understanding a user's question, expanding searches, retrieving candidate sources, evaluating their relevance, selecting evidence, constructing context, and generating a cited answer. For AI Visibility, each stage represents a potential point where a business's information can either progress toward the final answer or be excluded. Understanding this pipeline makes it possible to analyze visibility problems systematically instead of treating AI mentions and citations as unpredictable outcomes.
Next Chapter: Chapter 29 — Source Discovery and Selection
Now that we understand the overall AI Search Pipeline, the next question is:
Why does an AI Search system select certain sources while ignoring others?
In Chapter 29, we will examine how source relevance, authority, freshness, diversity, consensus, and eligibility can influence which information is selected for further use.