ZIm/crates/assistant_tools/src
Agus Zubiaga 8b5835de17
agent: Improve initial file search quality (#29317)
This PR significantly improves the quality of the initial file search
that occurs when the model doesn't yet know the full path to a file it
needs to read/edit.

Previously, the assertions in file_search often failed on main as the
model attempted to guess full file paths. On this branch, it reliably
calls `find_path` (previously `path_search`) before reading files.

After getting the model to find paths first, I noticed it would try
using `grep` instead of `path_search`. This motivated renaming
`path_search` to `find_path` (continuing the analogy to unix commands)
and adding system prompt instructions about proper tool selection.

Note: I know the command is just called `find`, but that seemed too
general.

In my eval runs, the `file_search` example improved from 40% ± 10% to
98% ± 2%. The only assertion I'm seeing occasionally fail is "glob
starts with `**` or project". We can probably add some instructions in
that regard.

Release Notes:

- N/A
2025-04-23 21:24:41 -03:00
..
batch_tool Add Batch tool call for calling multiple tools (#27621) 2025-03-27 18:21:26 -04:00
code_action_tool Add code action tool and rename tool (#28453) 2025-04-09 22:38:01 -04:00
code_symbols_tool Add Code Symbols tool (#27733) 2025-03-31 05:13:13 +00:00
contents_tool Add contents_tool (#28738) 2025-04-15 00:54:25 -04:00
copy_path_tool Add copy-path tool (#27371) 2025-03-24 21:21:55 -04:00
create_directory_tool Add Create Directory Tool (#27505) 2025-03-26 11:59:03 -04:00
create_file_tool Add create-file-tool (#27381) 2025-03-25 10:56:41 -04:00
delete_path_tool Delete tool uses paths instead of globs (#26715) 2025-03-16 11:58:25 +01:00
diagnostics_tool Systematically optimize agentic editing performance (#28961) 2025-04-19 02:47:59 +00:00
edit_file_tool Systematically optimize agentic editing performance (#28961) 2025-04-19 02:47:59 +00:00
fetch_tool assistant_tools: Add fetch tool (#26999) 2025-03-18 16:25:51 +00:00
find_path_tool agent: Improve initial file search quality (#29317) 2025-04-23 21:24:41 -03:00
find_replace_tool Add code action tool and rename tool (#28453) 2025-04-09 22:38:01 -04:00
grep_tool Rename regex search tool to grep and accept an include glob pattern (#29100) 2025-04-20 00:53:30 +00:00
list_directory_tool agent: Improve initial file search quality (#29317) 2025-04-23 21:24:41 -03:00
move_path_tool Add move_path tool (#27366) 2025-03-24 14:45:19 +00:00
open_tool Add Open Tool (#27499) 2025-03-27 18:20:59 -04:00
read_file_tool Systematically optimize agentic editing performance (#28961) 2025-04-19 02:47:59 +00:00
rename_tool Add code action tool and rename tool (#28453) 2025-04-09 22:38:01 -04:00
symbol_info_tool Add symbol info tool (#27742) 2025-03-31 00:23:03 -04:00
terminal_tool agent: Use current shell (#28470) 2025-04-09 23:38:36 -06:00
thinking_tool Add thinking tool (#26675) 2025-03-14 16:26:22 -04:00
ui agent: Refine the web search tool call UI (#29190) 2025-04-22 09:51:57 -03:00
assistant_tools.rs agent: Improve initial file search quality (#29317) 2025-04-23 21:24:41 -03:00
batch_tool.rs agent: Improve initial file search quality (#29317) 2025-04-23 21:24:41 -03:00
code_action_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
code_symbols_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
contents_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
copy_path_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
create_directory_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
create_file_tool.rs agent: Encourage model to include displayed fields first (#29308) 2025-04-23 20:16:15 -03:00
delete_path_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
diagnostics_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
edit_file_tool.rs agent: Encourage model to include displayed fields first (#29308) 2025-04-23 20:16:15 -03:00
fetch_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
find_path_tool.rs agent: Improve initial file search quality (#29317) 2025-04-23 21:24:41 -03:00
grep_tool.rs agent: Improve initial file search quality (#29317) 2025-04-23 21:24:41 -03:00
list_directory_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
move_path_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
now_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
open_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
read_file_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
rename_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
replace.rs edit tool: Handle over-indentation in replace_with_flexible_indent (#29153) 2025-04-21 11:02:08 -03:00
schema.rs agent: Improve compatibility when using MCP servers with Gemini models (#28700) 2025-04-14 21:55:25 +02:00
symbol_info_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
terminal_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
thinking_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
ui.rs agent: Refine the web search tool call UI (#29190) 2025-04-22 09:51:57 -03:00
web_search_tool.rs agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00