Make search_issues semantic by default - #2964
Draft
kelsey-myers wants to merge 1 commit into
Draft
Conversation
kelsey-myers
force-pushed
the
km/search-issues-semantic-default
branch
from
July 28, 2026 11:19
2a8189e to
ac663c4
Compare
Contributor
Author
|
Reasoning for why OSS as opposed to the remote server is detailed in https://github.com/github/plan-track-agentic-toolkit/issues/729 (tradeoffs dropdown) - I'm open to discussion on this though! |
Contributor
There was a problem hiding this comment.
Pull request overview
Makes issue search semantic by default on supported hosts, with lexical fallback for GHES.
Changes:
- Adds host-aware tool configuration and semantic search mode.
- Preserves qualifier quotes while removing free-text quotes.
- Updates tests, snapshots, and generated documentation.
Show a summary per file
| File | Description |
|---|---|
README.md |
Updates query guidance. |
pkg/utils/api.go |
Exposes host classification. |
pkg/github/tools.go |
Adds host-aware tool options. |
pkg/github/search_utils.go |
Implements semantic search preparation. |
pkg/github/search_semantic_test.go |
Tests quote handling and descriptions. |
pkg/github/issues.go |
Makes issue search host-aware. |
pkg/github/issues_test.go |
Updates semantic request expectations. |
pkg/github/inventory.go |
Propagates tool options. |
pkg/github/__toolsnaps__/search_issues.snap |
Updates default schema snapshot. |
pkg/github/__toolsnaps__/search_issues_ff_fields_param.snap |
Updates flagged schema snapshot. |
internal/ghmcp/server.go |
Configures host type for stdio. |
docs/insiders-features.md |
Updates generated query guidance. |
docs/feature-flags.md |
Updates generated query guidance. |
Review details
- Files reviewed: 13/13 changed files
- Comments generated: 2
- Review effort level: Medium
kelsey-myers
force-pushed
the
km/search-issues-semantic-default
branch
from
July 28, 2026 12:57
ac663c4 to
fd4f747
Compare
kelsey-myers
force-pushed
the
km/search-issues-semantic-default
branch
from
July 28, 2026 14:07
fd4f747 to
8fa8095
Compare
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.
Summary
Make
search_issuesuse semantic search by default on hosts that support it, falling back to lexical on GHES.Why
Closes github/plan-track-agentic-toolkit#729
An A/B experiment on the remote server compared lexical, semantic, hybrid and agent-chosen variants of
search_issuesover a week. Semantic reduced the number of searches an agent needed per session to 1.7, against lexical's 2.4, with query length roughly flat. Fewer searches means fewer round-trips of results into the agent's context.Semantic search is not available on GitHub Enterprise Server, where the API returns 403 for
search_type=semantic, so those hosts keep lexical behaviour.What changed
search_issuessendssearch_type=semanticon dotcom and GHEC.label:"needs triage") are preserved.WithHosttool option, so tools with host-specific capabilities can adapt.utils.ParseHostTypeexposes the classificationparseAPIHostwas already doing internally.search_pull_requestsis unaffected.advanced_searchis deliberately left alone. The semantic query class already extends the advanced one, so the parameter changes nothing when semantic runs, and on the lexical fallback it makes things worse: under advanced search an unparenthesised boolean bindsrepo:to only its own clause, so the search escapes the repository the caller asked about. Prod-verified over four query shapes; the existingfield.conditional inprepareSearchArgsis unchanged, sincefieldgenuinely does require it.Eval details — how the query description was chosen
The
queryparameter description was picked by A/B testing four phrasings against a set of benchmark cases that prompt with synonym lists ("auth, authentication, or login problems") to see whether the model reaches for booleanOR.ORisn't supported by semantic search, so the query silently degrades to lexical.Measured as: of the queries emitted for those cases, how many contained
OR."When the user gives alternative wordings, include them as plain words rather than joining them with OR."
"Semantic matching already finds related wording, so synonyms don't need listing or joining with OR."
"Semantic matching already covers related wording and synonyms." (no mention of OR)
Findings:
MCP impact
search_issuesdescriptions changed, and the underlying search engine changes on non-GHES hosts. Parameters are unchanged.Prompts tested (tool changes only)
Security / limits
Semantic issue search sits in a separate API rate limit family: 10 requests/minute versus 30/minute for standard search. This applies per request based on
search_type, so making semantic the default lowers the effective rate limit for issue search on supported hosts. The experiment recorded no rate limit errors across ~76k semantic calls.Tool renaming
Lint & tests
./script/lint./script/testDocs