Repository navigation
[http] Keep compass in the agent's search terms - #260
Merged
Merged
Conversation
The keyword list drops compass, so a question such as what is compass searches for nothing and the model is told no document matched. The test pins the keyword and the retrieval; the fix follows. Co-Authored-By: Claude Code <noreply@anthropic.com>
The stop-word list held the product name, so the agent stripped compass from every question. A question such as what is compass then searched for nothing, and the model was told no document matched. Keep compass and compass's as search terms; the plain search route already answers them. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
mcraveiro
force-pushed
the
feature/agent-search-compass
branch
from
December 2, 2026 23:42
371cfff to
2fad0cd
Compare
This branch was previously 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.
Summary
Asking the agent
what is compassanswered that no compass document matched. The agent's own trace said it searched for nothing.Root cause
agent_keywordsremoves a list of stop words before searching. That list heldcompassandcompass's, the product's own name.what is compassreduced to no terms, so the retrieval ran no search and the model was told no document matched. The plain search route already returns compass's documents for the same words.Fix
Remove
compassandcompass'sfrom the stop words. The keyword list now keeps the product name, and a question about compass searches for it. A regression test pins the keyword list and the retrieval.Verification
The new test fails on the unfixed tree (
asked == {},passages == 0) and passes with the fix: 53 assertions in 10 agent test cases.Against the live server,
GET /v1/compass/agent?q=what is compassnow streamsqueries:["compass"], five passages, and an answer citing passage 1. It used 753 prompt tokens and produced 90 tokens in 89 seconds on the CPU model.The task is recorded under the web story as
Answer questions about compass itself.🤖 Generated with Claude Code