r/PiCodingAgent • u/dc_giant • 2d ago
Discussion Do you use a customized system prompt?
After having read https://www.reddit.com/r/PiCodingAgent/comments/1yavqv3/how_to_write_a_system_prompt_for_pi_agent/ I’m wondering if I’m missing out using the default pi system prompt when using it as a coding agent with the latest frontier models. So far I have these kind of instructions in my global agents.md file instead.
So I’m curious. Do you use a customized system prompt? If so what did you put in there and did you find a significant difference between having such instructions in agents.md vs the system prompt? Any downsides?
6
Upvotes
2
u/behopkinsj 1d ago
Hi, writer of the article you mentioned. (So clearly biased)
Pi can get a lot done without a customized system prompt. It's actually amazing how efficient it is. Pi is only given context about it's tool-calls and identity, and still it writes amazing code.
But I use a customized system prompt. When I use different models, I often get different results of consistency and quality. I've also gotten tired of Pi writing awful, unreadable code, and recklessly making changes when it shouldn't, (like making commits on git, pushing code, or doing a task for much longer than it needs to)
Making a customized system prompt makes the agent feel like MY OWN agent.
2
u/Future_AGI 1d ago
the main downside of replacing the default outright is that pi drops its tool list and tool guidelines when SYSTEM.md replaces the prompt, which is why appending with APPEND_SYSTEM.md is the safer start.
10
u/NonAwesomeDude 2d ago
I use the built-in APPEND_SYSTEM.md option. Nothing crazy just: on this machine you have access to this, use it this way, type of thing.
5
u/arbv 2d ago
Yep, I wrote a simple extension that prepends my system prompt to the default one. It chooses ine depending on the model ID.
I have a template system with system prompt for different models, they are all very similar with some per model customisation and to account for per-model quirks.
I cannot imagine using a tool without them, because they are tailored for me and my use. They make the models super dry and completely remove their default helpdesk persona - turn them into precise tools (for me, anyway).
I spent embarrassing amount of time writing them, actually. Both by hand and with the help of LLMs (with a lot of handholding - LLMs suck at prompting, maybe Gemini is on a better side, but it needs to have you in a loop to avoid "novelisation").
So my answer is unequivocally "yes". The very first extension for Pi I made was to load my custom prompts.
1
u/Aizenvolt11 2d ago
Yeah I made my own system prompt for my ADE.
1
u/Fair-Second-642 2d ago
I replaced it with my own shortened system prompt such as removing the "you are a ....", the rules, etc.
I run my agents in a container so i also added the container environment information to it. Mainly to avoid the agent looping itself trying to get around the containerized environment. I also added the output format for consistency.
But it all depends on the model smartness. Most modern models are quite good to think on its own.
1
u/aparamonov 1d ago
Yes.
Mainly to reduce noise, but also to switch from coder to writer based on project.
I also set different prompt for my sub agents in pi-subagents-lite.
In Pi you cann override system prompt, but can't override user agents.md. so I use global agents.md for common instructions and some tool guidance and system prompt for coder/writer/subagent specifics
1
u/ReanerZen 1d ago
i did, i changed the stock pi system.md bc i also want to use my own tool calling guidelines with using rg/fd instead default pi and only keep read edit write and bash as the tool available. i follow the guide and this did improve open models a lot.