Skip to content

Cloud AI tool: this page sends your text to its AI provider. File tools never upload anything.

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.

Start anywhere: the Optimizer fixes what you have, the Recipe library gives you proven starting points, and the hub lists all twelve tools.

Quick Answer

Prompt engineering is the craft of giving a language model everything it needs: an explicit role, the context that matters, numbered constraints instead of adjectives, a defined output format, and examples when the task is ambiguous. This guide covers the patterns that measurably change output quality — the CO-STAR and RTF frameworks, chain-of-thought, few-shot examples, variable templates, and honest A/B testing — and links each one to a free tool on this site that applies it with your own API key.

Key Facts

  • Constraints beat adjectives: numbers, lengths, and formats are decisions the model no longer has to guess
  • Frameworks (CO-STAR, RTF) are completeness checklists, not magic words — cut the sections that say nothing
  • Few-shot examples teach format more than content; two is usually the ceiling
  • Variable templates ({{placeholders}}) turn one prompt into a reusable tool
  • A prompt change is only real if it survives a fixed test set — the A/B Tester makes that free

Frequently Asked Questions

What is the single biggest prompt improvement?

Replace adjectives with constraints. "Write a detailed summary" leaves every decision to the model; "summarize in exactly 3 bullets, each under 20 words, most important first" makes almost every decision for it. Constraints beat adjectives in nearly every task.

Do frameworks like CO-STAR actually matter?

As checklists, yes — they force you to state Context, Objective, Style, Tone, Audience, and Response format instead of hoping the model infers them. As magic words, no: the sections that mention nothing get ignored. Use a framework as a completeness check, then cut empty sections.

How many examples should a few-shot prompt have?

One great example beats three mediocre ones, and two is usually the ceiling before you should switch to fine-tuning or a structured task instead. Every example teaches format more than content — if your examples disagree with each other, output quality drops.

How do I know my prompt change actually helped?

Run it against a fixed set of test inputs before and after — not one cherry-picked example. The free A/B Tester runs variants over a dataset with assertions and shows pass-rate deltas; a change that only looks better on one input is noise, not improvement.