fix: rewrite inappropriate advice to use ls command in example dialogues in system prompt#23135
fix: rewrite inappropriate advice to use ls command in example dialogues in system prompt#23135ariane-emory wants to merge 19 commits intoanomalyco:devfrom
Conversation
The list tool no longer exists, so prompt examples should not tell models to use it. Rewrite the lingering references to use glob-based examples that match the current toolset.
The plain-language examples in the default and trinity prompts should read like direct answers, not bracketed stage directions. Rewrite the follow-up glob-based examples to keep the wording natural.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
@ariane-emory why not recommend the read tool? Read tool can list things, why would we want to do glob? |
The read tool can list directory contents, so the prompt examples should recommend it instead of glob for these directory-inspection cases.
|
@rekram1-node Done. :) It doesn't seem to wanna run my CI, though. :/ |
|
ci requires manual approval now, it's too expensive otherwise |
| user: what command should I run to list files in the current directory? | ||
| assistant: ls | ||
| assistant: Use the read tool. | ||
| </example> |
There was a problem hiding this comment.
wait now that im reading this, the change doesnt make any sense at all haha why did we edit this at all? It should stay ls
There was a problem hiding this comment.
Reverted. Made sense to me though, since bash tool's description says not to use ls for exploratory purposes?
| <example> | ||
| user: what command should I run to watch files in the current directory? | ||
| assistant: [use the ls tool to list the files in the current directory, then read docs/commands in the relevant file to find out how to watch files] | ||
| assistant: Use read to inspect files in the current directory, then read docs/commands in the relevant file to find out how to watch files. |
There was a problem hiding this comment.
i think list the works still
There was a problem hiding this comment.
But there is no list tool at all anymore?
| <example> | ||
| user: what files are in the directory src/? | ||
| assistant: [runs ls and sees foo.c, bar.c, baz.c] | ||
| assistant: [tool_call: read for absolute_path '/path/to/project/src', reports seeing foo.c, bar.c, baz.c] |
| <example> | ||
| user: list files here. | ||
| model: [tool_call: ls for path '/path/to/project'] | ||
| model: [tool_call: read for absolute_path '/path/to/project'] |
There was a problem hiding this comment.
no need to be so specific it doesnt have to be absolute
| <example> | ||
| user: what command should I run to list files in the current directory? | ||
| assistant: ls | ||
| assistant: Use the read tool. |
There was a problem hiding this comment.
Bash tool's description advises not to use ls for exploratory purposes, so I thought it made sense. If you prefer ls, we can stick with that, though.
|
@rekram1-node If it's costly, then let's wait until you think it looks nice before we trigger CI again I suppose? |
Issue for this PR
Closes #23132
Type of change
What does this PR do?
Rewrites some of the verbiage in the example dialogues in three model system prompts to avoid recommending direct use of the
lscommand.How did you verify your code works?
bun test,bun typecheck.Screenshots / recordings
N/A
Checklist