Subscribe to Newsletter
Featured snippetsPatentsHeadings

Answer passages and SEO headings: how Google uses your heading hierarchy to pick a featured answer

By 9 min read

A context score for an answer passage is an adjustment of a passage's answer score based on where the passage sits in the page: the headings above it, the question they ask, and the shape of the text around it. Patent US 9,959,315 B1, "Context scoring adjustments for answer passages," describes it. Google filed it on January 31, 2014, and the patent was granted on May 1, 2018.

What does patent US 9,959,315 describe?

Patent US 9,959,315 describes a context scoring process that re-scores the candidate passages competing to answer a question query, using the structure of the pages they come from. Its 4 inventors are Nitin Gupta, Srinivasan Venkatachary, Lingkun Chu and Steven D. Baker. The patent holds 20 claims and 7 drawing sheets.

The patent presents these context signals as partly "query-independent," scored "independently of their relatedness to terms of the query." They account for relevance signals that the query-dependent scoring may miss, so that "long answers that are more likely to satisfy the user's informational need are more likely to surface."

The patent targets questions that need explanations. It calls them "long answers" or "answer passages," as opposed to short facts given in a "one box," and gives the example [why is the sky blue], where "an answer explaining Rayleigh scatter is helpful." The patent does not use the term "featured snippet," but it describes the answer box with a passage that appears above the results.

How does Google pick candidate answer passages?

Google picks candidate passages from text sections of one or more resources, then gives each one an answer score. A query question processor first decides whether the query is a question, specific like [How far away is the moon] or implicit like [distance of the earth from the moon], with language models, machine learning, knowledge graphs, grammars or a combination of them. Each candidate is one or more sentences, or up to a maximum number of characters, taken from the section that sits under a heading. Several candidates can come from the same section.

The initial answer score can rest on 3 considerations: "matching a query term to the text of the candidate answer passage; matching of answer terms to the text of the candidate answer passages; and the quality of the underlying resource." The context score then adjusts that answer score: "an additive process, a multiplicative process, etc." The context score can be a single score that scales the answer score, or a series of discrete boosts. When several boosts apply, the system can keep the largest one or combine them, then selects the passage with the highest adjusted score.

What is a heading vector?

A heading vector is the path of headings from the root of the page down to the heading the passage sits under. The root heading is, for example, the title of the page. Headings are detected from heading tags in the DOM, or from the anchor text of internal links that jump to a section. A text section is "subordinate" to a heading when it directly descends from it, even if it is not adjacent to it.

The patent's example page about the Moon gives this hierarchy:

  • Root: About The Moon
  • H1: The Moon's Orbit
  • H2: How long does it take for the Moon to orbit Earth?
  • H2: The distance from the Earth to the Moon
  • H1: The Moon
  • H2: Age of the Moon
  • H2: Life on the Moon

A passage under "The distance from the Earth to the Moon" has the vector <About The Moon, The Moon's Orbit, The distance from the Earth to the Moon>.

How does heading depth change the score?

Heading depth changes the score because deep passages receive a larger boost than shallow ones. The depth counts the parent headings above the passage's heading, up to the root: a passage under an H2 has a depth of 2 (its H1 and the root), or 3 if the H2 itself is counted. With an example threshold of 2, a passage at depth 1 is "shallow" and a passage at depth 2 or more is "deep."

The patent gives example values: a first boost factor of 1.0 or less for shallow passages, and a second factor "larger than 1.0" for deep ones. In another version, each additional level adds its own adjustment: "The deeper the depth, the greater the increase." Claims 2 and 3 protect this depth scoring.

How do headings that match the question change the score?

Headings that match the question earn match boost factors, from the strongest to the weakest in 3 levels:

  1. Last heading match: the score of the heading right above the passage, taken alone, is the highest of the scores. For [How far away is the moon], "The Distance from the Earth to the Moon" wins the first and largest boost, which can be fixed or proportional to the similarity.
  2. Penultimate match: the heading and its parent, read together, match the question. The patent's example: the query [How to get speeding ticket dismissed in South Carolina] matches the pair "Traffic Ticket FAQ in South Carolina" and "How can I get my traffic ticket dismissed?" This wins a smaller second boost.
  3. All headings match: the headings of the whole path match the question above a minimum threshold, a sign that "the page as a whole may be directed to an answer." This wins the smallest third boost.

If none of these conditions holds, the passage receives no match boost at all.

