Design a systematic framework for testing, comparing, and iterating on prompts with evaluation metrics, statistical significance, and version management.
## ROLE You are a prompt evaluation researcher who brings the rigor of A/B testing and statistical analysis to prompt engineering. You understand that prompt quality is not subjective — it can be measured along specific dimensions (accuracy, relevance, fluency, safety, format compliance) and compared statistically. You have built evaluation frameworks used by teams managing hundreds of production prompts across multiple applications. ## CONTEXT Most teams iterate on prompts through vibes-based testing: they try a change, look at a few outputs, and decide if it seems better. This approach is unreliable because LLM outputs are inherently variable — a prompt that seems better on 5 examples might be worse on 500. Rigorous prompt evaluation requires: a defined evaluation dataset, clear metrics, automated scoring, statistical significance testing, and version management. Teams that adopt systematic prompt evaluation improve their prompt quality 2-3x faster than those who rely on intuition. ## TASK Design a comprehensive prompt testing and evaluation framework: 1. **Evaluation Dataset Design**: Create a diverse test dataset of 50-100 inputs covering: typical use cases (70%), edge cases (20%), and adversarial inputs (10%). For each input, define the expected output or evaluation criteria. Include inputs of varying complexity and ambiguity. 2. **Metric Definition**: Define measurable evaluation metrics for your use case. Common metrics: accuracy (factual correctness), relevance (addresses the user's question), completeness (covers all aspects), format compliance (matches required structure), safety (no harmful content), and latency. Weight each metric by importance. 3. **Automated Scoring**: Design automated scoring methods for each metric: exact match for structured outputs, LLM-as-judge for quality assessment (with a specific judging prompt), regex checks for format compliance, keyword presence for required content, and human evaluation for subjective quality. 4. **LLM Judge Prompt**: Write the system prompt for an LLM judge that evaluates outputs on your metrics. Include: scoring rubric (1-5 scale with specific criteria for each score), few-shot examples of good and bad outputs with scores, and instructions for providing reasoning before scoring. 5. **Statistical Analysis**: Design the statistical framework: minimum sample size for significance, comparison method (paired t-test or bootstrap), confidence intervals, and how to handle the multiple comparisons problem when testing many prompt variants. 6. **Version Management**: Design a prompt versioning system: git-based version control for prompts, metadata (creation date, author, test results, deployment status), and a promotion pipeline (draft, testing, staging, production). 7. **Regression Testing**: Set up automated regression testing: run the evaluation suite on every prompt change, compare against the baseline, alert on significant regressions, and block deployment if quality drops below threshold. 8. **Reporting Dashboard**: Design a dashboard showing: metric trends over prompt versions, head-to-head comparisons, failure case analysis, and cost/performance trade-offs. ## INFORMATION ABOUT ME - [APPLICATION AND USE CASE] - [CURRENT PROMPT AND ITS WEAKNESSES] - [QUALITY DIMENSIONS THAT MATTER MOST] - [EVALUATION BUDGET] (human evaluators, LLM judge API costs) ## RESPONSE FORMAT Deliver the evaluation dataset template, metric definitions, LLM judge prompt, scoring code (Python), statistical analysis methods, and a CI/CD pipeline specification for automated prompt evaluation.
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[APPLICATION AND USE CASE][CURRENT PROMPT AND ITS WEAKNESSES][QUALITY DIMENSIONS THAT MATTER MOST][EVALUATION BUDGET]