You wanted to buy one beer. The AI poured you two.
That's exactly what happened to me — in an adventure game I built myself. An AI plays the game master: it invents the world, the quests, the characters, and reacts to every input. "Buy a beer," "go to the casino," "talk to the street musician" — the rest emerges on its own. No two playthroughs are alike. Pretty cool.
The rulebook for all this lives in the system prompt: the standing instruction the AI reads along with every action. And over time it grew. From 4,000 to over 60,000 tokens (a token is roughly one syllable). Eventually it started contradicting itself in places, duplicate instructions got executed twice — hence the two beers.
More context is almost always right
First the good news, and it holds for the vast majority of prompts: you can barely give an AI too much context. As long as you're typing the prompt by hand, write too much rather than too little. The AI won't fill in what you take for granted — we worked through that in the prompt-fail article. Prompt sparingly and you get sparse, often useless answers. The basics are in What is a prompt?.
So: be generous. What do you want, in what tone, for whom, under which constraints.
And when is it too much?
When the prompt gets so long that you lose track — the AI loses track too.
With my game-master rulebook, three things happened at once:
- Contradictions. Rule A in one place, the opposite thirty paragraphs later. The AI took its pick.
- Duplicates. The same instruction twice — and it promptly got carried out twice.
- The cost trap. Only expensive top-tier models could process 60,000 tokens cleanly. Cheap models produced garbage across the board.
That last one gets expensive twice over: you pay for more tokens and a pricier model.
Let's do the math
Let's run it with Claude Sonnet (currently around 3 dollars per million input tokens). Per player action: 65,000 tokens in, 500 out for the story.
That's roughly 20 cents — per "go left." And that's per action, per player. Playing the game through to the end? Easily 500 actions. That's 100 euros — for a single playthrough. Times every visitor who tries it. I can't put the game online like this; the first curious afternoon would cost me a fortune.
Then I reworked the prompt: cut the redundancy, cut the filler words, bullet points instead of full sentences, dropped the unnecessary meta-info. Result: 32,000 tokens. Half the size, same game. Cost per action: around 10 cents. Already halved.
And now the real lever: at 32,000 tokens, MiniMax M2.7 can handle it too — a cheap model from China (currently around 25 cents per million input tokens, a fraction of Sonnet). The same action now costs about one cent — so a full playthrough runs around 5 euros instead of 100. With MiniMax's token plan, another 90% off.
Yes, with Sonnet or Opus the game is a touch more fun. But at that price difference?
Would local AI be an alternative?
Obvious question: just run a model on your own machine, and every request costs nothing. Ollama makes that possible.
For this case: not really. On normal hardware you can only run small models (7B), and those come with a context window of around 16,500 tokens — my 32,000-token rulebook doesn't even fit. Never mind the waiting time. Local AI is great, just not for every job.
The elegant way out: train the model on the game
Still, one problem remains: a game that's free online pays for every click of every visitor out of my pocket. One cent times 500 actions times lots of curious people — it adds up. It only gets truly relaxed once a request costs almost nothing.
One idea for that is tempting: instead of sending the rulebook with every action, I train a small model on it once. Then it knows the rules "by heart," and I only send the player's action — tiny. Such an SLM (Small Language Model, the little sibling of the big LLM) might even run locally, and then a request costs nothing at all. A big model can write poems and fix code and be a game master — for my game I throw away over 99% of that with every request.
The catch: training mostly bakes behavior and style into a model, not a reliable memory for facts. So the small model would nail the tone of my game — and still happily invent its own rules. Exactly the problem I was trying to get rid of.
Whether it's worth it, how long such training takes, and whether my machine can even handle it? That's a post of its own. Noted. 😉
The catch on the other side
Don't now swing to the other extreme and write too little out of fear of cost. Because that backfires too:
If your prompt is too thin, the AI asks follow-up questions — or delivers junk you have to fix. With every follow-up you resend the entire conversation so far. In total, that's often more tokens than if you'd prompted properly from the start. (Yes, much of it gets cached — but it still isn't free.)
And don't worry: even those of us working with these things daily keep revising our prompts. More than occasionally. That's not a beginner's mistake, that's the normal state of affairs.
The rule of thumb
Every prompt you write by hand tends to be too short. Consider whether you can add more context.
A prompt is only too long once it's grown so long that you yourself lose track. At the latest, that's when to declutter. Whatever contradicts itself, repeats itself, or nobody needs — out it goes.
Half the length, twice the clarity. And cheaper as a bonus.
