Quality and safety
Prompt Evaluations
An evaluation runs a prompt against test cases and checks the results. Without evaluations every prompt change is a guess. PromptFlowEngine’s PromptOps Lab includes a regression test runner with baselines; this module explains how to design good tests.
Test datasets and golden answersBeginner
Collect real inputs, including hard and edge cases. For each, write the expected answer or the properties a good answer must have. A few dozen well-chosen cases catch most regressions.
Kinds of checksIntermediate
- Deterministic: format, schema validity, required keywords, length, no sensitive data
- Reference-based: compare with a golden answer (exact match, similarity)
- Grounding: every claim supported by the provided sources
- Model-graded (LLM-as-judge): a model scores the answer against a rubric
- Human review: the final word for subjective quality
Limits of LLM-as-judgeAdvanced
Model judges can prefer longer answers, favour their own style, and vary between runs. Calibrate a judge against human ratings, use clear rubrics, and keep deterministic checks wherever possible.
Regression testing and A/B comparisonIntermediate
Save a version as the baseline, change the prompt, and rerun the suite: a regression is a case that passed before and fails now. Compare versions on quality, cost, and latency together.
Key takeaways
- Deterministic checks first, model judges second.
- Every prompt change runs the regression suite.
- Compare quality, cost, and latency together.