Part II · Chapter 8 of 42

Retrieval and Grounding: How an AI Answer Gets Assembled

Fan-out, RAG, and citation, step by step

When an AI product answers with search turned on, your content passes through a pipeline of five or six distinct stages between the typed prompt and the finished, cited answer. Each stage is a gate your content can pass or fail, and diagnosing a visibility problem means finding the failed gate. This chapter walks the whole pipeline once, then replays the stages that repay a closer look. The machinery has a name, retrieval-augmented generation, or RAG: the system fetches relevant documents and puts them into the model's context before it writes.

The pipeline, prompt to cited answer

A user types "best CRM for a small consulting firm". What happens next, in order:

  1. Query fan-out. The system rewrites the one prompt into several search queries: "best CRM small business", "CRM for consultants", "CRM pricing comparison", and variants you will never see.
  2. Retrieval. Each query runs against a web index: Google's, Bing's, Brave's, or the product's own. This stage is classic search, and your ranking in it still matters.
  3. Chunking and scoring. The fetched pages get split into passages, and each passage is scored for relevance to the query, largely by embedding similarity: proximity in meaning rather than shared words. Embeddings: How Machines Represent Meaning covers that mechanism.
  4. Reranking and context limits. A second scoring pass reorders the surviving passages, and a budget cuts them: the model's context holds only so much, so most retrieved text gets discarded here.
  5. Synthesis. The model writes the answer with the surviving passages in front of it, blending what it just read with what its weights already hold. Model Memory and Live Retrieval measures that blend.
  6. Citation selection. The product attaches links to some of the sources. Which passages earn a citation is a separate decision from which ones shaped the text.

Seconds of machinery, six places to lose. Keep the list; the diagnostic workflow in Auditing and Diagnosing Visibility Problems works through these gates in this order.

Query fan-out: the searches you never see

Fan-out deserves its own section because it changes what a "target query" is. Google describes AI Mode as using a query fan-out technique, breaking the question into subtopics and issuing many queries simultaneously,Google's AI Mode announcement: "breaking down your question into subtopics and issuing a multitude of queries simultaneously on your behalf." and Google's documentation for site owners defines fan-out as concurrent related queries generated by the model to fetch additional results.Google's guide to optimizing for AI features, which gives "how to fix a lawn full of weeds" fanning out into herbicide and lawn-care queries as its example. The other AI search products behave the same way in practice, though most document it less.

The prompt you brainstormed is one node; the queries that actually hit the index are its machine-generated variants. Each variant is an ordinary search query you can rank for individually, which means a subtopic page can enter an answer through a fan-out query even when your site would never rank for the head prompt. Finding those variants is a research problem, covered in Prompt and Topic Research.

Retrieved, read, credited: three different events

Marketers conflate three outcomes the pipeline keeps separate. Being retrieved means a query pulled your page into the candidate set. Being read means your passage survived reranking and entered the model's context. Being credited means the citation selector attached your link to the answer. Each is a strict filter on the one before, and the drop-off at each gate is real: a page can be retrieved and cut at the context budget, or read and paraphrased without a link, and from the outside both look like absence.

The measured gaps are large. In OppAlerts' research across 100 industries, models read heavily from sources they almost never cite, community sites above all, and the brands they recommend were often never fetched at all during the answer.Method and full tables are in The Research Behind This Guide, part of the AI Search Visibility research. Model Memory and Live Retrieval reports the headline figures. So treat the three events as three separate metrics with three separate fixes: retrieval fails on access and ranking, reading fails on chunk quality, and crediting fails on whether your passage was the one worth pointing at.

RAG without vendor mystique

The term comes from a 2020 research paper that combined a retriever with a generative model so the system could pull in external documents instead of relying only on what training baked into its parameters.Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020), which notes that parametric knowledge alone limits models on knowledge-intensive tasks. Everything since is engineering refinement of that idea, and when a vendor pitches a proprietary answer-engine architecture, the pipeline above is almost always what is underneath.

The practical conclusion falls out of the stage list. The model writes from retrieved passages, so a page full of extractable, self-contained passages beats a beautiful page whose meaning lives in its layout, images, and interleaved marketing copy. Design survives none of the gates; text does. What an extractable passage looks like, and how to structure a site around them, is the business of Content Architecture: Building for the Chunk and Writing for Retrieval and Citation. And none of it matters if the fetchers cannot reach your pages at all, which is where Where the Machines Get Their Data: Crawlers, Indexes, and Training Pipelines comes in.