Prompt Engineering Guide
The patterns that measurably change model output — each linked to a free tool that applies it. Written for people with a task to finish, not a research paper to write.
1. The anatomy of a working prompt
Almost every strong prompt states five things: who the model is (role), what it must produce (task), which rules bind it (constraints), what shape the answer takes (format), and — only when the task is ambiguous — worked examples. Miss one and the model fills the gap with its own habits, which is where mediocre output comes from.
The fastest way to see the difference in your own prompt is the Prompt Optimizer: paste what you have and read its change list — it names exactly which of the five were missing. To build one from scratch, describe the task in a line to the Prompt Generator.
2. Frameworks: CO-STAR and RTF
CO-STAR (Context, Objective, Style, Tone, Audience, Response format) and RTF (Role, Task, Format) are completeness checklists. Their value is forcing you to decide things you would otherwise leave implicit — a section that states nothing should be cut, because the model ignores empty scaffolding and your prompt gets harder to read for nothing.
One caveat the sales pages skip: a framework does not add quality by existing. "Style: professional" changes nothing; "Style: plain sentences a busy CFO reads on a phone" does. The optimizer's framework picker exists for exactly this — it restructures around the framework while keeping your intent.
3. Chain-of-thought and stepwise instructions
For reasoning tasks, asking the model to work in steps before answering reduces errors — but the instruction belongs in the prompt only where reasoning is actually needed; for extraction and formatting tasks it adds latency and drift. Modern "reasoning" models do much of this internally, so the pattern matters most with cheap, fast models — which are usually the right choice anyway (the Token & Cost Calculator shows how wide the gap is).
When a task needs more than one model pass, chain it explicitly: extract, then transform, then draft. The Chain Builder pipes each step's output into the next, with free text transforms between the model calls.
4. Variables: prompts as tools
A prompt with {{placeholders}} is a reusable tool instead of a one-off. Write them with types — {{tone|select:formal|casual}}, {{count|number}} — and they become form fields in the Playground and in shareable forms. This is also how you keep a prompt library honest: the fixed parts carry the craft, the variables carry the input.
5. Testing: the part most people skip
A prompt change that looks better on one example is noise. Keep a fixed set of 10–30 real inputs, define what a good output contains (a substring, a format, valid JSON, a length cap), and re-run the set on every change. The A/B Tester does exactly this — variants × dataset × assertions, with an optional LLM judge that is clearly labeled as opinion, and regression marks against the previous run.
Version discipline is the other half: the Prompt Library snapshots every save so you can diff what changed and roll back the day a "small improvement" quietly breaks three cases.
6. Models, keys, and cost
Every tool here runs on your own API key — held in your browser, never sent to this site. A free Google AI Studio key or an OpenRouter key with free model variants keeps your cost at zero; for paid models, most prompt work costs fractions of a cent. Check before you scale with the Token & Cost Calculator, and when a prompt graduates from tooling to production, the Code Export turns it into a Python, JS, or cURL call against your own account.
For image models, structure beats prose: subject, style, lighting, composition, camera, then parameters. The Image Prompt Builder assembles that structure from chips, and Image to Prompt reverse-engineers a prompt from any picture.