Prompt optimization

Prompt optimizer

Shorten and restructure a prompt without changing what it asks for. Every rewrite is checked against the original, and a rewrite that drops a requirement is rejected.

  • Free
  • Verified rewrites
  • No model calls

What it does

Most prompt optimizers hand your prompt to another model and return whatever comes back. That can read well and still lose a constraint. PromptFlowEngine takes the opposite approach: it applies a small set of documented transforms, then proves that the result still contains everything the original did.

There are three modes. Conservative normalizes whitespace and removes exact duplicate sentences. Balanced also removes filler and politeness phrases. Structured additionally arranges the prompt into Task, Context, Requirements, Output format, and Input sections and wraps template variables in tags.

Each mode produces a candidate. A candidate is kept only if every original sentence, every extracted requirement, and every protected span (code, quotes, URLs, variables) is still present, and it introduces no new warning. You choose a goal: fewest tokens, highest quality, or a balance. If nothing beats the original, the original wins.

Practical example

Before and after

This run was produced by the engine when the page was built, in structured mode with the balanced goal.

Original

68 tokens · 77/100
Hello! I would like you to please rewrite the pull request description below so that it is clearer for reviewers. Please make sure to keep all of the technical details. Please make sure to keep all of the technical details. In order to help reviewers, add a 2-sentence summary at the top. Return markdown.

{{pr_description}}

Optimized

72 tokens · 100/100
## Task
Rewrite the pull request description below so that it is clearer for reviewers.

## Context
To help reviewers, add a 2-sentence summary at the top.

## Requirements
- Make sure to keep all of the technical details.

## Output format
- Return markdown.

## Input
<pr_description>
{{pr_description}}
</pr_description>
  • Removed repeated sentencesRepetition costs tokens on every call and can over-weight one instruction.
  • Removed filler and politeness phrasesPhrases like "please", "basically", and "I would like you to" do not change the instruction.
  • Delimited template variablesWrapping interpolated input in tags keeps untrusted text from reading as instructions.
  • Organized into sectionsSeparating task, context, requirements, and output format makes each constraint explicit and scannable.

Computed by the engine when this page was built. Token change 5.9%; 3 issues fixed;0 left for you as suggestions. Structured mode may add headings, which is why the balanced goal allows a small token increase in exchange for a higher score.

Key benefits

Features

Who it is for

Use cases

Frequently asked questions

How is this different from asking ChatGPT to improve my prompt?

A model rewrites freely and may add, drop, or reinterpret instructions. This optimizer applies fixed transforms and then verifies that every original sentence and requirement is still present. It is less creative and much more predictable.

Will the optimized prompt give better answers?

It removes known causes of poor answers, such as repetition, filler, and missing structure. It cannot measure answer quality, because it does not run the prompt. Test the result against your model for anything important.

Does it work for Claude and Gemini prompts?

Yes. The transforms are about wording and structure, which apply to any model. Token counts are exact for OpenAI models and approximate for other providers.

What happens to code inside my prompt?

Code blocks, inline code, quotes, URLs, and template variables are masked before any transform runs and restored exactly afterwards.

Every product runs the same engine, so they combine without surprises.

Learn the technique behind it

Guides from the prompt engineering knowledge center that explain the ideas this product applies.

Try it on your own prompt.

Free, deterministic, and private. No sign-up.