guide
Guides: writing prompts, counting tokens and what they cost
Across the long prompts we measured (written in Spanish), between 16 % and 40 % of the text changes nothing about the answer: pleasantries, filler, roundabout phrasing and repetition. This guide explains what exactly that text is, how to spot it, and where the line is beyond which trimming stops saving and starts breaking.
The examples and figures come from measuring with the dictionary of Prampt: 263 verified substitutions, 132 in Spanish and 131 in English.
What a token is, and why it takes up room
A language model does not read letters or words: it reads tokens, chunks of text averaging about four characters in English. «Optimizer» is several tokens; «the» is one. Punctuation, spaces and line breaks count too.
That matters for two different reasons, and they are worth keeping apart. If you pay for an API, every input token is billed on each and every call: a system prompt you send ten thousand times a day is a fixed cost repeated ten thousand times. If you use a free tier, you pay nothing, but every token still eats context window and brings forward the point where the conversation gets cut or the model starts forgetting the beginning.
Either way, a token is budget. You pay in money or you pay in room.
Careful: characters are not tokens
This is the most common mistake when trimming by hand. Replacing «in order to» with «to» saves nine characters, but the real saving is in tokens, and the two do not move together: a long common word can be one token while a short rare one is three.
That is why a character count is an approximation, not a measurement. The only reliable figure is the one the tokenizer of the model you are actually using gives you, and it varies between models.
The six categories of waste
Not all spare text is spare in the same way. These six categories go from least to most invasive: the first two can go without looking, the last ones are worth checking before you send the result.
Pleasantries
nivel Suave27 sustitucionesGreetings, thanks and please. They carry no instruction: the model does not answer better for being asked politely, and every one of them is billed.
- would you mind
- (se elimina)
- feel free to
- (se elimina)
- kindly
- (se elimina)
- i would like you to
- (se elimina)
Filler
nivel Suave28 sustituciones«It is important to note that», «as you know», «basically». They fill the sentence and change nothing about what is being asked.
- needless to say
- (se elimina)
- at the end of the day
- (se elimina)
- when all is said and done
- (se elimina)
- to be honest
- (se elimina)
Roundabout phrasing
nivel Equilibrado43 sustitucionesThis is where the bulk of the saving is. Written English stretches connectors well past the point of usefulness, and each one has a short equivalent that says exactly the same thing.
- in the event that
- if
- in the near future
- soon
- at the present time
- now
- on a regular basis
- regularly
- the majority of
- most
Wish wrappers
nivel Equilibrado23 sustituciones«I would like you to», «I need you to». The instruction is what follows; the wrapper only announces it.
- respond in as much detail as possible
- be detailed
- i want you to make a list of
- list
- walk me through
- explain
Role definitions
nivel Equilibrado10 sustituciones«I want you to act as an expert» compresses to «you are an expert» with no loss. The model reads the role either way.
Intensifiers
nivel Agresivo19 sustituciones«Very», «really», «extremely». Only removed on the aggressive level: they carry no meaning, but some people use them on purpose to weight an instruction.
- muy
- (se elimina)
- bastante
- (se elimina)
- sumamente
- (se elimina)
- extremadamente
- (se elimina)
What must never be touched
Trimming a prompt has a hard limit, and crossing it does not save money: it breaks the call. Four kinds of content have to come out of any optimization untouched.
- Code blocks and inline code. A comment inside a function is not a pleasantry: it is part of what you are asking the model to interpret.
- URLs. Removing a word from an address makes it a different address, or none at all.
- Template variables such as {{user_name}}. If your system substitutes them later, altering them breaks the replacement silently.
- Numbers, units and identifiers. There is no such thing as a redundant digit.
By hand or automated?
By hand works once. If you have a fixed system prompt, you go over it, shorten it and leave it written: you need no tool for that, and in fact a tool would be overkill.
The problem shows up when the text changes on every call: what the user types, the documents you pull from a store, the history you drag along. There you cannot anticipate what will arrive, so the only option is applying the rules at the moment.
And there is a third case: when there are several of you. One person shortens their way and another theirs, and three months later every prompt on the team reads differently. A shared dictionary is what keeps the criterion from depending on who wrote it.
When it is worth putting the prompt through a model
Cutting the obvious waste by hand costs nothing and always pays off: if the only goal is a smaller prompt, you do not need a model for that.
The sums change when the problem is not size but ambiguity. No rule can fix that: working out that «summarize this» needs to know for whom, at what length, and what to do about the missing pieces is exactly the kind of judgement only a model makes. Spending a tenth of a cent on it pays off if it saves three messages correcting the answer.
What you must demand of that model is that it does not fill the gaps on its own. If the original said nothing about length and the result comes back with «max 200 words», the tool decided for you and you did not even notice. The right behaviour is to leave the gap marked so you fill it in.
And keep this in mind: a model gives a different version each run. For something running unattended in production that is a real drawback, and it is worth fixing the prompt once and reusing it rather than re-optimizing it on every run.
Try it with a prompt of your own
Spotting all this by hand is the slow way. Prampt rewrites the prompt for you and flags what you left out instead of inventing it. Five free a month, no card.
Keep reading: plans and frequently asked questions · what is stored and what is not