Sub topic 1
How AI assistants answer "what should I buy?" questions
This chapter explains how an AI assistant turns a recommendation question into a cited answer. It is the base for the rest of the tutorial. Later chapters build on it to explain why comparison and best-of pages get retrieved and how to design them.
Prerequisites
This chapter assumes you have:
- Basic HTML knowledge, including headings, lists and tables.
- A working idea of how search engines crawl and index pages.
- A general sense that AI assistants can use web search to answer questions.
- The ability to read simple JSON.
You do not need to know how language models are trained.
What a recommendation query is
A recommendation query asks the assistant to choose or rank products for the user. Typical examples:
- "What is the best project management tool for a team of five?"
- "Tool A vs Tool B for a small agency"
- "Alternatives to Tool A that are cheaper"
- "Which laptop should I buy for video editing under $1,500?"
These differ from factual queries such as "What year was HTTP/2 standardised?". A factual query has one correct answer. A recommendation query has many defensible answers, and the right one depends on the user's budget, team size, skills and priorities.
That has two consequences for the assistant:
- It needs current facts: prices, plans, features and reviews. Pricing and features change often, and a model's training data may be months or years old.
- It needs a basis for its judgement. A bare opinion from the model is weak. A judgement grounded in sources it can point to is stronger.
For both reasons, many assistants and AI search features look things up on the web when they answer these questions.
The answer pipeline
Different products implement this differently, and vendors do not publish every detail. The general shape is similar across systems, though.
1. Interpret intent and constraints
The assistant works out what kind of question this is and which constraints matter. For "best project management tool for a team of five", the intent is a ranked or shortlisted recommendation. The constraints are team size and category. Chapter 2 covers the three main intents: best-of, versus and alternatives.
If the question is vague, some assistants ask a follow-up. Others assume sensible defaults and state them.
2. Generate search queries
The assistant often rewrites the question into several search queries. This is sometimes called query expansion or "fan-out". One user question might become:
- best project management software small teams
- Tool A vs Tool B pricing
- Tool A review
- project management tools free plan
This matters for page authors. Your page may never be matched to the user's exact words. It is matched to the sub-queries the assistant generates, which tend to be shorter and more specific, and often name products and attributes.
3. Retrieve candidate pages
The queries go to a search index or a live web search. The system gets back a list of candidate URLs with titles, snippets or extracted text. Which index is used varies by assistant. A page can only be a candidate if the system's crawler or search provider can fetch it and has indexed it. Chapter 9 covers crawl access.
4. Read and extract passages
The assistant reads some of the retrieved pages, or parts of them. It usually does not read whole pages. Systems commonly split documents into passages and pick the passages most relevant to the query. This is a major reason page structure matters. A table with clear headers, or a short section under a descriptive heading, is easy to pull out as a unit. A long narrative with the key fact buried in the middle is harder.
5. Compare, filter and synthesise
The model combines what it extracted. It may:
- Check which products appear across several sources.
- Prefer sources that state criteria, methods or dates.
- Drop sources that look thin, promotional or outdated.
- Match products to the user's constraints, such as budget.
6. Write the answer with citations
The answer is composed in natural language, often with a short list or table. Many systems attach citations, such as links or numbered footnotes, to the pages that supported specific claims.
Why comparison and best-of pages get used
Comparison and best-of pages fit the pipeline's needs well:
| What the assistant needs | What a good comparison page offers |
|---|---|
| Many products in one place | A single page covering several options |
| Current prices and features | A table with attributes and a "checked on" date |
| A reason to trust a ranking | Stated criteria and a testing method |
| Extractable passages | Headings, tables and short sections |
| Evidence that supports a claim | Data, test results and links to sources |
A page that covers the field efficiently saves the assistant from stitching together a dozen product pages. That makes it a convenient source. Convenience alone does not make it a trusted one. A page that reads as pure marketing may be retrieved and then ignored, or cited with caution.
A worked example
Take the query: "best project management tool for a small team with a free plan".
Here is a plausible, simplified trace. It is illustrative, not a record of any real system.
- Interpret. Intent is a best-of recommendation. Constraints: small team, free plan required.
- Expand. Queries: "best project management software small teams", "project management tools free plan", "Tool A vs Tool B free plan limits".
- Retrieve. Candidates include a vendor's pricing page, two independent best-of lists, a forum thread and a comparison page with a table.
- Extract. From the comparison page, the assistant pulls the table row for each tool: best-for, free plan, starting price.
- Synthesise. It recommends Tool A for simple task boards because the table says it has a free plan for up to 10 users. It notes that Tool B has no free plan.
- Cite. The answer links to the comparison page for the free plan claim.
The claim was cited because it was easy to extract and clearly attributed to a labelled column. Here is the kind of table that supports it. The figures are placeholders.
<table>
<caption>Project tools compared for small teams (checked 2026-11)</caption>
<thead>
<tr>
<th scope="col">Tool</th>
<th scope="col">Best for</th>
<th scope="col">Free plan</th>
<th scope="col">Starting price (per user/month)</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Tool A</th>
<td>Simple task boards</td>
<td>Yes, up to 10 users</td>
<td>$8</td>
</tr>
<tr>
<th scope="row">Tool B</th>
<td>Teams that need timelines</td>
<td>No</td>
<td>$12</td>
</tr>
</tbody>
</table>The caption states what the table covers and when it was checked. Column headers name each attribute. Row headers name each product. A parser, or a person using a screen reader, can read any cell and know which product and attribute it belongs to. Chapter 6 covers table construction in detail.
What the assistant does not do
Some common beliefs are wrong or unproven:
- It does not simply copy the top-ranked search result. Systems vary, and ranking in a classic search engine does not guarantee being cited.
- It does not always search. For some questions, the assistant answers from training data alone. Recommendations answered this way may be out of date, and they cite nothing.
- It does not follow a published formula. Vendors rarely disclose how sources are chosen. Treat claims of guaranteed tactics with suspicion, and rely on observation and testing instead.
- A citation is not an endorsement of the whole page. The assistant may cite a page for one fact, such as a price, and still recommend something the page ranks lower.
Common errors when reasoning about this
- Assuming one query. Authors optimise for the headline phrase and ignore the sub-queries the assistant generates. Check that your page answers narrower questions, such as free-plan limits or specific price points.
- Assuming whole-page reading. If the critical fact is only inside an image or a script-rendered widget, the extraction step may miss it.
- Assuming being retrieved means being cited. Retrieval gets a page into consideration. Citation depends on whether its passages are used in the final answer.
- Ignoring other sources. The assistant compares sources. If independent sites disagree with your page, the disagreement can lower trust in yours. Chapter 12 covers this.
Summary
- A recommendation query has no single correct answer, so assistants look for current facts and a basis for judgement.
- The typical pipeline is: interpret, expand into sub-queries, retrieve, extract passages, synthesise, cite.
- Comparison and best-of pages suit this pipeline because they cover many products with attributes in extractable form.
- Retrieval, citation and endorsement are separate outcomes. Design for all three, and verify by testing.
Exercise
An assistant is asked "best project management tool for a small team with a free plan". Name two ways the query is likely to change before search, and say why that matters for the author of a comparison page.
Show answer
The assistant may expand the query into several sub-queries, for example "project management tools free plan" and "Tool A vs Tool B free plan limits". It may also add or extract constraints, such as small team size and a free-plan requirement. This matters because the page is matched against these narrower, more specific queries rather than the user's exact words. The author should make sure the page states product names and specific attributes, such as free-plan limits and prices, in clearly labelled sections or table cells.
Exercise
A page ranks well in a classic search engine, yet an assistant never cites it for a pricing question. Give two possible causes related to the pipeline in this chapter.
Show answer
Possible causes include: the page's pricing sits in an image or script-rendered widget that the extraction step cannot read; the pricing passage lacks a product name, attribute or date, so it is unclear when pulled out alone; the assistant's crawler or search provider cannot fetch the page; another source states the price more clearly or more recently; or the assistant answered from training data without searching. Any two of these are correct.