This matches my experience. I've been using OpenRouter with GPT-4o for an image verification service, and the prompt engineering choices have a measurable impact on cost. One thing I found: asking the model to respond in structured JSON (with a strict schema) vs free-form text cuts token output by ~40% on average. The model stops "explaining itself" and just gives you the answer. Also noticed that including a referen…
What I'm Finding About LLM Code Style and Token Costs
11–20 of 20 posts
Re: What I'm Finding About LLM Code Style and Token Costs
#12This matches my experience. I've been using OpenRouter with GPT-4o for an image verification service, and the prompt engineering choices have a measurable impact on cost. One thing I found: asking the model to respond in structured JSON (with a strict schema) vs free-form text cuts token output by ~40% on average. The model stops "explaining itself" and just gives you the answer. Also noticed that including a referen…
Re: What I'm Finding About LLM Code Style and Token Costs
#13I just had Claude try to process an RSS feed and it was about to ZALGΌ IS TOƝȳ THË PO NY itself and I pointed that out and it immediately said "Wordpress has a json interface, I'll use that". You need to know the shape of the solution ...
Context about tony the pony https://stackoverflow.com/questions/1732348/regex-match-open...
Re: What I'm Finding About LLM Code Style and Token Costs
#14Is it already too late to have humans just write down what they are thinking instead of passing it through a lossy expander?
Re: What I'm Finding About LLM Code Style and Token Costs
#15It's really hard for me to parse LLM-generated prose in blog posts - the reasoning is disjointed, logic is split everywhere. Is it already too late to have humans just write down what they are thinking instead of passing it through a lossy expander?
Re: What I'm Finding About LLM Code Style and Token Costs
#16Re: What I'm Finding About LLM Code Style and Token Costs
#17I just had Claude try to process an RSS feed and it was about to ZALGΌ IS TOƝȳ THË PO NY itself and I pointed that out and it immediately said "Wordpress has a json interface, I'll use that". You need to know the shape of the solution ...
Context about tony the pony https://stackoverflow.com/questions/1732348/regex-match-open...
Re: What I'm Finding About LLM Code Style and Token Costs
#18More than half my battle using things like codex comes from removing unnecessary code checks and verbose logic. Even when prompted, it just can't help itself. It's a willful beast.
Re: What I'm Finding About LLM Code Style and Token Costs
#19Maybe there should be a submit your post training corpus here thing somewhere.
E.g. this really comes down to advice changing in short time frames that aren't represented in data that satisfies knowledge cutoff which can be as long as 14 months in some things or more for older models. It's not just the problem of knowledge, but the grading of seen output. The models have been trained to produce the older style code because it compiles and solves the problems.
Here, the reframe that likely makes sense noting is that "Deno and runtimes like Cloudflare Workers implement the Web API surface natively", that's the strongest single thing that would help steer an agent to correctly write code for the code in question (assuming the Web API surfaces that are key are in distribution). Add something like - "Where there may be reasonable obvious updates that can be used in 2026, use them" ...