A simpler version computes a single similarity score between the question and the heading text, from the closest heading or several headings put together, and adjusts the answer score by that score, possibly only above a similarity threshold. The text of the passage itself can also be compared to the headings. Similarity can rely on "term matching, synonym matching, etc." In the Moon example, the vectors with a distance-related heading beat the vector about the orbit's duration, "based on the term 'far.'"

What is the passage coverage ratio?

The passage coverage ratio is the share of its text block that a candidate passage covers, measured in characters, words or sentences. A small ratio "may indicate the candidate answer passage is incomplete," while a high one indicates that the passage "captures more of the content of the text passage from which it was selected."

The text block can be the section the passage comes from, or a wider block that adds the sibling sections sharing the same parent heading. The patent gives example thresholds of 0.3, 0.35 or 0.4. Below the threshold, the passage receives a first factor, possibly neutral at 1.0; at or above it, a second factor such as 1.1. In the Moon example, passage 1 has the highest ratio, passage 2 the second and passage 3 the lowest, and all 3 meet the threshold. On this criterion, a short section that the passage covers almost entirely beats a long section from which the passage takes a fragment.

Which other features earn a boost?

3 other features earn a boost, according to the patent:

  1. Distinctive text: text formatted to look different, for example bold text inside the section that is not a heading and not part of the passage, joins the heading vector and adds one level of depth, which "may result in a slight boost" depending on the scoring scheme.
  2. A preceding question: a question in the text before the passage earns a boost "inversely proportional to the text distance," and the check stops at the first question found. The boost can also depend on whether the question is a heading and whether the passage sits under that heading. When a question is anchor text in a navigation list, it only counts as preceding the section it links to. In the Moon page, the passage that directly follows "Why is the distance changing?" (passage 3) wins the highest question boost, passage 1, right after "How long does it take for the Moon to orbit Earth?", the second, and passage 2, which contains the question itself, the smallest.
  3. A list: a list signals steps, which matter for "step modal" queries such as [How to install a door knob] or [How do I change a tire]; list detection may be limited to these queries. Lists are detected from HTML tags, microformats, semantic meaning or consecutive headings at the same level with similar phrases, such as "Step 1, Step 2" or "First; Second; Third."

The patent scores the quality of a list. A list "in the center of a page" with few links to other pages beats a list "at the side of a page" made mostly of links, which looks like a reference list. The list boost can be fixed or proportional to that quality score. It can also grow when the other features score high, because their combination "is a strong signal of a high quality" answer.

Does the context score change the winner?

Yes: the context score can reverse the initial order. In the patent's example, 3 candidates come from the Moon page. Passage 2, which starts with "Why is the distance changing?", has the highest initial score, followed by passage 3, then passage 1. After the context adjustments, passage 3, the same text without the question sentence, ranks first and becomes the answer, followed by passage 2, then passage 1.

The scoring of the passages themselves, with query terms and expected answer terms, is the object of a companion patent on scoring candidate answer passages, signed by Steven D. Baker and Srinivasan Venkatachary as well.

What does the context scoring patent change for your SEO?

The patent means that the structure of a page decides which passage Google can lift as an answer. 6 consequences follow:

  1. Write headings that ask or state the question. The heading right above the answer earns the largest match boost when it is the closest to the query.
  2. Nest precise subheadings under broader headings. Deep passages under specific subheadings beat shallow passages, and a heading plus its parent can match a long query together.
  3. Keep answer sections short and complete. The coverage ratio rewards a passage that covers most of its section: put the answer in a short section instead of burying it in a long one.
  4. Place the question just before the answer, not inside it. A preceding question boosts the passage that follows it, more when the distance is short; in the patent's example, the passage that starts after the question beats the one that includes it.
  5. Use real lists for steps. For "how to" queries, a list in the main content, with few links, earns a list boost.
  6. Bold the key terms of the section. Distinctive text adds a level to the heading vector, which may add a slight boost.

During on-page optimization, we rebuild the heading hierarchy so that each question heading sits directly above a short section that answers it.

The same logic of self-contained passages helps generative summaries verify and cite a page.

The patent describes what Google's system can do. It does not confirm that featured snippets use these exact boosts today.

Quick quiz

Did you get it?

Test what you just read.

Question 1 of 4

What is a heading vector?

Related articles

We read the patents so you don't have to.

Every week: 3 data-backed SEO insights, 1 myth busted, 1 pattern to steal. No fluff. No guru advice.

Free forever. Unsubscribe anytime. We respect your inbox. Privacy.