Sub topic 1
How AI systems find, select and quote web content
Prerequisites
This chapter assumes you know basic HTML, including headings, paragraphs, lists, and tables. You should have edited web content before, such as documentation, blog posts, or help articles. You should also understand how search results appear to users.
How AI systems find, select and quote web content
AI answer systems work in stages. A crawler fetches your page. The system splits the page into passages, stores them in an index, and retrieves the passages that best match a user's question. A language model then reads the retrieved passages and writes an answer, sometimes with a link back to the source.
Each stage filters content. A page the crawler never fetches cannot be quoted. A passage that matches the question poorly never reaches the model.
Why passages, not pages, are what get retrieved
Retrieval systems usually score small chunks of text, often a few paragraphs under one heading, rather than whole pages. Each chunk competes on its own. A section must therefore carry its own meaning. If the answer depends on text three sections earlier, the chunk holding the answer may lack the context needed to make sense.
What this means for writing
- Give each section one clear topic.
- Put the key term in the heading or the first sentence.
- Avoid opening a section with "it" or "this" when the referent appears elsewhere.
Putting the answer first
Answer-first writing places the direct answer in the first one to three sentences under a heading, then adds context. A retrieved chunk then starts with the answer, which is the part a model is most likely to quote.
Before and after
Before:
Caching has been used for decades, and teams approach it in many ways. One option is a time-based expiry that some teams find useful.After:
How long should I cache API responses? Cache responses for as long as the data can stay slightly out of date without harming users. For data that changes a few times a day, a time-to-live (TTL) of 5 to 15 minutes is a common starting point.Exercise
A returns page opens with the company's founding history and mentions the return policy in the fourth paragraph. Rewrite the opening so the answer comes first. What should the first sentence say?
Show answer
State the policy directly, for example: "You can return unused items within 30 days for a full refund." Then add context in the following sentences, such as how to start a return.