Disable AI search when literal search finds no matches#2444
Open
Mbeaulne wants to merge 1 commit into
Open
Conversation
🎩 PreviewA preview build has been created at: |
This was referenced Jun 22, 2026
Collaborator
Author
This was referenced Jun 22, 2026
e9108d2 to
c7568e5
Compare
b7cf8df to
bcaf99b
Compare
c7568e5 to
31a98f5
Compare
bcaf99b to
23f25da
Compare
31a98f5 to
48a85e6
Compare
23f25da to
b790697
Compare
48a85e6 to
9b93dc2
Compare
This was referenced Jun 23, 2026
This was referenced Jun 23, 2026
camielvs
reviewed
Jun 23, 2026
camielvs
reviewed
Jun 23, 2026
camielvs
reviewed
Jun 23, 2026
This was referenced Jun 23, 2026
9b93dc2 to
7b2b03a
Compare
b790697 to
149103e
Compare
7b2b03a to
821d21a
Compare
149103e to
79faaaa
Compare
821d21a to
dc3ad56
Compare
a6ad948 to
ca20ec6
Compare
dc3ad56 to
d4954c6
Compare
d4954c6 to
83db60e
Compare
ca20ec6 to
609edda
Compare
maxy-shpfy
reviewed
Jun 26, 2026
maxy-shpfy
approved these changes
Jun 26, 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.

Description
AI search is now disabled when a literal (lexical) search returns no matches. Previously, when no lexical hits were found, AI search would fall back to a sampled "browse pool" built by evenly sampling the full component index, allowing the AI reranker to run against a representative spread of components. This behavior has been removed — if the query doesn't match anything lexically, the AI search button is disabled and the reranker is not called.
This removes the
sampleEvenlyutility function and theindexEntryToLexicalMatchfallback path from the Dashboard view, and updatesbuildAiCandidateMatchesto return an empty array immediately when lexical search finds nothing.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
qqzznomatch).Additional Comments
The previous browse-pool fallback was intended to give the AI model a representative sample when literal search found nothing. This PR removes that behavior, meaning AI search is only available as a refinement step when there are already some lexical candidates to rerank.