Skip to main content
Lesson
15
of 31

Writing for AI answers

Writing for retrieval

Before ChatGPT or any AI platform writes an answer, a search system splits pages into chunks and keeps only the few that match the question. Learn how that selection works on momenticmarketing.com and how to write sections the search system returns.

What you'll be able to do

For content writers, editors and SEO leads who write or update pages that should appear in AI answers.

  • Explain how chunking, meaning match, exact-word match, fusion and reranking pick text
  • Rewrite a section so it stands alone, names its subject and uses the question's words
  • Keep each claim and its source in the same section
  • Find navigation, footer and hidden text in what a search index stores

Retrieval is the step where a search system splits pages into chunks and picks the few that match a question, before any model writes an answer. The model reads only those chunks, so each section of your page has to make sense on its own and use the words people search. Answer engine optimization (AEO) is the work of making pages that AI answers find, quote and cite, and of getting your brand mentioned in those answers.

What retrieval is

A page can rank and load fast and still go unused in an answer, because no section of it was among the passages picked for that question. In Momentic's Atlas data for category prompts (October 13 to November 10, 2026), ChatGPT with web search retrieved 31.7 sources per answer and used 21.4% of them, and Claude retrieved 11.6 and used 55.2%.

Evidence that AI answers read passages, not whole pages

An analysis of 7,060 Gemini queries by the search consultancy DEJAN found that each query received about 2,000 words of grounding text in total (median 1,929), shared among sources by rank (DEJAN (opens in a new tab)). The median source contributed 377 words. Pages under 1,000 words had 61% of their text used; pages over 3,000 words had 13% used, although they gave only 544 words against 370.

Google's own filings describe the same unit. Patent US 11,769,017 B1, "Generative summaries for search results" (granted 2023), describes linking parts of a generated summary to the documents that support them (Google Patents (opens in a new tab)). Application US 2025/0124067 A1 describes a generative model that ranks sets of text by comparing them in pairs against the query (Google Patents (opens in a new tab)).

Length matters inside Google's systems too. iPullRank's analysis of the 2024 leaked Google Content Warehouse API documentation reports "a maximum number of tokens that can be considered for a document" in the Mustang system, so text late on a long page may not count (iPullRank (opens in a new tab)).

Google's Danny Sullivan said in January 2026 that writers shouldn't create "bite-sized chunks" of content for language models (Search Engine Land (opens in a new tab)). The evidence above shows the systems split and select text either way. Cutting a page into fragments isn't the job; writing each section so it still makes sense when a system reads it alone is.

Structure changes the match itself. In iPullRank's test, splitting a two-topic paragraph in two raised one half's cosine similarity to its query from 0.541 to 0.645, and adding a heading raised the other half's a further 17.54% (iPullRank (opens in a new tab)). Momentic's working model from client work is that each chunk is stored with the page title and the headings above it, so the heading is part of what gets matched.

How a retrieval pipeline picks text, step by step

Cloudflare's AI Search publishes its whole pipeline, and it runs Momentic's website search endpoint, so we can watch it work. Our index used these settings on November 27, 2026, as documented in our Search for Agents setup guide and Cloudflare's AI Search configuration docs (opens in a new tab).

  1. Chunking. The crawler converts each page to text and splits it into chunks of 1,024 tokens, and each chunk repeats the last 10% of the one before it.
  2. Meaning match. A model turns each chunk and the question into vectors (embeddings), and the index finds chunks whose meaning is close to the question's.
  3. Exact-word match. A keyword index finds chunks that contain the question's words, after stemming ("running" matches "run").
  4. Fusion. Reciprocal rank fusion merges the two ranked lists into one, so a chunk near the top of both lists ranks highest.
  5. Reranking. A second model rereads the top results against the question and reorders them.
  6. Cutoff. The 10 best chunks above a score of 0.4 go back to whoever asked.

