Sub topic 2
Why Passages, Not Pages, Are What Get Retrieved
This chapter assumes you can write basic HTML (headings, paragraphs, lists, tables), have edited web content such as docs or help articles, and know roughly how a search results page looks. It covers one idea: AI answer systems usually work with pieces of your page, not the whole page. Once you see how pages are split, many writing habits in later chapters will make sense.
The short version
An AI answer system rarely reads your whole page and then decides what it thinks of it. In a typical retrieval pipeline, the page is cut into passages (also called chunks). Each passage is indexed on its own. When someone asks a question, the system looks for the passages that best match it and gives those passages to a language model to write the answer. The page is the container. The passage is the unit that gets found, ranked and quoted.
Systems differ in the details, and vendors rarely publish them. Treat what follows as a working model that is accurate for many retrieval-augmented systems, not as a specification of any one product.
A working model of the pipeline
Retrieval-augmented generation (RAG) is the common pattern behind many AI search tools. The model does not answer from memory alone. It first fetches relevant text, then writes an answer based on that text.
A simplified pipeline looks like this:
- Crawl or fetch. The system obtains your page, either ahead of time or at the moment of the question.
- Extract. It strips navigation, scripts and boilerplate, keeping the main text and some structure.
- Chunk. It splits the text into passages.
- Index. It stores each passage, often as a text index, as a vector embedding, or both.
- Retrieve. For a query, it finds the best-matching passages across many pages.
- Generate. A language model reads the top passages and writes an answer, often with links to the sources.
Two terms need defining. An embedding is a list of numbers that represents the meaning of a piece of text, so that texts with similar meaning get similar numbers. Semantic matching compares the embedding of the question with the embeddings of the passages and returns the closest ones. Many systems combine this with keyword matching, so wording still matters.
How pages get split
There is no single chunking rule. Common approaches include:
- Fixed size. Cut every N tokens or characters, sometimes with overlap between neighbouring chunks.
- Structure-based. Cut at headings, paragraph breaks, list boundaries or table boundaries.
- Sentence-based. Group whole sentences until a size limit is reached.
- Hybrid. Split by structure first, then split any oversized section by size.
A token is a small unit of text, roughly a short word or part of a word. Chunk sizes of a few hundred tokens are common, but that is a convention and not a rule.
You usually cannot see or control how your page is split. You can, however, write so that every reasonable splitting method gives acceptable results. A page with clear headings, short paragraphs and self-contained sections survives structure-based, sentence-based and fixed-size chunking. A page with long, winding paragraphs only survives by luck.
What a chunk usually does and does not carry
A chunk is mostly just its own text. Depending on the system, it may also carry a little metadata: the page title, the URL, and sometimes the nearest heading. It does not reliably carry the rest of the page.
This has a direct consequence. Suppose a passage says:
It defaults to 30 seconds, but you can raise it with the option described above.Cut out of its page, "it" has no referent and "above" points to nothing. A retrieval system may not match this passage to a question at all, because it contains no subject. If it does match, the model cannot quote it without guessing. Compare:
The request timeout defaults to 30 seconds. You can raise it with the timeout_ms option in the client configuration.This version names its subject and gives the full fact. It works wherever it lands. Chapter on self-contained passages returns to this in detail. Here the point is why it matters: the unit of retrieval is the passage, so the passage has to carry its own meaning.
Page-level signals still exist
"Passages, not pages" is a simplification. Page-level factors still influence which passages are considered:
- Crawl access. If a crawler cannot fetch the page, none of its passages exist for that system.
- Page quality and trust signals. Many systems pre-filter or rank sources by reputation, freshness or relevance of the whole page and site.
- Title and URL. These often travel with each chunk and add context.
- Duplicates. If several pages contain the same text, systems may keep one and drop the rest.
So the practical model is two-stage. The page must be reachable and credible enough to be in the candidate pool. Then individual passages compete on how well they answer the question.
Consequences for how you write
Because passages are the unit, several habits follow.
| Page-oriented habit | Passage-oriented habit |
|---|---|
| Build up to the answer over several paragraphs | State the answer in the first one or two sentences of the section |
| Use pronouns that refer to earlier sections | Repeat the noun so the passage stands alone |
| Use vague headings such as "Overview" | Use headings that name the topic or question |
| Put a key fact in the middle of a long paragraph | Give each key fact its own sentence near the start of a short paragraph |
| Say "see the table above" | Name what the table shows, or repeat the key value in text |
| Depend on the intro to define terms | Define the term in the section that uses it |
None of this means writing in disconnected fragments. A human reader still benefits from flow. The goal is that each section can be read alone without becoming misleading.
A worked example
Here is a passage from a hypothetical help article, as originally written.
## Limits
As mentioned earlier, this applies to free accounts only. After you cross it, the service slows down, and in some cases you will see an error. You can avoid this by following the steps in the previous section.Imagine a user asks, "What is the API rate limit on the free plan?" This passage has several problems when lifted out:
- The heading "Limits" says nothing about what is limited.
- "This" and "it" have no antecedent, so the passage never states the limit.
- It gives no number, so there is nothing specific to quote.
- "The previous section" points outside the passage.
A rewrite for passage retrieval:
## What is the API rate limit on the free plan?
The free plan allows 60 API requests per minute per account. When you exceed that limit, the API returns HTTP status 429 (Too Many Requests) until the next minute begins. Paid plans have higher limits, listed in the pricing table.The heading matches the question. The first sentence contains the answer. The subject ("free plan", "API requests") is named. The passage is about 50 words, and every sentence is true on its own. The numbers here are invented for the example. In your own content, use real values and keep them current.
Edge cases
- Tables. Some extractors flatten tables into text and lose the header row. If a table cell is meaningless without its header, add a sentence that states the key facts in prose, or make cell text self-explanatory.
- Long lists. A list split across chunks can lose its introduction. Put the subject in the lead-in sentence and keep lists short enough to stay together where you can.
- JavaScript-rendered content. If text appears only after scripts run, some crawlers will never see it. Check what a plain fetch of your page returns.
- Tabs and accordions. Hidden content may or may not be extracted. If a fact matters, make sure it is present in the page's HTML source and not loaded only on click.
- Very long pages. The longer the page, the more chunks it produces, and the more important it is that each section has its own descriptive heading.
- Repeated boilerplate. Cookie notices, footers and sidebars can be chunked and indexed alongside your content. Using semantic elements such as
main,navandfooterhelps extractors separate them.
A quick self-check you can run
Take any section of your own content and test it as a lifted passage.
- Copy only the heading and the section text into a blank document.
- Read it as a stranger who has seen nothing else on your site.
- Ask whether the subject is named, the answer is stated, and every term is defined or obvious.
- Ask whether a model could quote the first two sentences without the quote being misleading.
- Fix any "this", "it", "above" or "as noted" that points outside the passage.
If a section fails, the fix is almost always to add the missing noun, number or definition, not to add more words.
Exercise
A section titled "Details" begins: "As discussed above, it expires after a set period, which you can change in the settings." Name three problems this passage has when retrieved on its own, and rewrite the first sentence so it works as a standalone answer to the question "How long does an API token last?" Assume the real value is 24 hours.
Show answer
Problems: (1) the heading "Details" does not name the topic or match any question; (2) "it" and "As discussed above" refer to text outside the passage, so the subject is unknown; (3) "a set period" gives no specific value to quote. A rewrite: "An API token expires 24 hours after it is created. You can change the lifetime in the token settings." A better heading would be "How long does an API token last?"
Exercise
Why does using semantic HTML elements such as main, nav and footer help with passage retrieval, even though the chunking method is unknown?
Show answer
Extraction runs before chunking. Semantic elements help an extractor separate the main content from navigation and boilerplate, so the chunks are built from your actual content and not from menus or footers. It improves the odds but does not guarantee how any particular system behaves.