Prompt engineering
I write the output shape first, version the prompt, budget its tokens, and compare model replies before shipping.
Try it
The demo sends your task to the same model twice, once as the bare question and once as an engineered prompt. That prompt carries a role, rules and a required JSON shape, and the reply is validated against that shape. A failed check goes back to the model once for a repair before you see the result.
How it works
- Write the output shapeI fix the required keys and the allowed values before I write any wording, and the prompt states that shape verbatim. I use no provider schema mode, so the caller parses the reply strictly and returns nothing when a key is missing.
- Version every templateI keep every template in a versioned store with named double-brace placeholders, and the render step reports which values are still missing. Each edit bumps the version number in the same write that changes the text, so we can roll back one prompt.
- Compose per personaIn a layout editor I order 13 prompt sections into one system prompt for each persona. Only the system, chat and voice channels are augmented at runtime. Each live turn resolves the composed string in process, so no extra model call is spent.
- Budget the contextI run an estimator that reports characters and estimated tokens per section, then fits the total against every model in the catalog. Retrieved context stays inside my retrieval defaults, top-k 5 and 6000 characters, so documents cannot crowd out the instructions.
Tools
| Tool | What it does here | Status |
|---|---|---|
| Prompt composer, estimator and simulator | Orders the sections into one system prompt per persona, reports token cost against each model window, and runs the prompt against a model. | Available |
| Versioned prompt template store | Holds templates with named variables and bumps a version on every update, reachable today only through the internal tool surface. | Early access |
| Multi-provider model gateway | Routes a prompt to a provider with key handling, rate limits and per-call logging, and sets prompt-cache breakpoints on the Anthropic adapter. | Available |
| LLM-judge evaluation harness | Scores model answers over a versioned dataset on named rubric dimensions, with hard-fail flags and a pass or fail exit code. | Available |
| Public prompting demo | Runs the side-by-side comparison on this page on Cloudflare Workers AI, with Llama models, a schema check and one repair retry. | Demo only |
Available means shipped and in use. Early access means built but not generally available. Roadmap means designed, not built. Demo only means it powers this public demo, not customer deployments.
The full write-up covers access control, evaluation and how this runs inside a customer environment.
Read it on gusit.deThe other answers
Gus IT LLC. Contact gus@gusit.de. Claude is a product of Anthropic PBC. Cloudflare and Workers AI are trademarks of Cloudflare, Inc. Llama is a trademark of Meta Platforms, Inc. Other names are trademarks of their respective owners. Gus IT LLC is an independent engineering firm and is not affiliated with or endorsed by these companies.