Other retrieval products publish the same steps with different numbers. OpenAI's file search splits files into chunks of 800 tokens with 400 tokens of overlap by default (OpenAI retrieval guide (opens in a new tab)), and Google Cloud's Agent Search caps chunks at 500 tokens inside one heading, list or paragraph block (Google Cloud docs (opens in a new tab)). ChatGPT, Google AI Overviews and Microsoft Copilot don't publish the settings they use for web answers.

Anthropic measured why chunks get missed. In its Contextual Retrieval study (opens in a new tab), the chunk "The company's revenue grew by 3% over the previous quarter" failed because it didn't say which company or which quarter. Adding that context to each chunk, with keyword search and reranking, cut failed retrievals from 5.7% to 1.9%.

A yourbrand.com page with four sections is split into four chunks of 1,024 tokens with 10% overlap between neighbors. A question goes through a meaning match and an exact-word match, then rank fusion, reranking and a top 10 list, and the model writes the answer. Of four chunk scores, two sit above the 0.4 cutoff and two below it are dropped.
Chunk scores here are illustrative. The settings match Momentic's index: 1,024-token chunks, 10% overlap, top 10, cutoff 0.4.

What Momentic's search endpoint returned

On November 27, 2026 (02:31 UTC), we sent 15 questions to momenticmarketing.com/.well-known/search. The endpoint returns the top chunks as Markdown, each with its page address and a score from 0 to 1.

Question we sentFirst resultWhat we saw
what is query fan out/blog/verbatim-search-query-fan-out, score 1.000The right post, three times in the top three
query fanout/agent-tools, score 0.484The post fell to second, at 0.465
how do I contact Momentica blog post, score 1.000The contact page came ninth, at 0.938
how much does Momentic cost/services/website-development, score 1.000The returned chunk opens with a form's thank-you message
does schema markup help ChatGPT cite my website/content-academy/seo-structured-data, score 0.726No result scored above 0.726

These results come from one index of 234 pages on one day. They show how that index behaves, and no conclusion about any AI platform follows from them.

Two bars: the search "query fan out" scored 1.000 and "query fanout" scored 0.484 as its best result, with the note "Our reading: no exact-word match".
The post spells the term "query fan-out". Writing it as one word cut the best score from 1.000 to 0.484.

The first chunk of a page starts with everything above the article

The top chunk for "what is query fan out" is 517 words long. It starts with the page's description, a 60-word logo alt text and the navigation links. The post's own definition of query fan out starts at word 470 of 517, at the end of the chunk.

Spelling changes the exact-word match

The post spells the term "query fan-out". "query fan out" matched it at 1.000, and "query fanout", written as one word, brought back a best result of 0.484. Our reading is that the keyword index, which our settings require to match each word, had no "fanout" to match, so only the meaning match found the post, at a lower score.

Why the contact page came ninth

For "how do I contact Momentic", the contact page came ninth, at 0.938, behind a blog post at 1.000. The contact page has no sentence that says how to contact Momentic. Its visible text is the headings "Email us", "Call us" and "Find us", and the email address is hidden behind an anti-spam script. The page's title says "Get SEO Help Today!"

Hidden text gets indexed

The chunk returned for "how much does Momentic cost" includes a form's "Thank you! Your submission has been received!" message and the text of collapsed FAQ answers. Neither shows on screen until a visitor acts, and both were in the index. The contact page's chunk also included its JSON-LD structured data as plain text.

What this means for each section you write

  • Make each section stand alone. Name the subject in the section ("A nurse self-scheduling policy...") instead of "it", "this" or "as mentioned above". A chunk can start mid-page, and the model reading it gets no paragraph from before the chunk.
  • Put the question's words and the answer in the heading and the first two sentences. The exact-word index needs the words, and the reranker reads the start of the chunk first. The heading tags lesson explains the markup.
  • Keep one topic per section. A section that answers two questions becomes a chunk that matches each question less closely.
  • Keep the fact and its source together. A statistic in paragraph two with its source in a list at the bottom of the page splits into two chunks, and the model may receive only one of them.
  • Write tables and lists that make sense as plain text. Chunkers convert HTML to text or Markdown. A table with clear column headings still reads correctly as text, and a comparison built from styled boxes and icons often loses its labels.
  • Name your brand and product the same way each time. "yourbrand.com", "YourBrand" and "the platform" are three different strings to a keyword index.
  • Write sections a reader can finish in a minute or two, and split them by question under clear headings. In DEJAN's Gemini analysis the median source contributed 377 words, and a section much longer than a chunk gets split at a point you don't choose.
  • Keep navigation, footers and hidden text out of what gets indexed. Most of that work is on templates: a main element around the article, so an indexer can be told to read only that, and no repeated long alt text or text hidden for bots.

What this means for AI agents

AI agents use the same mechanism when a website offers them a search tool. Momentic's endpoint is one example: an agent sends a question and receives the top chunks, so the way you write each section determines what the agent reads. The lesson on giving AI agents tools explains how to set up a search endpoint, and serving your pages as markdown shows how hidden and duplicate text reach agents.

Worked example: a definition section

Before (the post's text, under the heading "Query fan-out didn't come out of nowhere"):

Traditional query expansion modifies and broadens the original query before searching. Query fan-out is a more complex, sophisticated evolution of that process. Instead of adjusting one query, it creates multiple (sometimes hundreds!) of related sub-queries, runs searches for them all in parallel, and stitches together a response.

The heading doesn't contain the words people search ("what is query fan out"). The definition comes after a sentence about a different idea. "Sometimes hundreds" has no source, while Momentic has measured the number.

After:

## What query fan out is
Query fan out is the set of searches an AI platform runs before it writes an answer. ChatGPT with web search ran 3.39 searches per answer and Gemini 3.37, in Momentic's Atlas data for 21 brands, September 1 to October 18, 2026 (Momentic research).
Query fan out extends query expansion, where Google rewrote one search before running it, as its 2011 Verbatim announcement (opens in a new tab) describes.

We expect the exact-word match for the definition question to improve, because the heading and first sentence now contain "query fan out" and "what is". We haven't measured it.

The answer is the first sentence of its section, and the figure has its source in the same paragraph. The logo alt text and navigation still fill the start of the first chunk until the template changes. We can't re-test the rewrite until it's published, because the index syncs from the live website once a day.

The same fix applies to a yourbrand.com pricing page. Before: a FAQ heading "How much does it cost?" with the answer "It depends on your hospital's size." After: the heading "How much does YourBrand scheduling software cost?" and a first sentence that gives the price basis, such as per bed or per user per month, with the starting price.

Test your page in 30 minutes

  1. Pick one question your page should answer, in your buyers' words.
  2. Copy the section that answers it into a blank document, with its heading and nothing else.
  3. Read it as a stranger. Does it say what "it" is? Does it answer the question in the first two sentences? Is the source for each number inside the copied text?
  4. Search your own website's search box for the question. Note which page and which part of it comes back.
  5. Ask the question in two AI platforms, such as ChatGPT and Perplexity, with web search on. Note which pages they cite and whether any of the cited text is yours.
  6. If your website is on Cloudflare with Search for Agents turned on, send the question to yourdomain.com/.well-known/search?q= and read the chunk it returns.
  7. Write down what you'd change, and re-run steps 4 to 6 after the change has been live for a few days. Run each question more than once, because one run of an AI platform is a sample.
One section pasted alone into a blank document, beside three unchecked boxes: says what "it" is, answers in two sentences, source inside the section.
Paste one section into a blank document and read it with nothing around it.

Check your page

What to do next

Next, learn what makes an AI answer quote a section once it's retrieved: Writing sections AI answers quote. Momentic writes and updates content for AI answers as part of its content service.

Questions about this lesson

What is a chunk in AI search?

A chunk is a piece of a page that a search index stores and returns as one result. On Momentic's index, Cloudflare's AI Search splits pages into chunks of 1,024 tokens, and each chunk repeats the last 10% of the one before.

Do AI platforms read my whole page?

AI platforms with web search read the passages their search step returns and may also fetch a full page. Most don't publish which they did for a given answer.

What changed

Last updated November 2026.

New lesson, November 2026.

More lessons from the Content Academy