Repository navigation
Search overview: read the top 20, list up to 10 picks, suggest where to start - #749
Merged
Merged
Conversation
…s where to start The prompt now asks for a conversational lead-in, up to 10 picks with how each relates to the search, and a suggestion field under the same citation filter. A reply is valid when its summary has words and any part names a result. Unit and route tests updated (175 pass).
…k count, cut-off reason The prompt no longer asks for a pick count or names the top 20, and asks for the closest picks when nothing fits (a reply without picks was a 502). A first sentence over twice the cap is dropped, a cut-off reply raises with its own reason, filter drops are logged, and picks carry max_length. Tests added for each (182 pass).
7 tasks
This was referenced Nov 13, 2026
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.
Closes #748
A NEMAR maintainer asked for the AI overview of AI Mode search to read more results, put the list of promising datasets first, and talk like a person: say what the search seems to focus on, list the ones that look promising with how each relates, and suggest where to start.
Changes
POST /{community}/overviewaccepts up to 20 results (MAX_RESULTS, was 10).picksholds up to 10 (MAX_PICKS, was 3), each saying how it relates to the search.summaryis a short lead-in (asked for in 45 words, held to 60) and may name no result.suggestionfield: where to start, as segments under the same citation filter as the summary, empty when none survives.OVERVIEW_MAX_TOKENSgoes from 1500 to 3000.docs/search-overview.md,.context/api-structure.mdsection 5, CHANGELOG, and the Home design mockup's placeholder ("in natural language").Compatibility and rollout
suggestion.Testing
tests/test_api/test_overview_unit.pyandtests/test_api/test_search_overview.py: 182 pass (new: suggestion parsing, filtering and caps, validity rule incl. foreign-id-only and cut-off replies, cache replay of the suggestion, prompt limits).tests/test_api: 1902 pass.tests/test_integration/test_search_overview_llm.py) not run locally (no key); will check a real overview on the dev server after merge.Review (round 1, two Sonnet reviewers)
Fixed:
pickshasmax_length=MAX_PICKSon the response model.max_tokens=1500in.context/api-structure.md; two stale docstrings.cited_idsasserted; the hardcoded<= 4_000removed.Rejected:
cited_idsto the other fields, and a discriminatedSegmentunion: the server is the only builder of the response, in one function.word.orgdrops a sentence): intentionally conservative; a dropped pick is safer than a planted link, and drops are now logged.GOODreply to the new shape: a summary that cites is still valid, and the new shape has its own tests.No round 2: no Critical, fixes under 150 non-test lines, no further contract change.