Sub topic 13
Writing the answer and choosing sources to cite
This chapter covers the last step of the pipeline: how a system turns reranked passages into a written answer and decides which sources to name. It assumes you know the earlier chapters: retrieval-augmented generation, query fan-out, passage chunking, rank fusion and reranking. It also assumes you have used an AI search product that shows links or footnotes.
A caution applies to the whole chapter. Vendors document the general shape of this step. They do not publish the rules that decide which passage gets cited. Where this chapter describes details, it says whether they are documented, inferred or unknown.
Where synthesis sits in the pipeline
By this point the system holds a short list of passages, each tied to a source URL. The language model now receives those passages together with the user's prompt and an instruction to answer from them. This is the "generation" half of retrieval-augmented generation.
Step 1: Packing the context
The model can read only a limited amount of text at once, called its context window. The system cannot pass in every retrieved passage, so it selects and orders them.
Three practical effects follow, and they are widely observed in language model research:
- Length limits. Passages that rank below the cutoff never reach the model. Retrieval and reranking decide this, not the writing step.
- Position effects. Research on long inputs has found that models can use information in the middle of a long context less reliably than information at the start or end. How much this matters depends on the model and the system.
- Truncation. A long passage may be cut. If your key claim sits at the end of a long block, it may not be seen.
For a marketer, the lesson is to keep the answer-bearing sentence near the start of its passage. That costs little and helps in every case.
Step 2: Drafting the answer
The model writes new text. It is not copying a page. It reads several passages, picks the facts that fit the prompt, and phrases them in its own words. Three consequences matter:
- Facts get merged. A single sentence in the answer may draw on two or three passages from different sites.
- Your wording is not preserved. A brand claim such as "the most comfortable shoe on the market" is likely to be rewritten, softened or dropped. Specific, checkable facts survive paraphrase better than slogans.
- Some content is never used. A retrieved passage can be read and still contribute nothing to the answer. Being retrieved is a necessary condition for being used, but it is not a guarantee.
Step 3: Grounding and the limits of citations
Grounding means tying statements in the answer to the retrieved text. A grounded answer should be supported by its sources. A model can still make errors, such as:
- stating something the sources do not say,
- merging two sources into a claim neither makes,
- citing a source that is related to the claim but does not support it.
Studies of generative search products have reported cases where cited pages did not fully support the sentence attached to them. Treat a citation as a pointer, not proof. This matters for you in two ways. Your page may be cited for something it does not say. A competitor's weaker page may be cited for a claim that your page supports better.
Step 4: How sources get chosen for citation
There are two broad designs. Products differ, and a single product may change over time.
| Design | How it works | Typical effect |
|---|---|---|
| Citation during generation | The model is asked to mark which passage supports each claim as it writes. | Citations track the passages the model actually used. |
| Citation after generation | A separate step matches finished sentences to retrieved passages. | Citations can be looser, and some sentences get no source. |
Some products also show a source list that is wider than the set of claims, so a source can appear without a visible link to any one sentence.
Which design a given product uses is, in most cases, not publicly documented. You can infer it only from behaviour, and inferences from behaviour can be wrong.
Signals that plausibly affect citation
The following factors are reasonable hypotheses. None is a published rule for any specific product.
- Relevance of the passage to the sub-question. This is the strongest and best supported factor, because it drives retrieval and reranking.
- Directness. A passage that states the answer in one or two sentences is easier for a model to use than one that implies it.
- Specificity. Numbers, names, dates and conditions give the model something concrete to state.
- Agreement across sources. When several passages say the same thing, the model may state it with confidence. A claim only your page makes may be hedged or omitted.
- Source trust. Many systems appear to favour sources they consider reliable. How they judge this is not public.
- Freshness. For time-sensitive questions, newer pages may be preferred.
Why one source can be cited many times
Because of fan-out, a page that answers several sub-questions can supply several passages. The system may cite it more than once in one answer. Product interfaces often collapse these into one source link, so a single visible link can hide several used passages.
A worked example
Suppose the prompt is "best running shoes for flat feet." After fan-out and reranking, the model receives these passages, which are invented for this example:
- Passage 1 (a retailer guide): "Stability shoes add support for overpronation, which is common with flat feet."
- Passage 2 (a clinic blog): "A podiatrist can check whether you need orthotics. Shoes alone may not be enough."
- Passage 3 (a review site): "The Model X costs 140 dollars and comes in wide widths."
A plausible answer would say that stability shoes are often recommended, that a podiatrist can advise on orthotics, and that Model X is one option with wide sizes. Each clause would link to one passage. The review site gets credit only for the price and width fact. Its general advice on stability shoes is absent. If its page had stated that advice in a clear passage of its own, it might have supplied the first clause too.
What this means for writing content
- Put the answer first. Open a section with a direct statement, then add detail.
- Make each passage self-contained. Name the subject in the passage. Avoid "it" or "this model" when the heading is far above.
- Use precise facts. Include numbers, units, dates and conditions. State when advice depends on a condition.
- Separate claims. One idea per paragraph is easier to match to one citation.
- Be accurate and consistent. Contradicting yourself across pages gives the model nothing safe to repeat.
- Do not write for the citation itself. Content built only to be quoted tends to be thin. Helpful, specific content serves both readers and retrieval.
Common errors
- Treating citation as a ranking position. Citations are not ordered like search results. Their order may follow the answer's text, not any score.
- Optimising for one product. Citation behaviour differs between products and changes between versions.
- Reading a single answer as typical. Answers vary between runs. The next chapters on measurement and uncertainty cover this.
- Writing quotable slogans. Models paraphrase. Facts beat catchphrases.
Exercise
A retrieved passage on your site ranks in the top set for a sub-question, yet your site is never cited in the final answer. Give two reasons from this chapter that could explain it.
Show answer
Possible reasons: (1) the passage was truncated or placed where the model used it poorly, so its key fact was not read; (2) the model drafted its answer from other passages that stated the point more directly or that several sources agreed on, so yours contributed nothing it needed; (3) a citation-after-generation step matched the claim to a different source. Any two of these are correct. Being retrieved does not guarantee being cited.
Exercise
Rewrite this opening line so a model can use it as a self-contained passage: "It is great for people with flat feet and costs a bit more." The page is about the Model X running shoe.
Show answer
For example: "The Model X running shoe offers stability support suited to flat feet and costs 140 dollars." The rewrite names the subject, states the specific claim, and gives a number, so the sentence can be understood and cited without the surrounding page.