Skip to main content
You can’t improve what you don’t measure. This page covers evaluation datasets, A/B testing, and systematic prompt optimization.

You Can’t Improve What You Don’t Measure

Many teams iterate on prompts by “vibes” - does the output look good? - or by fixing one scenario at a time, and then don’t check for regression testing. That doesn’t scale. The Production Process:
Example: Customer Sentiment Classification: AI Evaluation Tools: Several tools can help you evaluate your prompts:
  • Open Source: LangFuse, Inspect AI, Phoenix, Opik,
  • Commercial: Braintrust, Langsmith, Arize, AgentOps
Programmatic Prompt Optimization: The manual cycle above (test → analyze → modify → re-test) can be automated. Frameworks like DSPy replace hand-written prompts with code — you define what you want, and an optimizer finds the best prompt wording for you.
When to Use DSPy:
  • You have an evaluation metric and training examples
  • You’re tired of manually tweaking prompt wording
  • You need to re-optimize when switching models
  • Your pipeline has multiple chained LLM calls
DSPy is particularly valuable when the manual test-modify-retest cycle becomes a bottleneck. Learn more in the DSPy introduction guide.

A/B Testing Prompts

Production Pattern: Gradual Rollout: Don’t deploy a new prompt to 100% of users immediately. Metrics to Track:
  • Task success rate
  • User satisfaction (thumbs up/down)
  • Response time
  • Cost per request
  • Error rate
Analysis After 1000 Requests: