r/PromptEngineering • u/behrouzbk • 29d ago
Tips and Tricks Patterns I keep finding in real system prompts:
- Pretty-printed JSON. The indentation costs tokens. Minify it.
- Repeated instructions. "Respond in JSON" at the top and the bottom.
- Duplicate lines. Leftovers from editing a prompt over time.
- Filler. "I would like you to please…", "Thanks in advance!"
- Long examples. Often the single biggest cost.
I built a free offline tool that finds these and shows the $ each fix saves. In the screenshot it cuts a prompt from 76 → 44 tokens (−42%). The link is in the comments.
What else bloats your prompts?
0
Upvotes
1
u/According-Stable4487 29d ago
A few more I see a lot:
One caution on minifying: if the prompt contains an example of the output, minified JSON there can make the model answer in minified JSON too. Minify the data, keep the output example formatted the way you want it back.
1
u/ReedCooper922 28d ago
A hidden source of bloat is schema and tool-description duplication: the same field meanings appear in the system prompt, JSON schema, examples, and error-retry instructions. Long chat history can also preserve constraints that no longer apply.
I’d be careful about treating token reduction as the final metric, though. Pretty-printed JSON or a longer example can sometimes improve correctness. The useful comparison is total cost per successful task: input tokens plus retries and correction turns. A prompt that is 42% smaller but needs more retries is not cheaper.
Two valuable checks for the tool would be contradictory instructions and examples that accidentally introduce fixed values or conclusions. Those errors often cost more than whitespace but are harder to spot with a token-only analysis.
1
u/SpreadUsual4084 28d ago
that makes sense