Sub topic 12
Writing Pages That Are Easy to Retrieve and Quote
Prerequisites: you should understand basic web crawling and indexing, HTML, HTTP requests, and the general role of a large language model. This chapter focuses on page-level content structure, not crawler permissions or search-engine configuration.
Make each section answer one question
Answer engines retrieve passages, which are short sections of text selected from a page. A passage is easier to use when it answers a specific question without requiring context from several distant sections.
Use a descriptive heading for each question or task. Put the direct answer in the first paragraph. Then add conditions, steps, examples, or supporting evidence. Avoid beginning with several paragraphs of history before stating the result.
For example, a section titled “How long should an API key be?” is easier to match than one titled “Security considerations.” The first heading contains terms that resemble a user’s query and establishes the section’s scope.
A useful section has this shape:
- A question-focused heading.
- A direct answer in one or two sentences.
- Definitions for terms that the reader may not know.
- Conditions, limits, or exceptions.
- A practical example or supporting source.
Keep important claims self-contained
A quoted passage should identify its subject, action, and conditions. Pronouns and vague references make extraction less reliable.
Weak:
> It should be rotated regularly, and this prevents the problem.
Stronger:
> Rotate production API keys every 90 days. Regular rotation limits the time available to misuse a leaked key, but it does not replace immediate revocation after suspected exposure.
The stronger version names the object, gives a measurable interval, and states the limitation. It can stand alone when separated from the rest of the page.
Use short paragraphs for separate claims. Place important numbers, dates, product names, and qualifications in ordinary text rather than only in images, tabs, or interactive widgets.
<section>
<h2>How often should production API keys be rotated?</h2>
<p>
Rotate production API keys every 90 days. Revoke a key immediately
when exposure is suspected.
</p>
<p>
Rotation limits the useful lifetime of a leaked key, but it does not
replace access logging or least-privilege permissions.
</p>
</section>Make the page structure explicit
Use one clear main heading, then organize content with nested headings. Keep heading levels in order. Use lists for ordered procedures and tables for direct comparisons. Give each table a meaningful header and explain abbreviations in nearby text.
| Page element | Retrieval benefit |
|---|---|
| Descriptive heading | Connects a section to a likely question |
| Direct opening sentence | Provides a quotable answer |
| Short paragraphs | Keeps separate claims distinguishable |
| Explicit conditions | Reduces misleading excerpts |
The following flow shows the path from a user question to a useful quoted passage:
Avoid common extraction problems
Do not hide the answer behind client-side interactions if the information is essential. Content loaded only after a button click, placed inside an image, or split across several unrelated sections may be harder to retrieve.
Avoid repeating the same claim with conflicting values. Keep the page’s date, version, and scope clear when the advice can change. When a recommendation applies only to a particular product or release, state that limitation in the same paragraph as the recommendation.
Exercise
Rewrite this sentence so it can stand alone as a useful passage: “This is faster, but it may cost more.”
Show answer
“Batching database writes is faster than sending one request per row, but it may cost more memory because the application holds several rows before sending them.”