Sub topic 6
Lead Each Section with the Direct Answer
What this chapter assumes
You should know how to write headings, paragraphs, lists, and tables in HTML. You should also have read the earlier chapters on how retrieval systems split pages into passages, on heading hierarchy, and on descriptive headings. This chapter covers the first sentences under a heading. They are the most likely part of a section to be quoted.
Why the opening sentence matters
A retrieval-based answer system does not read your page like a person. It splits the page into passages, scores each passage against the user's question, and passes the best ones to a language model. The model then writes an answer, sometimes quoting or linking to your text.
Two consequences follow:
- A passage is judged on the text it contains. If the answer sits three paragraphs below the heading, it may land in a different passage from the heading that gives it context.
- A model that must pick a short span to quote prefers a sentence that makes a complete claim. A sentence like "Let's look at this in more detail" has nothing to quote.
An answer-first section states its conclusion in the first one or two sentences. The rest of the section supports that conclusion. Journalists call this the inverted pyramid, and it also serves people who scan.
No format guarantees citation. Answer-first writing makes your content easier to extract and verify. It does not control what a given system chooses.
Anatomy of an answer-first section
An answer-first section has three parts, in this order:
- A heading that names the question or topic.
- An opening paragraph of one to three sentences that answers the heading directly.
- Supporting material: reasons, steps, a table, exceptions, or examples.
Compare two versions of the same section.
<h2>Does a factory reset delete my Wi-Fi password?</h2>
<p>Routers have been around for decades, and over time manufacturers
have added many features. Resetting is a topic that confuses people,
because there are several kinds of reset. Let's walk through them.</p>
<p>A factory reset restores the default configuration, which includes
the default Wi-Fi password.</p><h2>Does a factory reset delete my Wi-Fi password?</h2>
<p>Yes. A factory reset erases your custom Wi-Fi password and restores
the default one printed on the router's label.</p>
<p>A simple restart does not change any settings, so use that first
if you only have connection problems.</p>The second version puts the answer in the first word and then adds the one qualification a reader needs. A system that retrieves only the first 40 words of the section still gets a correct, quotable answer.
Rules for the opening sentence
Repeat the subject of the question
Do not open with "Yes" alone or "It" alone. A passage can be lifted out of context, so the sentence should name its subject. "Yes. A factory reset erases..." works because the second sentence carries the subject. "Yes, it does." does not stand alone.
Put the answer before the reasoning
Give the conclusion, then the because. "Use an ordered list for steps, because the sequence matters" is better than "Because sequence matters in some content, you may want to consider...".
Use the same vocabulary as the heading
If the heading asks "How long does a reset take?", the answer should say "A reset takes about two minutes", not "The process usually completes in a short period." Repeating the key terms keeps the heading and the passage matched for both people and retrieval scoring.
Keep it short and concrete
Aim for an opening of about 15 to 40 words. State a number, name, or yes/no value where one exists. If the first sentence runs past 40 words, split it and check that the first half still stands as an answer.
Avoid filler openings
These patterns delay the answer. Delete them or move them later.
- "In this section we will..."
- "Have you ever wondered..."
- "Before we begin, it is important to understand..."
- "There are many factors to consider."
Match the opening to the question type
Different questions need different first sentences. The table shows the usual pattern for each.
| Question type | Example heading | Opening pattern | What follows |
|---|---|---|---|
| Yes/no | Can I use two routers? | "Yes." plus the condition | Conditions or exceptions |
| Definition | What is a mesh network? | "A mesh network is a..." | Short example |
| Quantity | How long does setup take? | The number and unit | What changes it |
| Procedure | How do I reset the router? | One-sentence summary of the method | Ordered list |
| Comparison | Mesh or extender? | Name the winner per use case | Table |
| Cause | Why does Wi-Fi drop? | The most common cause | Other causes as list |
For the procedure and comparison rows, the opening sentence does not replace the list or table. It summarizes it. A system that quotes only the sentence still gives a correct result, and one that quotes the list gets the detail.
Sections whose answer is not one sentence
Some questions have no short answer. Answer-first still applies, but the opening changes.
Answers that depend on conditions
Do not open with "It depends." State the deciding condition and the result for each case. For example: "Choose a mesh system if your home has more than two floors or thick walls. Choose a single router for a small apartment." This is still a direct answer. It gives the rule for choosing.
Answers with a safety warning
If skipping a step could cause damage or data loss, put the warning first. A warning that changes the answer belongs in the opening, not after it.
Keep the warning short, then give the answer paragraph right after it. Do not hide a warning inside a long paragraph.
Sections that are narrative or argumentative
Not every section is a question. A section on the history of Wi-Fi or an opinion essay can open with a thesis sentence: "Wi-Fi became mainstream because of a 1999 certification program, not a technical breakthrough." One clear claim at the top still helps scanning and extraction.
Answer-first and self-contained sections work together
The previous chapter said each section should be understandable alone. Answer-first is how you do that in practice. If you write the opening sentence as if it were the only text someone sees, it must:
- name the subject instead of using "it" or "this",
- include the unit, product name, or version if it affects the answer,
- avoid references such as "as mentioned above".
Test it: copy the heading and the first paragraph into an empty document. If a stranger can still understand and use the answer, the section passes.
Flow of a well-formed section
The diagram shows the order and what each part is for.
Checking openings with a script
You can find many weak openings automatically. The script below reads HTML, finds the first block after each h2 or h3, and flags sections with no opening paragraph or a filler opening. It uses only the standard library.
import re
from html.parser import HTMLParser
FILLER = (
"in this section",
"in this article",
"welcome",
"before we",
"have you ever",
"there are many",
"it depends",
)
class Sections(HTMLParser):
def __init__(self):
super().__init__()
self.in_heading = False
self.in_p = False
self.buffer = []
self.pending = None # heading waiting for its first block
self.sections = [] # (heading, first paragraph text or None)
def handle_starttag(self, tag, attrs):
if tag in ("h2", "h3"):
if self.pending is not None:
self.sections.append((self.pending, None))
self.in_heading = True
self.buffer = []
elif tag == "p" and self.pending is not None:
self.in_p = True
self.buffer = []
elif tag in ("ul", "ol", "table") and self.pending is not None:
self.sections.append((self.pending, None))
self.pending = None
def handle_data(self, data):
if self.in_heading or self.in_p:
self.buffer.append(data)
def handle_endtag(self, tag):
if tag in ("h2", "h3") and self.in_heading:
self.pending = " ".join("".join(self.buffer).split())
self.in_heading = False
elif tag == "p" and self.in_p:
text = " ".join("".join(self.buffer).split())
self.sections.append((self.pending, text))
self.pending = None
self.in_p = False
def close(self):
super().close()
if self.pending is not None:
self.sections.append((self.pending, None))
self.pending = None
def check(html):
parser = Sections()
parser.feed(html)
parser.close()
for heading, text in parser.sections:
if text is None:
print(f"FLAG {heading} - no opening paragraph")
continue
first = re.split(r"(?<=[.!?])\s", text)[0]
words = len(first.split())
if first.lower().startswith(FILLER):
print(f"FLAG {heading} - opens with filler")
elif words > 40:
print(f"FLAG {heading} - first sentence has {words} words")
else:
print(f"OK {heading} ({words} words)")
sample = """
<h2>What does a factory reset do?</h2>
<p>A factory reset erases all saved settings.</p>
<h2>How do I reset the router?</h2>
<p>In this section we will look at the steps.</p>
<h2>Which plan fits a small team?</h2>
<ul><li>Team</li></ul>
"""
check(sample)Running it prints:
OK What does a factory reset do? (7 words)
FLAG How do I reset the router? - opens with filler
FLAG Which plan fits a small team? - no opening paragraphThe script is a screening tool. It cannot tell whether the first sentence is correct or whether it answers the heading. A human still reads the flagged and unflagged sections.
A heading followed directly by a list is not always an error. Add a one-sentence summary above the list anyway, so the passage has a stand-alone claim.
Common errors
- Answer in the second paragraph. The first paragraph is context and the answer comes later. Swap them, or delete the context.
- Pronoun-only openings. "It takes about two minutes" loses its subject when extracted. Write "A router reset takes about two minutes."
- Marketing before the answer. Brand claims at the top of every section dilute the passage. Put them in a separate section.
- Heading and answer mismatch. The heading asks about price and the paragraph discusses features. Fix the heading or the paragraph.
- False certainty. Do not state a firm answer you cannot support. If the answer varies by model, say so in the first sentence: "On most consumer routers, a reset takes about two minutes."
- Answer in an image or tab. Text only in a screenshot, collapsed widget, or script-rendered block may never reach the retriever. Keep the answer in visible HTML text.
Summary of the practice
For each h2 and h3, write the heading, then answer it in one to three sentences using the heading's terms, then add support. Put warnings first when they change the answer. Run a script to catch filler and missing openings, and read the results yourself.
Exercise
Rewrite this opening so it is answer-first. Heading: "How often should I update router firmware?" Paragraph: "Firmware is the software that runs your router. Manufacturers release it for many reasons, and opinions differ on timing. Some people update immediately, while others wait."
Show answer
Example: "Check for router firmware updates every three months, and install security updates as soon as they are released. Firmware is the software that runs the router, and updates fix security flaws and bugs." The answer comes first, repeats the heading's terms (router, firmware, update), gives a concrete interval, and moves the definition to second place.
Exercise
A section's first sentence is "It usually takes a few minutes." Give two problems with it as an extractable opening, and fix it for the heading "How long does a router reset take?"
Show answer
The sentence uses the pronoun "it" with no subject, so it is meaningless when quoted alone, and "a few minutes" is vague. A fix: "A router factory reset takes about two minutes, including the restart." It names the subject, uses the heading's terms, and gives a number.
Exercise
The script flags a heading followed directly by a table with "no opening paragraph". Is this always an error, and what should you do?
Show answer
It is not always an error, because a table can be valid content. Still, add a one-sentence summary above it that states the main finding, such as which plan is cheapest for one user. This gives the passage a stand-alone claim, and the table supplies the detail.