Why optimise your prompts?
The quality of an AI answer depends more on your question than on the power of the model. A model does not read your intent — it reads exactly what you wrote. A vague prompt produces a vague answer no matter how advanced the model is.
There is a second, practical reason: every word costs you. APIs bill by token and context windows are finite. A phrase like "I would really appreciate it if you could kindly help me with" burns tokens without giving the model a single piece of new information.
What is a token? A token is a chunk of text roughly four English characters long, or a short word. Arabic text consumes more tokens per character than English, so trimming filler from an Arabic prompt saves more than you might expect.
The five parts of a strong prompt
Every effective prompt contains these elements, in a logical order:
| Element | Answers | Example |
|---|---|---|
| Role | Who are you? | You are a media buyer with 10 years experience |
| Task | What should I do? | Write 5 ad headlines |
| Context | For whom and why? | For a running-shoe store targeting under-30s |
| Format | How do I present it? | Numbered list, each under 30 characters |
| Constraints | What are the limits? | British English, no superlatives |
Order matters Put your most important instructions at the start or the end of the prompt. Models weight the beginning and end of the input most heavily, and instructions buried in the middle of a long prompt receive less attention.
How to save tokens without losing quality
Real savings come from deleting words that carry no information, not from cutting useful instructions:
| Instead of | Write | Saves |
|---|---|---|
| I would like you to please write me | Write | ~7 tokens |
| Could you possibly help me create | Create | ~6 tokens |
| I want you to perform an analysis of | Analyse | ~7 tokens |
| As you know, it is a fact that | (delete) | ~8 tokens |
| Thank you so much in advance | (delete) | ~6 tokens |
Do not cut at the expense of clarity Deleting a pleasantry saves tokens and costs nothing. But deleting "for a Saudi audience" or "maximum 30 characters" saves one token and buys you a wrong answer that you then have to ask for again — costing more overall. Cut filler, never information.
Techniques that improve results immediately
1. Assign a role
"You are a chartered accountant" makes the model reach for domain vocabulary and reasoning instead of a generic answer.
2. Demand a specific format
"Return a table with columns: name, cost, priority" beats "organise it nicely". A defined format is easier to use and cuts padding.
3. Give at least one example
This is called few-shot prompting. A single example of the output you want is clearer than three paragraphs describing it.
4. Ask for step-by-step reasoning on hard problems
Adding "think step by step before answering" measurably improves accuracy on arithmetic and logic tasks.
5. Phrase instructions positively
"Write in short sentences" is followed more reliably than "do not write long sentences".
6. Say what to do when information is missing
Add: "if anything is unclear, ask before assuming". This cuts hallucination substantially.
Common prompt mistakes
- Vagueness: "write something good about marketing" — good how? for whom? how long?
- Stacking several tasks: ask for one thing per message, or number the tasks explicitly.
- Assuming unstated context: the model knows nothing about your industry or product unless you say so.
- Vague qualifiers: "short", "quickly", "professional" — replace with numbers and criteria.
- Ignoring format: then spending time reformatting the answer by hand.
- Not iterating: the first prompt is rarely the best one. Adjust and try again.
How to use this tool
The tool works in two modes:
Optimise an existing prompt
- Paste your prompt into the box.
- Review the quality score and the list of issues found.
- Copy the improved version and see how many tokens you saved.
Build one step by step
- Pick a role from the library or write your own.
- Fill in task, context, format and constraints.
- The prompt assembles itself in a logical order, ready to copy.
Completely private All processing happens in your browser. Your prompts are never sent to a server, never stored, and no external API is involved.
Frequently asked questions
How do I write a better AI prompt?
Specify the role, task, context, output format and constraints. Replace vague qualifiers such as "short" with concrete numbers, and delete pleasantries that carry no information. Use the step-by-step builder above to assemble one properly.
What is a token and why does it matter?
A token is a chunk of text roughly four English characters long. APIs bill for tokens in both input and output, and context windows hold a fixed number, so removing filler cuts cost and leaves more room for useful content.
Does shortening a prompt reduce answer quality?
Not if you only remove filler. Cutting pleasantries and repetition has no effect on quality, but cutting context or constraints does. The rule is: delete words that carry no information, keep everything that narrows the answer.
Do these techniques work with every model?
The core principles — clarity, role, format, context — work across all modern models. Some specifics vary between them, so test and adjust based on the results you actually get.
Are my prompts sent to a server?
No. The tool runs entirely in your browser in JavaScript and uses no external API. Your text never leaves your device and nothing is stored.
How many tokens does Arabic text use?
Arabic consumes more tokens per character than English, and a single word can become several tokens. This means trimming filler from an Arabic prompt saves proportionally more than doing the same in English.
What is the difference between a system prompt and a normal prompt?
A system prompt defines the model behaviour and role for the whole conversation, while a normal prompt is your request in a single message. Put the role and fixed constraints in the system prompt when the interface supports one.
How do I reduce hallucination?
Add explicit instructions such as "if you are not certain, say you do not know" and "do not invent sources or figures", and supply reference material inside the prompt rather than relying on the model general knowledge.
Last updated: