Skip to content

[http] Keep compass in the agent's search terms - #260

Merged
mcraveiro merged 4 commits into
mainfrom
feature/agent-search-compass
Dec 3, 2026
Merged

mcraveiro merged 4 commits into
mainfrom
feature/agent-search-compass

Conversation

@mcraveiro

Copy link
Copy Markdown
Member

Summary

Asking the agent what is compass answered that no compass document matched. The agent's own trace said it searched for nothing.

Root cause

agent_keywords removes a list of stop words before searching. That list held compass and compass's, the product's own name. what is compass reduced 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 compass and compass's from 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 compass now streams queries:["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

mcraveiro and others added 4 commits December 2, 2026 23:38
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
mcraveiro force-pushed the feature/agent-search-compass branch from 371cfff to 2fad0cd Compare December 2, 2026 23:42
@mcraveiro
mcraveiro merged commit 5c8f363 into main Dec 3, 2026
5 checks passed
@mcraveiro
mcraveiro deleted the feature/agent-search-compass branch December 3, 2026 07:40

This branch was previously deployed

1 inactive deployment
CI — 2fad0cd2 Deployed Dec 2, 2026 by mcraveiro via linux-clang-release-ninja #493
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant