kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

[BUG] `semantic_search` Tool Description Misleading AI model

Open bxw91 opened this issue 7 months ago • 0 comments

Description

The semantic_search tool description states:

"Find files most relevant to the search query using semantic search."

This implies the tool only returns file paths. In reality, it returns file snippets with line ranges, content previews, and relevance scores.

Observed Behavior

During a session, the AI agent interpreted the description literally and told the user that semantic_search returns only file names — a file-level search for discovering which files relate to a topic.

The user asked the AI to verify by running actual searches. After executing two test queries, the AI saw the real output and AI then corrected itself and acknowledged the tool returns content snippets, not just file paths.

Root Cause

The phrase "Find files most relevant..." is ambiguous. The AI took it literally without verifying the actual output before answering.

Impact

  • AI agents give incorrect tool guidance to users
  • Agents may chain unnecessary follow-up tool calls (e.g., read_file after semantic_search)
  • Reduces trust in agent responses

Suggested Fix

Update the description to clarify the output format. For example:

"Find relevant code snippets from files using semantic search. Returns matching content with file paths, line ranges, and relevance scores."

question of codebase_search

Shouldn't this be removed from settings considering that 'semantic_search' is now doing what codebase search was doing before?

Anyway, today when my AI model used codebase_search (which I have now disabled) returned:

Codebase search unavailable: free period ended. Set MORPH_API_KEY to continue. Get your key at https://www.morphllm.com/

Plugins

No response

Kilo version

7.2.31

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Ubuntu

Terminal

No response

bxw91 avatar May 01 '26 10:05 bxw91