Sub topic 1
How AI systems find, select and quote web content
AI answer systems retrieve relevant passages from many sources, rank those passages, and use selected text to compose an answer. They may quote the source directly, paraphrase it, or use it as evidence without showing a citation. Your goal is to make important passages easy to find, understand, and attribute.
Prerequisites
Assume you understand basic HTML headings, paragraphs, lists, and tables. You should also have experience editing web content and know how conventional search results work.
The retrieval pipeline
A typical system processes a question through several stages:
- Crawling: A crawler requests publicly reachable pages.
- Indexing: The system stores text and signals about each page.
- Retrieval: The question is matched against potentially relevant pages or passages.
- Ranking: Candidate passages are ordered by relevance, quality, freshness, and other signals.
- Generation: A language model uses selected passages to write an answer.
- Attribution: The system may link to or cite the sources used.
Different products implement these stages differently. Some use keyword matching, which looks for shared words. Others use embeddings, which represent text as numerical vectors so that related meanings can match even when the wording differs. Most production systems combine several methods.
Why passages, not pages, are retrieved
A page is usually too large to use as one retrieval unit. Systems split pages into chunks, such as paragraphs, groups of paragraphs, list items, or table rows. The exact size and boundaries vary.
A useful chunk can answer a narrow question without requiring several unrelated sections. For example, a paragraph that defines a canonical URL and explains its purpose is more useful than an entire article about website architecture.
Chunking creates a practical constraint: a passage can be separated from its heading, introduction, or surrounding qualification. Write each important passage so its meaning survives this separation.
| Weak passage | Stronger passage |
|---|---|
| “It is often recommended.” | “For a page available at several addresses, use one canonical URL as the preferred address for indexing.” |
Put the answer first
Lead with the conclusion, then add context and conditions. A retrieval system may select only the opening sentences, so do not make readers or models infer the answer from a long introduction.
## How long should I cache API responses?
Cache an API response for as long as its data can be stale without harming users. For data that changes a few times a day, start with a time-to-live of 5 to 15 minutes, then adjust it using freshness and error measurements.
A time-to-live (TTL) is the period before a cached response expires...The first two sentences answer the question directly. The rest explains the technical term and the decision process.
Make claims specific and attributable
Prefer claims with a clear subject, action, number, condition, and source. Replace “experts recommend fast pages” with “Google’s Core Web Vitals documentation defines a good largest contentful paint as 2.5 seconds or less.” Name the source near the claim and link to the supporting document when appropriate.
State limits too. A recommendation that applies only to small sites, a particular software version, or a specific date should say so. Clear qualifications reduce the chance that a generated answer will repeat your claim incorrectly.
A practical review
For each target question, inspect the first passage that answers it:
- Does the heading resemble a real question?
- Is the direct answer in the first one to three sentences?
- Can the passage stand alone if its heading is removed?
- Does it define unfamiliar terms?
- Does it include useful numbers, conditions, or named sources?
- Is the information current?
Exercise
Exercise
Rewrite this opening so an AI system can retrieve a clear answer: “Caching is a broad topic with many possible strategies. Teams should consider traffic patterns before deciding what to do.”
Show answer
“How long should you cache API responses? Cache them for as long as the data can be stale without harming users. For data that changes a few times a day, start with a 5 to 15 minute TTL, then adjust it based on freshness requirements.”