Trim prescriptive guidance from the Freebuff prompt harness - #1276
Open
thomasboom wants to merge 3 commits into
Open
Trim prescriptive guidance from the Freebuff prompt harness#1276thomasboom wants to merge 3 commits into
thomasboom wants to merge 3 commits into
Conversation
Three layers of guidance were shipping on every model turn, eating into both latency and per-task cost without buying any model behavior: 1. base3 system prompt + CLI appendix dropped from ~40 lines of prescriptive bullets to a 3-line system prompt and a one-line identity string. The destructive-command safety rail stays; the "match conventions / verify libs / use write_todos" bullets were product-guidance dressed up as engineering judgement. 2. Eight tool descriptions trimmed to what the model actually needs to call the tool: code-search lost a 100-line ripgrep flag essay plus result-limiting notes; write-todos lost a 4-bullet manual; suggest-followups lost its "Good suggestions include" / "Don't include" lists; web-search / list-directory / glob lost their Purpose/Use-cases essays; run-terminal-command lost the 6-bullet "Stick to these use cases" and the 9-bullet <commit_analysis> checklist (the destructive-command rail is already in base3's system prompt). ask-user lost its redundant options list but kept the IMPORTANT no-Custom-options rule. Schema fields untouched - the model still knows each parameter. 3. Deleted the unused getToolsInstructions / fullToolList / getShortToolInstructions exports in packages/agent-runtime/src/tools/prompts.ts (the [CRITICAL] Formatting Requirements, DO NOT narrate tool names, AS LITTLE TEXT AS POSSIBLE optimization) and the unused knowledgeFilesPrompt in system-prompt/prompts.ts. None had a live caller; the AI SDK reads each tool's description directly via getToolSet. Per-turn hot cost: ~4,400 tokens saved on every model call (8 tool descriptions: ~13 KB / ~3,800 tokens; base3 system prompt: ~2 KB / ~625 tokens, cache-warm). On a 20-step task that's ~88k tokens not billed. base2, base-chat, and base-deep untouched - different surfaces. base2 is the legacy/free-fallback harness and the eval control arm; base-chat is the freebuff.com/chat surface; base-deep is the deprecated deep-reasoning path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three layers of guidance were shipping on every model turn, eating into both latency and per-task cost without buying any model behavior, while boating the context window and therefore making model performance worse:
base3 system prompt + CLI appendix dropped from ~40 lines of prescriptive bullets to a 3-line system prompt and a one-line identity string. The destructive-command safety rail stays; the "match conventions / verify libs / use write_todos" bullets were product-guidance dressed up as engineering judgement.
Eight tool descriptions trimmed to what the model actually needs to call the tool: code-search lost a 100-line ripgrep flag essay plus result-limiting notes; write-todos lost a 4-bullet manual; suggest-followups lost its "Good suggestions include" / "Don't include" lists; web-search / list-directory / glob lost their Purpose/Use-cases essays; run-terminal-command lost the 6-bullet "Stick to these use cases" and the 9-bullet <commit_analysis> checklist (the destructive-command rail is already in base3's system prompt). ask-user lost its redundant options list but kept the IMPORTANT no-Custom-options rule. Schema fields untouched - the model still knows each parameter.
Deleted the unused getToolsInstructions / fullToolList / getShortToolInstructions exports in packages/agent-runtime/src/tools/prompts.ts (the [CRITICAL] Formatting Requirements, DO NOT narrate tool names, AS LITTLE TEXT AS POSSIBLE optimization) and the unused knowledgeFilesPrompt in system-prompt/prompts.ts. None had a live caller; the AI SDK reads each tool's description directly via getToolSet.
Per-turn hot cost: ~4,400 tokens saved on every model call (8 tool descriptions: ~13 KB / ~3,800 tokens; base3 system prompt: ~2 KB / ~625 tokens, cache-warm). On a 20-step task that's ~88k tokens not billed.
base2, base-chat, and base-deep untouched - different surfaces. base2 is the legacy/free-fallback harness and the eval control arm; base-chat is the freebuff.com/chat surface; base-deep is the deprecated deep-reasoning path.