Repository navigation
Conversation
The 12 JSON sets become judgement sets (relevance/*.judgements.yaml) with the floors as gates per search path, and the ranks are verified snapshots, so a move within noise passes and a real regression fails. A judged page missing from the index is a stale miss in the report instead of a silently skipped query. Floors for five set/path pairs are re-baselined to the current dev index (rounded down): success@3 for agent-style-queries (full, navigation, mcp) and titles-truncated-40 (navigation), success@1 for author-written-questions (full, navigation). Bumps Nullean.Snapshots.* and the snap tool to 0.21.0, adds Nullean.Snapshots.Relevance, and lifts AngleSharp and System.IO.Abstractions to match. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The navigation first-hit, natural-language, page-title, half-typed, title-typo and API first-hit tables become judgement sets (relevance/*.judgements.yaml) with a gate per search path and verified snapshots of the ranks, run by one test per set and path the set has gates for. A case is generated only for a gated path, so a skip means the run could not measure. Deliberate changes: - An alternate first hit is no longer rated or checked: judy counts any rated page as relevant for success@k, so rating alternates would have loosened the first-hit check. The old 'alternate appears in the top 5' check is dropped. - The per-case _explain dump on a mismatch is replaced by judy's misses and stale-judgement lists. ExplainTopResultAndExpectedAsync keeps its own test. - Both copies of a Serverless twin are rated for the API operations, as the old check matched the operation, not the API. - A judged page missing from the index is reported as a stale judgement and still scored as a miss; the old code skipped such queries. - Gates are set to the current dev index (rounded down) where it falls short of the old all-pass expectation: navigation-first-hits success@1 0.62, natural-language-questions success@3 0.85, api-first-hits success@1 0.97. The page lookup threshold now never asks for more than half of a small set, so a 12-query set is not always skipped. ApiSearchRelevanceReport reads its queries from the api-first-hits set. Behaviour tests (tree scope, fields, routes, named-query scores, paging) stay as they were. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
akira28
approved these changes
Dec 3, 2026
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/5113/ |
Each query of the 18 sets carried a tag equal to the set's own name, which judy's docs-builder importer added and the generated sets copied. It only produced a by_tag block in every snapshot that equals the overall scorecard. The set's name is already in the set and in each snapshot. Also mark the verified snapshots as generated, so GitHub collapses them in a pull request diff. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The verified relevance snapshots shrink from 602 KB and 31,516 lines to 127 KB and 3,108 lines: a query is one [first, ndcg@10] row. The scores are unchanged; only the layout is. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
reakaleek
approved these changes
Dec 3, 2026
The relevance snapshots are unchanged: 27 of 27 cases match on the same index. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch was successfully 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 search relevance checks were two home-grown shapes: 12 JSON sets scored by
RelevanceSet.MeasureAsyncagainst hand-set floors, and about 200 inline C# rows asserting a first hit or a top-3 hit. Neither kept per-query results, so when a floor failed there was no baseline to compare against, and a query whose expected page was missing from the index was dropped without a word.This moves both onto judy (judgement sets, graded metrics, gates) and
Nullean.Snapshots.Relevance(the ranks as a verified snapshot, withsnap reviewto accept a change).What
Commits that can be reviewed (or split) separately: the sets on judy, the inline tables as sets, and the compact snapshots.
1. Run the search relevance sets on judy
relevance/*.judgements.yaml. The old floors are gates per search path (full,navigation).RelevanceSet.csis gone.RelevanceSearchholds the judy target, the "is this page in the index" lookup and the sets directory.SemanticSearch_AgentStyleQueries_MeetTheFloor) runs the same set against anmcptarget and checks the gates.Nullean.Snapshots.*and thesnaptool to 0.24.1 (which brings judy 0.3.0), addsNullean.Snapshots.Relevance, and liftsAngleSharpandSystem.IO.Abstractionsto match their dependencies.2. Move the inline ranking tables to judgement sets
ApiSearchRelevanceReport(explicit) reads its queries fromapi-first-hits.Small snapshots. A query is one line in the verified snapshot,
[first, ndcg@10], with the columns named once in a header. The 27 snapshots are 127 KB and 3,108 lines (from 602 KB and 31,516 lines), and GitHub collapses them by default throughlinguist-generated. The per-querytags:blocks are gone from the sets: the set's name was repeated on every query.How a run decides
snap review. A drop that is statistically significant (paired test, p < 0.05), a changed query list or an errored search fails.Deliberate behaviour changes
success@k, so rating an alternate first hit would have loosened the first-hit check. The old "alternate appears in the top 5" check is gone._explaindump on a mismatch is replaced by judy's misses and stale lists.ExplainTopResultAndExpectedAsynckeeps its own test.titles-truncated-40navigation success@3 0.76 to 0.73;agent-style-queriessuccess@3 0.72 to 0.70 (full,mcp) and 0.68 (navigation);author-written-questionssuccess@1 0.56 to 0.54 (full) and 0.54 to 0.53 (navigation). The new sets use today's numbers:navigation-first-hitssuccess@1 0.62,natural-language-questionssuccess@3 0.85,api-first-hitssuccess@1 0.97, and 1.0 for the others.Worth a look
elasticsearch get started,elasticsearch getting startedanduniversal profilinginnavigation-first-hitspoint at pages that are not in the index. Check whether the pages were renamed or the dev index lacks them.Output plugins for Logstashandindex.number_of_replicas.integrationjob inci.ymlisif: falseand no workflow in docs-builder or docs-internal-workflows runs these tests today. If it is re-enabled with the read-only prod credentials it fetches, the gates are compared with prod numbers and may need another baseline.titles-truncated-40,-80,titles-with-a-leading-typo) only have anavigationgate, as before. They no longer produce a skippedfullcase.Verified
Search.IntegrationTestsandMcp.Remote.IntegrationTestsbuild with 0 errors.SearchRelevanceTests: 37 of 38 pass.ApiSearchWithThreeWordsMatchesOperationsThatContainTwoOfThemfails on this index ("Create an extension" ranks above "Create Deployment"). Its code is unchanged here, and I did not run it against the previous code.staleorfailedflag. No request or response bodies, request hashes, timings, error text, hostnames or credentials. I compared the secret values in the localdocs-builderuser-secrets against the diff and found none.Not verified
mcpgate was never run against a cluster, and its numbers are a copy offull.Run it
Accept an intended change with
SNAPSHOT_ACCEPT=1orsnap review. The cluster comes from thedocs-builderuser-secrets (Parameters:ElasticsearchUrl,Parameters:ElasticsearchApiKey) or theDOCUMENTATION_ELASTIC_*environment variables.🤖 Generated with Claude Code