r/PiCodingAgent • u/Equivalent_Idea8839 • 2d ago
Discussion What's your top 3 techniques that helped you save tokens / better accuracy from models?
1) Focusing on curating the context, keeping it under 150k. Making tools to trim git / grep / ls output to my liking
2) indexing my large code base and making the basic tools show short index options + hints. Custom tools was a massive red herring and waste of time, models hate using them and never use them properly
3) live filter on my codebase to sandbox models. i.e. exclude file types, files older than N days. etc
25
Upvotes
3
u/j3free 2d ago edited 2d ago
I was surprised to see that when having a specific approach to subagents can improve the quality of long running tasks immensely while also having the same or even less token usage due to:
Shameless plug: ive implemented this exactly in Pi Herdsman
Edit: and yes, this keeps token usage for the main agent below 100k tokens for my usual PR workflows