Writing a great prompt is iterative, and the model itself is a useful critic. The active prompt optimizer sends your prompt to an LLM with instructions to critique and rewrite it toward a goal you set, then feeds the rewrite back in for another pass. Over a few rounds the prompt tightens up — clearer constraints, better structure, explicit fallbacks. You bring your own API key and run it directly from the browser.
How it works
You provide a prompt, an improvement goal, your API key, and a round count. Each round, the tool sends the current prompt plus your goal to the model and asks for two things: a short critique and an improved rewrite. The rewrite is parsed out and becomes the input to the next round, so each pass builds on the last. Every iteration is shown so you can read the reasoning and stop early once the prompt is good enough. The key is used only for the direct provider request and never stored.
When this is genuinely useful
Prompt optimization earns its cost when:
- A prompt works sometimes but fails on edge cases you cannot pin down
- You are about to deploy a prompt into a production system where output quality matters across thousands of calls
- You want structured output (JSON, a specific schema) and the model keeps drifting from it
- You need the prompt to handle missing or ambiguous inputs gracefully
It is less useful for simple, one-off tasks where a single manual rewrite would be faster.
Example improvement loop
Start with a vague prompt: "Summarise this article."
Round 1 critique: “No length constraint, no format specified, model returns inconsistent structure.”
Round 1 rewrite: "Summarise the following article in exactly three bullet points, each under 20 words. Focus on the main claim, supporting evidence, and conclusion. If no article is provided, respond: NO_CONTENT."
Round 2 critique: “Bullet format not enforced — model sometimes uses numbers.”
Round 2 rewrite adds: "Begin each bullet with a hyphen character (-)."
By round 2 or 3, the prompt has sharper constraints without becoming wordy.
Tips
- Set a measurable goal. “Enforce JSON-only output” beats “make it better.” Specific goals produce specific critiques.
- Two or three rounds is usually enough. Returns diminish quickly. More rounds risk over-engineering or drift from the original intent.
- Read the critiques, not just the rewrites. The critique often names a problem you can fix by hand faster than another round.
- Choose a small, fast model for the optimizer. Cost per round is low on a mini or flash-tier model. Save the expensive model for the final production prompt.
- You pay your provider. Calls bill to your own account at standard API rates.