Repository navigation
fix(seo): backfill only title copies and missing descriptions; fix retries - #1917
Merged
Merged
Conversation
…tries A 10-page and a 15-page pilot of the backfill showed three problems: - It rewrote authored descriptions that were only a few characters over or under the limit. By default it now acts only on a missing description or one that repeats the title (BACKFILL_RULES). --include-length restores the old behavior. Across the docs that is 16,134 pages in scope (414 missing, 15,720 title copies); 431 authored, length-only descriptions are left alone. - About 1 page in 5 failed because a draft stayed over 160 characters. The prompt now aims for 100-145, and a rejected draft goes back to the model with the draft and the reason, to be shortened or corrected, for up to three tries. The same 15 pages then all succeeded. - A page with no frontmatter failed after spending model calls. It is now reported as skipped, with no call. The backfill also prints the model usage (calls, input and output tokens, per page), so a large run can be costed first. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Running the backfill's orchestration on the smallest product (23 pages) showed
16 failures. Four causes, all fixed:
- Output budget: the draft and verifier calls were capped at 400 and 600 tokens.
A model that thinks first spends some of that before writing, and a cap that is
too small returns no text (stop_reason max_tokens), which surfaced as
"Unexpected end of JSON input". Both now allow 4000; the reply is still one
short sentence (about 150 output tokens per page on average).
- An empty or cut-off reply is now a rejected attempt that is retried, not a
crash.
- Product name: the verifier flagged a draft that used the product's configured
name ("Strongpoint for NetSuite Flashlight") when the page only says
"Flashlight". The draft now follows the page's own spelling, and the verifier
accepts the configured name. The verifier also lists at most 3 unsupported
claims, briefly.
- Style: the drafts broke house rules (Oxford comma, and others). Each draft is
now checked with the repo's Vale on just its description line, and a violation
goes back to the model like any other rejection.
The same 23 pages then all succeeded and passed the quality check.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 30, 2026
A check of the first backfill PRs found descriptions that said things their pages do not: "AI-powered Navigator" (the page says "an AI assistant"), WMI added to a list of protocols the page does not list, "MySQL" and "PostgreSQL" on pages that never name them. The model had added plausible details from its own knowledge, and a yes/no "is this grounded?" check let some of them through. The check is now evidence-based, in two layers: 1. Terms. Every number, acronym, identifier, and capitalised name in the description, and each part of a hyphenated word, must be on the page (the product's own name excepted). This rejects a draft before any model call. 2. Quotes. A second model call must split the description into claims and quote, from the page, the text that states each one. Code confirms each quote really is on the page (ignoring markdown, case, and spacing), and that every number, acronym, and identifier in the description appears in the text quoted for some claim. A claim with no quote, or with an invented one, fails. A rejected draft goes back to the model with the reason and is told to drop whatever the page does not state; after three tries the page keeps its current description. The drafting prompt now forbids adding anything from the model's own knowledge of the product. auditDescription() runs the same check on a description that already exists, to audit earlier work. Pilot, before this goes further: - All 3 known fabrications are caught when re-checked (199 earlier descriptions re-checked; 43 fail, about 6% of a random sample looked like real problems, and about 4% are false positives, where a true claim was not quoted verbatim). - The 3 pages that were fabricated now produce accurate descriptions. - Password Reset, from scratch: 46 of 48 pages accepted (1 has no frontmatter, 1 was a network error); 8 read by hand against their pages were all supported. A false positive costs only coverage: the page keeps its current description. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Code ReviewNo blocking issues found. The changes are limited to What I checked:
Minor, non-blocking:
|
This was referenced Dec 1, 2026
This was referenced Dec 1, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The first backfill PRs (now closed) had descriptions that said things their pages do not. A check found, for example, "AI-powered Navigator" (the page says "an AI assistant"), WMI added to a list of protocols the page does not list, and "MySQL" and "PostgreSQL" on pages that never name them. The model added plausible details from its own knowledge, and a yes/no "is this grounded?" check let some through.
This PR makes the check evidence-based and fixes some problems the pilots exposed. The generated descriptions must match what is in the doc.
What changes
Every claim needs evidence.
A rejected draft goes back to the model with the reason and is told to drop anything the page does not state. After three tries, the page keeps its current description. The drafting prompt now forbids adding anything from the model's own knowledge.
Also from the pilots:
--include-lengthto change that).Pilot results
A false positive costs only coverage: the page keeps its current description.
Testing
npm run test:scriptspasses (93 SEO tests).🤖 Generated with Claude Code