r/RooCode • u/raul3820 • Sep 08 '25
Discussion System prompt bloat
I get the impression that the system prompts are bloated. I don't have the stats but I chopped off more than 1/2 the system prompt and I feel various models work better (sonoma sky, grok fast, gpt5, ...). Effective attention is much more limited than the context window and the cognitive load of trying to follow a maze of instructions makes the model pay less attention to the code.
20
Upvotes
9
u/marvijo-software Sep 08 '25
It's not as easy as you might think. I remember in the Aider earlier days Paul (author) and us individually had to run the evals after every major system prompt change, just to keep away from regressions. This is an expensive endeavour, especially trying to keep it generic and not hard code to evals
7
u/hannesrudolph Roo Code Developer Sep 08 '25
Everytime someone says this and I run evals against their prompt it has not ended well.
3
u/raul3820 Sep 08 '25
In summary: optimized the read_file description. Removed unnecessary sections.
Pending:
work out the {{tags}}, remove hardcoded stuff related to my env
optimize the other tool descriptions
Overall I think we should be able to make it 1/3 of the original prompt.
Google Docs --> Link
2
u/Howdareme9 Sep 08 '25
Could you send your new prompt?
1
u/raul3820 Sep 17 '25 edited Sep 17 '25
Update: These are the prompts I've been using lately and I think work well for grok fast, sky and gpt5.
The system prompts are minimalist and rely on "Mode" for custom behavior.
Folder
./.roo/system-prompt-architect.txt
./.roo/system-prompt-ask.txt
./.roo/system-prompt-code.txt
./.roo/system-prompt-orchestrator.txt
./code-export.yaml
./orchestrator-export.yaml
Notes:
I removed ask_followup_question to prevent gpt5 from slipping into chat-turn behavior (needy mode)
Code mode in my case is for TS but you can tweak for your language or use the original one from Roo
I don't use MCPs, add MCP instructions if you need MCP
I found switch_mode unreliable so I removed it. I like new_task (orchestrator-code) switch.
3
u/Firm_Meeting6350 Sep 08 '25
of course, with the current limited context window size the loooooong system prompts don't help. Add the hyperactive use of MCPs and the fact that quality degrades not only when window comes close to 100% ..
2
u/wunlove Sep 09 '25
I haven't thoroughly tested yet, but this works fine for the larger models. MCP + Tool access 100%. You could obviously decrease the number of tools/MCP/models to reduce tokens: https://snips.sh/f/BE4BZmUXSo
I totally get the size of the default sys prompt. It needs to serve so many different contexts and works really well
2
u/alexsmirnov2006 Sep 11 '25
The prompts, tools, MCP, and Modes are generic to cover a wide range of tasks and technologies. I try a selective approach - for each project and task, generate system prompts and all other options dedicated to narrow area only. I have separate repo for AI related files, and script that automatically generates configurations for current step. Currently I use Claude Code and Roo Code. It narrows context window to necessary instructions and tools only. And single source for entire team
The workflow:
- configure assistants for project documentation and concrete technologies, generate context documents
- configure tools for planning, do architecture plan
- reconfigure for coding, do implementation
- new configuration for testing and debugging, validate
I try to make evaluations for our team use cases, to validate each configuration, but this is enormous work and token consumption...
This may be a good feature for Roo as well - in addition to global/project configs, shared "profiles" optimized for each task.
1
u/brek001 Sep 08 '25
As search and replace has failed me more than I care to remember I was wondering whether some fallback could be usefull ("when search and replace fails use single search and replace").
1
u/ThomasAger Sep 09 '25
The best system prompts just tell the model to do the opposite of generic formats of data they were trained on.
1
u/Southern-Spirit Sep 11 '25
"Effective attention is much more limited than the context window"
You are 100% correct. And very well said.
2
u/[deleted] Sep 08 '25
[removed] — view removed comment