🤖 AI Hot

Production Prompt Engineering: Lessons from Anthropic

A
Alex Chen

Margot Van Laar works on Claude’s prompt infrastructure at Anthropic. In a recent talk, she laid out a case that most prompt engineering advice misses the point. The hard part isn’t writing clever prompts—it’s debugging them when they break in production, and having evaluation systems that tell you they broke before your users do.

I watched the talk twice. The first time I nodded along. The second time I wrote down everything I’ve been doing wrong. Here’s the practical version of what she said, organized around problems I’ve actually hit.

The Core Argument: Eval First, Prompts Second

Van Laar’s thesis is blunt: prompt engineering without rigorous evaluation is just vibes. You can craft what feels like a brilliant system prompt, test it on five examples, ship it, and never know it’s silently failing on cases you didn’t think of. The only way to know if a prompt change is an improvement is to measure it against a representative test set.

This sounds obvious. But in practice, most teams I’ve seen—including my own past work—write prompts first and build evals later, if at all. Van Laar’s recommendation is to invert that: build your evaluation harness before you write your first prompt iteration. The eval is the spec. The prompt is just the implementation.

What does a good eval look like? At minimum, 50-100 examples that cover:

  • Common cases your system should handle cleanly
  • Edge cases that have broken in the past
  • Ambiguous cases where multiple reasonable answers exist
  • Adversarial cases designed to trigger unwanted behavior

The examples need ground-truth labels. Not “the model said something reasonable”—actual, human-judged correct answers. Van Laar was explicit that auto-grading with another LLM (LLM-as-judge) is useful for scaling but dangerous as your only metric. LLM judges inherit the same biases as the model you’re evaluating. You need at least some human-verified examples in your test set.

Debugging Production Prompts: The Real Job

The part of Van Laar’s talk that resonated most with me: prompt engineering isn’t a design activity, it’s a debugging activity. The prompts that ship to production drift. Model updates change behavior. User inputs shift in distribution. Edge cases emerge that weren’t in your test set. Your job isn’t to write a perfect prompt once—it’s to build a system where you can detect problems and fix them fast.

She described a debugging workflow that mirrors software incident response:

  1. Detect. An eval metric drops below threshold, or a user reports unexpected output
  2. Triage. Is this a model change, a prompt regression, a data shift, or an edge case?
  3. Reproduce. Find the specific inputs that trigger the problem
  4. Fix. Adjust the prompt, add constraints, or add examples
  5. Verify. Run the full eval suite to confirm the fix didn’t break other cases

The step most teams skip is triage. When something goes wrong, the impulse is to immediately tweak the prompt. But if the root cause is a model update that changed instruction-following behavior, your prompt tweak might work today and break again next week. Van Laar emphasized checking the model version first: “If you don’t know which model version you’re debugging against, you don’t know anything.”

Chain of Thought: When It Helps and When It Doesn’t

Van Laar had a nuanced take on chain-of-thought prompting that differs from the conventional wisdom. She doesn’t recommend it universally. Her findings:

Chain of thought helps when: the task requires multi-step reasoning where intermediate steps can be verified. Math problems, logical deductions, structured data extraction from unstructured text—these benefit from explicit reasoning chains.

Chain of thought doesn’t help when: the task is classification, simple extraction, or anything where the model already gets 95%+ accuracy without it. Adding chain of thought to these tasks increases latency and token cost with no accuracy gain. Worse, on some classification tasks, forcing reasoning can introduce errors where the model overthinks and talks itself out of a correct answer.

The practical rule: only add chain of thought if you can measure that it improves accuracy on your eval set. Don’t add it because it “feels like it should help.” Run the A/B test with and without, compare scores, and use numbers to decide.

She also noted that chain of thought becomes more valuable as model size decreases. On Claude Opus, chain of thought often doesn’t move the needle for straightforward tasks. On Claude Haiku, it can be the difference between workable and unusable. The same pattern holds across providers—smaller models benefit more from explicit reasoning instructions.

Few-Shot Examples: Quality Over Quantity

Another point where Van Laar pushed back on common practice: few-shot examples. The default advice is “include 3-5 examples in your prompt.” She argued that the number matters less than the diversity and quality of those examples.

She showed data where 2 carefully chosen examples outperformed 8 randomly selected ones on a classification task, because the 2 covered the failure modes while the 8 were mostly easy cases the model already handled. The lesson: select few-shot examples to patch your model’s known weaknesses, not to demonstrate cases it already gets right.

Her method for choosing examples:

  1. Run your current prompt against the eval set
  2. Identify the specific categories of failure
  3. For each failure category, add one example that shows the correct behavior
  4. Re-run the eval and verify the failure rate drops for that category
  5. Repeat until marginal improvements stop justifying the token cost

This is tedious compared to grabbing 5 random examples from a spreadsheet. But it’s also measurable. You know exactly which examples are pulling weight and which are just burning tokens.

The Evaluation Stack She Recommends

