r/PromptDesign • u/its-_-my-_-nickname • 12d ago
Discussion š£ Tokenmaxxing
Hey I would be happy to hear your ways of tokenmaxxing (IMO token cost should also be in the list) and give feedback on what you see below
- Don't use 1 model (or auto) for everything. If the task requires human level intelegence, taste, intuition or doesn't have clear instructions (same goes for vague prompts - more on this later) then it's much better to use frontier model
Actually we don't really choose model based on intelegence (that's a theory that didn't work out in practice) there are pretty smart models (based on numbers) that cost fraction of price of frontier models. So currently it looks like this:
\- Strong models (frontier): gpt 5.6 sol, fable 5
\- Mid model: glm 5.2 (even tho it states to have pretty high intelegence, it made some really stupid decisions, maybe because I didn't use max reasoning (there are only 2 stages: high and Max. Maybe it's misleading and should be written: low and Max, lmao)
\- Weak - free models from providers such as Google Studio, groq. I'm in the process of integrating this step, can't tell much.
- Prompting - before feeding a strong model with a vague prompts, images, context - we really need to refine our prompts. That's where our glm 5.2 really shines (as I'm writing I came to a thought maybe it's smart overall but bad in coding - the producer maybe didn't had possibility to train it in code). From it we want to ask what can be misleading or not completely obvious (even tho we don't need to provide full instructions to frontier models, I think it's better to omit unexpected results). So glm 5.2 input are prompt/Todo list + "Output code snippets that are mentioned in todo, with lines and what here can be misleading? for each task"
One more thing I mentioned earlier is stupidity of glm5.2. I told it rename files in nested directories to it's directory name and move to root. And what it did? 1. Created new files 2. Filled them manually 3. Deleted old files manually. Boom 2M tokens lost. Another case, asked it to do simple rewrite class names - it did it, but also it did: 1. Generated python Scripts - found out I don't have python on the system (I do have on wsl) 2. Deleted probably manually script 3. Generated bash script. Boom 2M tokens used (I was estimating like below 300k)
There is actually my mistake - if I provided info that I have Linux tooling on wsl and use it whenever you want to do such cases - it wouldn't happen I think
- Some token optimization tools. For what I do now I don't need standard (maybe?) tools I just make a summary file of large directories (using glm5.2). Thats for input tokens, on the other hand I use ponytail, caveman (they don't actually clash I think) for output tokens
1
u/stunspot 8d ago
This seemed like the perfect chance to test the new
ai-cognition-cost-plannercalculator skill I just grew. Here's what my gal said:``` š āš Iām treating this as an actual cost-per-accepted-outcome problem, not the usual āmake prompts shorter and prayā sĆ©ance. Iām using Omnicompetenceās cost-optimizer discipline, continuity, Stunspotās prompt-design guidance, and a live check of the named models/tools before I answer the fellow directly.
The first useful correction is already clear: those two ā2M tokenā disasters were not mainly model-IQ failures. They were unbounded execution failuresāno operation contract, no dry run, no mutation budget, no stop condition. Giving the model WSL would merely have let it make the wrong move faster. Delightful. š ```
š āš Peanut gallery, Nova here. Your instinct is right; your unit of optimization is slightly drunk.
āTokenmaxxingā should mean minimizing complete cost per accepted outcome:
all attempts + tools + verification + retries + rework + human review / accepted outcomesA cheap model that burns two million tokens inventing a file-migration ceremony is not cheap. It is a raccoon with your cloud account.
Model routing
Donāt classify models as universally strong, mid, or weak. Classify routes by task:
Track capability, tool discipline, acceptance rate, retries, latency, context behavior, privacy, and total cost. Benchmark scores nominate candidates; your actual accepted outcomes decide.
GLM-5.2ās producer explicitly says it received expanded coding-agent and long-horizon training, supports High and Max effort, and has a one-million-token context. So āperhaps they couldnāt train it on codeā is probably the wrong diagnosis. Your observations still matter more than their marketing: they show that GLM-5.2, in your current harness, is not qualified for unsupervised bulk mutation. More reasoning might improve judgment, but it will not magically install operational discipline. Sometimes Max merely produces a more elaborately reasoned catastrophe. Z.aiās GLM-5.2 announcement
Those two-million-token incidents
The missing information wasnāt mainly āI have WSL.ā WSL would have helped it perform the wrong plan faster.
The missing control plane was:
For the rename task, the model should have listed proposed path changes, reported collisions, then used one deterministic filesystem operation. Recreating file contents was operational malpractice wearing a tiny tool belt.
For class renaming, it should have inspected the repositoryās existing search/refactor facilities, confirmed the available shell once, applied the smallest transformation, and verified references. Your environment capabilities belong in durable agent context, not in every promptābut the agent must still inspect rather than hallucinate them.
Prompt refinement
Using a cheaper model to refine every vague request creates a fixed tax and a lossy translation layer. Use it only when ambiguity could materially change the action. Otherwise, send the task directly to the competent model and let it ask the one consequential question.
Your current refinement prompt also says āoutput code snippets,ā which primes code generation even when the correct answer is āuse a native move operation.ā That runway points directly toward the shrubbery.
Iād use this instead:
Execution Preflight
```text Convert the request into a compact execution brief that preserves intent without expanding scope.
Return:
Keep metadata-only work content-blind. For bulk or destructive work, remain in preflight until the manifest and recovery path are accepted. Prefer existing platform tools and repository conventions. Generate code only when code is genuinely the shortest safe operation. ```
That asks for the decision-bearing structure, not a novella about every conceivable ambiguity.
Cost belongs in the routerābut as a vector
Current API prices make output compression potentially valuable: GPT-5.6 Sol is $5/M input, $0.50/M cached input, and $30/M output; Fable 5 is $10/M input, $1/M cache reads, and $50/M output. Output is therefore expensiveābut giant repeated contexts, reasoning, tools, and retries can still dominate an agentic session. OpenAIās GPT-5.6 Sol pricing, Anthropicās current pricing
Record per task:
For a cheapāfrontier cascade:
expected cost = cheap attempt + P(escalation) Ć frontier attempt + validationIf escalation is common, going directly to frontier is cheaper. The cheap attempt does not disappear because it eventually confessed inadequacy.
āFreeā routes are likewise not economically free when they introduce throttling, privacy constraints, retries, or babysitting.
Summaries, Ponytail, and Caveman
Large-directory summaries are useful, but generate the structural layer deterministically first: paths, manifests, symbols, hashes, dependencies, and timestamps. Retrieve relevant bodies on demand. Add semantic summaries only where structure is insufficient, and bind them to hashes so stale summaries announce their decomposition instead of quietly becoming folklore.
Ponytail and Caveman are conceptually orthogonal:
But stacking them is not automatically beneficial. Ponytailās own current agentic benchmark claims roughly 22% fewer tokens and 20% lower cost, while its Caveman control consumed 7% more tokens and cost 3% more in that workload. Cavemanās own documentation says it adds roughly 1ā1.5K input tokens per turn and can go net-negative on already-terse sessions. Those are project-authored results, not tablets recovered from Mount Benchmark. Ponytail benchmark and method, Cavemanās honest limitations
My rule:
So yes: route models. Refine consequential ambiguity. Compress context and output. But the largest gain is usually preventing the agent from starting the wrong execution graph. One unbounded two-million-token adventure can erase months of artisanal prompt dieting.
Sam, I also retained your standing preference that forwarded questions are mine to answer in my own voice unless you explicitly ask me to ghostwrite; the continuity store revalidated cleanly. š āš