fix(indexing): improvements to semantic_search tool description - #12227
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (1 file)
Notes: the reworded "When to use" prose matches the wording agreed in the existing review discussion, and the earlier duplicate-bullet finding no longer applies. The PR description still says the change adds a "proactively" instruction, which the current text no longer contains — worth updating the description before merge. Fix these issues in Kilo Cloud Previous Review Summaries (2 snapshots, latest commit 1a55007)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 1a55007)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous review (commit 5aeb043)Status: 1 Issue Found | Recommendation: Merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (1 file)
Reviewed by claude-opus-5 · Input: 28 · Output: 5.2K · Cached: 755.4K Review guidance: REVIEW.md from base branch |
5aeb043 to
1a55007
Compare
|
|
||
| ## When to use | ||
|
|
||
| Use proactively before following up with other, more targeted, tools such as `Read` or `Grep`, to: |
There was a problem hiding this comment.
Maybe we should make it clearer when semantic search is superior to indexed based search. "Use proactively before" will inevitably lead to more token consumption.
There was a problem hiding this comment.
I'm unsure what you mean. This is the indexing-based semantic search tool. Are you thinking about how it interacts with the warpgrep semantic search tool? That is a good question. I've been generally running on the assumption that a user won't have both enabled at the same time, because that seems like the most likely scenario, but also because my assumption is that right now, if a user does have both enabled, the LLM will pick one pseudo-randomly.
There was a problem hiding this comment.
You are right that semantic_search is itself index-backed. I was conflating indexing with lexical search. The distinction I meant is semantic retrieval versus exact keyword/regex search.
I do not think we should instruct agents to use semantic search proactively before all targeted tools. It is superior when the agent can describe the desired behavior but does not yet know the repository’s identifiers or terminology. Grep is superior when there is already a concrete symbol, string, config key, error, or regex.
Can we try something like:
“Use early for open-ended exploration when you know the intent but not the exact identifiers or the semantics. Once likely files or symbols are found, follow up with Grep and Read. Prefer Grep directly when exact terms are already known.”
There was a problem hiding this comment.
Sounds good to me!
561df43 to
96ce700
Compare
| - Limit semantic search to one subdirectory with `path` | ||
| Use early for open-ended exploration when you know the intent | ||
| but not the exact identifiers or the semantics. Once likely files or symbols are found, | ||
| follow up with Grep and Read. Prefer Grep directly when exact terms are already known. |
There was a problem hiding this comment.
SUGGESTION: Keep tool names in backticks for consistency
Every other tool reference in this description is code-formatted (Grep, Glob, Read, path), but the new prose mentions Grep and Read as plain words. Since this text goes straight into the model-facing tool description, consistent formatting makes it clearer these are literal tool names rather than prose.
| follow up with Grep and Read. Prefer Grep directly when exact terms are already known. | |
| follow up with `Grep` and `Read`. Prefer `Grep` directly when exact terms are already known. |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
|
Thanks @shssoichiro |
fix(indexing): improvements to semantic_search tool description
Issue
Fixes #10271 (hopefully for good this time)
Context
The semantic search tool continues to not be invoked reliably. We want to help agents understand how and when to use this tool appropriately.
Implementation
pathparameter limitations, as I've seen agents sometimes failing to understand these limitations.Screenshots / Video
N/A
How to Test
Checklist
Get in Touch
ExpedientFalcon on Discord