Cut the ones that don't change the answer — measured on your data, not guessed.
An optimizer searches rewrites of your prompt and scores each one on your labeled examples. A 97-token extraction prompt came back as 6 tokens. How it works →
You set the accuracy floor. Every candidate is judged on a held-out set the optimizer never saw, and you read the whole tokens-vs-accuracy front, not one number. The findings →
Every node in the tree shows each step's prompt diffed against its parent. The root is what you typed, the best node is what you ship: a plain shorter prompt, nothing extra at inference. The example →
Finding the shortest prompt that still does the job — measured, not guessed. You give it your prompt, a labeled dataset and an accuracy floor; an optimizer searches rewrites and hands back the tokens-vs-accuracy trade-off. The result is a plain shorter prompt: nothing extra at inference time, no model in the request path.
You are an information extraction system. Read the passage below carefully and extract the full names of every person who is mentioned. Include each person only once, preserve the order in which they first appear, and do not include organisations, places, or pronouns. Titles such as Dr. or Professor are not part of the name. If no people are mentioned, return an empty list.
Passage:
{text}
Extract human names from: {text}
Compression v2 experiment, 12 seeds × 2,000 rollouts, Amazon Nova Micro, total cost $0.41 — full tables and front plots.
Prompt tokens are the part of the bill you pay on every call, forever, and agentic systems multiply the calls.
The same optimizer, as a library and as a studio.
A Python library. Define a task (root prompt, dataset, scorer, objective), compose search operators, run with a budget and checkpoints. Every number on this site was measured with it. There is a Claude Code skill that runs it for you.
Every step without writing code. Draw the program, attach your labeled data, run a pilot for the cost, watch the tree grow, and read the compressed prompt off each step.
LLMLingua compresses the input of each request at inference time by dropping low-information tokens, and needs a small model in the request path. promptcompression.ai compresses the prompt template once, at optimization time, by searching over rewrites and scoring them on your data. The result is a plain shorter prompt with nothing extra at inference. The two compose: a compressed template with compressed inputs.
It's a trade-off you control. You set the accuracy floor; the optimizer minimizes tokens subject to it and reports the whole Pareto front, so you choose the operating point. Always read the held-out number, not the training number.
Enough to detect the differences you care about. 100 training examples plus a held-out set was enough to separate search strategies in our compression runs; 30 was not. If you have production traces, you already have the data.
Any: Amazon Bedrock and Anthropic models directly, and anything with an OpenAI-compatible endpoint (OpenAI, vLLM, Ollama, OpenRouter). The optimizer only needs a client that returns completions.
No — it's one objective of a general prompt optimizer that also climbs accuracy, format compliance and latency, for single prompts and for multi-step agents. That larger story is on quantecarlo.com.
The engine, bpto, is open source on GitHub. Impromptune, the studio, is a hosted product built on it.