Repository navigation
Conversation
The full-text query was limited to 3 rows, the same as the number of articles returned per query, while the vector query passes 12. Rank fusion only reorders the union of both lists, so an article ranked 4th or lower by full-text got no full-text score, even when vector search ranked it. Fetch 12 full-text candidates and still return 3 per query. Signed-off-by: Adrian Ionel <14153397+aionel@users.noreply.github.com>
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.
What this PR does
searchHelpArticlespasses 12 vector candidates into rank fusion and only 3 full-text candidates. This PR raises the full-textLIMITto 12 (CANDIDATES_PER_QUERY). The agent still gets 3 articles per query.Why
An article can rank 4th in full-text search and 3rd in vector search and still be missing from the 3 results. The new test shows this: it fails on
mainand passes on this branch.Fusion scores only the articles in its two lists, and the full-text list stops at 3. So that article gets no full-text score. Qdrant's hybrid search guide describes the same fix, raising a retriever's cutoff: https://qdrant.tech/documentation/search-tuning/hybrid-search/
Nothing in the code or the commit messages says why full-text stops at 3. If that's intentional, let me know and I'll close this.
How to review
server/lib/agent/help-search.ts: 1 constant and 2LIMITarguments.node --import tsx --test --test-name-pattern="full-text candidates beyond" tests/agent-help-search.test.tsa.content).pnpm agent:search-evalneeds your cases and data.Checklist
git commit -s)pnpm build)pnpm generate:migration) and committed (no schema change)README.md/.env.example/docs/deploy/*updated (none changed)I ran the agent tests,
pnpm buildand the Docker build.