Prompts aren’t Real
TL;DR Highlight
Stop hand-tuning prompts; use pass^k tests and an optimizer to improve them automatically.
Who Should Read
Backend developer running a production agent that occasionally breaks schemas or rules and is nervous about editing prompts.
Core Mechanics
- LLMs sometimes fail badly
- Even simple structured-output constraints like a title of 80 characters or less break in a fraction of requests.
- The smartest models do this too, and the failure rate shifts with the input, so you must keep watching.
- Renaming a field fixed it
- A recent fix was renaming the field from "title" to "heading".
- The author expects such a deranged fix to break again at some point.
- pass^k measures behavior
- Run the same test many times and check how consistently it passes (the industry term is pass^k).
- It helps catch changes that unintentionally break the agent.
- A new prompt lands in a different universe
- The weight of the existing instructions changes how a new prompt performs, usually for the worse.
- So the pattern where the voice team owns the voice prompts doesn't scale.
- An optimizer mashes the prompt for you
- Have Claude read the skill and generate adversarial and benign scenarios, then express them as pass^k tests.
- Compare runs with and without the skill, then let GEPA (genetic pareto) reflect on failures and revise the prompt in a loop.
- Holdout tests prevent overfitting
- The optimizer might encode your test examples into the prompt.
- Keep tests of the same scenarios that it never saw, and go back a step if they regress.
- Experts should build datasets, not prompts
- Golden datasets of good and bad responses are the key artifact for domain experts.
- Sample production conversations, find failures with LLM judges, and add them as hard cases to the suite.
Community Reactions
- A bring-your-own-AI opinion
- One commenter would prefer companies expose tools for the user's own AI rather than ship their own AI.
- That would sidestep the AI weirdness problem for the company.
- Hit the same problems in production
- A commenter building an LLM production system said extensive tests were necessary.
- Stakeholders only see the few times something worked, not the long tail of cursed results.
- Concern about test cost
- One commenter said running enough tests for statistical significance costs real money and the company might not survive it.
- Another called looping prompt optimization wasteful and said customers would stop paying if they did it.
- Pushback that prompts still matter
- One opinion held that good constraints come from good prompts, which separate experts from beginners.
- A cynical summary said it's basically supervised learning on your prompts.
How to Apply
- Write a pass^k test for your current prompt
- Pick the rule that breaks most often today and write a script that runs the same input 20 times.
- Record the pass rate as your baseline.
- Have Claude generate adversarial and benign scenarios
- Give Claude the new skill or prompt and ask for abuse scenarios and normal scenarios that might break.
- Run the tests before and after the change and check that the pass rate improves.
- Set aside holdout tests
- Hide a portion of the scenarios from both the optimizer and manual edits.
- If the holdout regresses after optimization, go back a step.
- Build a golden dataset from production failures
- Sample real conversations, label the failures, and add them to the test suite.
- For complex judgments like brand voice, optimize a separate LLM judge using labeled data.
Try It
# Paste into Claude or ChatGPT (simplified version of the article's method: test generation step only)
Below is the prompt (skill) I want to add to my agent.
{{prompt}}
For this prompt, create the following.
1. 10 scenarios where a malicious user tries to bypass these rules
2. 10 normal usage scenarios that this prompt might break
Output each scenario as JSON: {"input": user message, "expected": expected behavior, "check": how to judge (checkable in code or needs an LLM judge)}
Next step: run each scenario 20 times and compare the pass rate (pass^k) before and after applying the prompt.Terminology
Related Papers
Gemini 4 Neon is the new #1 on the Models Engineering Index
Gemini 4 Neon ranks first on the Models Engineering Index with 68.0, combining multiple benchmarks.
LLMs can read and write executables byte by byte from a hex dump
Given only a hex dump and no tools, an LLM analyzed, patched and wrote working executables.
Claude was trained on protein sequences at scale
Next-amino-acid tests on obscure proteins show only the latest Claude models predict them
Remembered as Brief: Stored Preferences SilentlyRemove Decision-Critical Information
A stored 'keep it short' preference silently drops warnings; listing must-know points first restores content.
All AI-generated code should be Open Source
A blog argues AI-generated code should be open source; most HN commenters disagreed.
What thousands of conversations look like inside a language model
Mapping Qwen3-1.7B states showed Chinese sitting apart from English, while German and Croatian overlapped it.
AI, activity, and outcomes in software engineering
AI sped up writing code, but shipping speed did not rise as much, says a talk
LLMs Play Zachtronics' TIS-100
16 LLMs played TIS-100 and set 133 new Pareto frontier points across 18 puzzles