Van Laar was practical about tooling. She didn’t prescribe a specific platform but laid out the capabilities a production prompt engineering setup needs:

Version control for prompts. If you can’t git diff your prompt changes, you can’t do root cause analysis when something breaks. Prompts should be in source control, with the same review and rollback discipline as code.

Automated eval runs on every change. Every prompt change should trigger an eval run against the full test set. If accuracy drops, the change doesn’t ship. This is continuous integration for prompts—same principle, different artifact.

Production monitoring. Your eval set captures known cases. Production will throw unknown cases at you. You need monitoring that detects distribution shifts in model outputs: changes in response length, sentiment, refusal rate, or topic distribution. These are leading indicators that something changed upstream.

Human review sampling. Automated eval metrics are necessary but insufficient. Van Laar recommended sampling 1-5% of production outputs for human review on a weekly cadence. It catches quality issues that automated metrics miss—tone problems, subtle bias, output that’s technically correct but unhelpful.

Practical Takeaways I’m Applying

After watching the talk, I changed three things in how I handle prompts:

First, I stopped shipping prompt changes without running them against at least 20 test cases. Even a quick manual eval is better than none.

Second, I started versioning prompts in git instead of keeping them in a web UI or a config dashboard. The ability to git blame a prompt regression is worth the extra friction.

Third, I added a one-line model version log to every prompt experiment. “Tested against claude-sonnet-4-5-20260601” takes three seconds to write and saves hours of confusion when the same prompt behaves differently a month later.

Where This Leaves Prompt Engineering as a Discipline

Van Laar didn’t say prompt engineering is dying or being automated away. Her argument was more interesting: prompt engineering is maturing from a craft into an engineering discipline. The difference is rigor. A craftsperson iterates by feel. An engineer iterates against measurements.

The uncomfortable implication is that most current prompt engineering doesn’t qualify. If you can’t answer “how do you know this prompt is better than the last one?” with numbers from an eval run, you’re doing craft, not engineering. That doesn’t mean your prompt is bad—it means you can’t prove it’s good.

I think she’s right, and I think the field is moving in this direction whether individual practitioners adopt it or not. The teams shipping LLM-powered features at scale have already built eval infrastructure. The ones that haven’t are operating on faith. Faith works until it doesn’t, and in production systems, it doesn’t sooner than you think.

Common Prompt Engineering Mistakes She Called Out

Van Laar listed several patterns she sees repeatedly in production prompt failures. A few that hit close to home:

Over-specifying the output format. Developers often cram detailed formatting instructions into system prompts—“respond in JSON with exactly these fields, use camelCase, include a status field that must be one of…” When the model gets one detail wrong, the entire output becomes unparseable. Her recommendation: separate content instructions from format instructions, and handle formatting in post-processing when possible. Use structured output APIs (like Claude’s tool use or GPT’s JSON mode) instead of relying on natural language formatting instructions.

The “be helpful” trap. Many system prompts include vague politeness directives like “be helpful and professional.” These add tokens without constraining behavior in any measurable way. If you want the model to decline unsafe requests, say exactly what constitutes unsafe and what the model should do. “Be helpful” is not a spec.

Copying prompts from blog posts. Van Laar was diplomatic but clear: prompts that work for someone else’s use case on someone else’s eval set are unlikely to work for yours. The prompt that ships on a GitHub README was tuned for a demo, not for production reliability. Treat found prompts as inspiration, not as starting points.

Not testing across model versions. A prompt that scores 95% on Claude Opus might score 70% on Claude Sonnet. If your production routing sends different traffic to different models, you need to test against every model in your serving path. Van Laar recommended maintaining a model-performance matrix: each row is a prompt version, each column is a model version, each cell is a measured accuracy. Without this, you don’t know whether a regression is the prompt’s fault or the model’s.

What This Means for Teams Building With LLMs

For solo developers, Van Laar’s framework is aspirational but practical: start with 20 test cases, version your prompts, measure before and after every change. You don’t need a full CI/CD pipeline for prompts on day one.

For teams shipping to paying users, the bar is higher. If a prompt regression silently degrades output quality for 10% of your users, how long until you notice? If the answer is “when support tickets spike,” you have a monitoring gap that will eventually cost you. The eval infrastructure Van Laar describes is table stakes for production LLM systems—it’s not over-engineering, it’s the minimum viable safety net.

One thing she didn’t say explicitly but implied throughout: prompt engineering as a dedicated role might not exist in five years. Not because prompts go away, but because the discipline merges into broader ML engineering. The skills—building evals, monitoring distributions, debugging model behavior—are the same skills, applied to a different artifact. The people who treat prompt engineering as a craft will be replaced by people who treat it as engineering. The ones who make the transition won’t.


Margot Van Laar’s talk was delivered at an internal Anthropic engineering seminar. Key points were shared publicly via Anthropic’s engineering blog and social media in June 2026. For foundational reading on evaluation methodology, see the OpenAI Evals framework and Anthropic’s prompt engineering guide.

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen