Prompt Evaluator
Systematically evaluate LLM prompts across multiple quality dimensions,
produce quantitative scores, and generate optimized rewrites.
When to Use
- Reviewing or auditing system prompts before production deployment
- Comparing two or more prompt variants to choose the best one
- Optimizing an existing prompt that produces inconsistent results
- Establishing prompt quality standards for a team or organization
- Debugging why an LLM is not following instructions correctly
Evaluation Rubric
Score every prompt on the following 8 dimensions (each 1-10):
| # |
Dimension |
What It Measures |
| 1 |
Clarity |
Is the instruction unambiguous? Could a human follow it without asking questions? |
| 2 |
Specificity |
Does it define expected output format, length, style, and constraints? |
| 3 |
Completeness |
Are all necessary inputs, edge cases, and fallback behaviors covered? |
| 4 |
Conciseness |
Is every sentence load-bearing? Is there redundancy or filler? |
| 5 |
Structure |
Does it use clear sections, numbered steps, or formatting that aids parsing? |
| 6 |
Grounding |
Does it provide examples, few-shot demonstrations, or reference material? |
| 7 |
Safety |
Does it include guardrails against misuse, hallucination, or harmful output? |
| 8 |
Robustness |
Will it perform consistently across varied inputs and edge cases? |
Scoring Guidelines
- 9-10: Production-ready, best-in-class
- 7-8: Good, minor improvements possible
- 5-6: Functional but with notable weaknesses
- 3-4: Significant issues that will cause failures
- 1-2: Fundamentally broken, needs complete rewrite
Workflow
Mode 1: Single Prompt Evaluation
- Receive the prompt text from the user.
- Parse the prompt to identify: role definition, task description, constraints,
output format, examples, and safety guardrails.
- Score each of the 8 dimensions independently using the rubric above.
- Calculate the overall weighted score:
- Clarity × 1.5 + Specificity × 1.3 + Completeness × 1.2 + Conciseness × 1.0
- Structure × 1.0 + Grounding × 1.1 + Safety × 1.3 + Robustness × 1.2
- Normalize to a 0-100 scale.
- Identify the top 3 weakest dimensions.
- Generate specific, actionable improvement suggestions for each weak area.
- Produce an optimized rewrite incorporating all suggestions.
- Output a structured evaluation report.
Mode 2: A/B Comparison
- Receive two prompt variants (Prompt A and Prompt B).
- Evaluate each independently using the full rubric.
- Produce a side-by-side comparison table.
- Declare a winner with detailed justification.
- Suggest a merged "Prompt C" that combines the best elements of both.
Mode 3: Batch Evaluation
- Receive a directory path or list of prompt files.
- Evaluate each prompt using the rubric.
- Produce a summary table ranked by overall score.
- Identify systemic patterns (e.g., "all prompts lack safety guardrails").
- Generate a team-level recommendations report.
Output Format
Always produce the evaluation in this structure:
## Prompt Evaluation Report
### Metadata
- **Evaluated at**: [timestamp]
- **Mode**: [Single / A/B / Batch]
- **Prompt length**: [token count estimate]
### Scores
| Dimension | Score | Assessment |
|-----------|-------|-----------|
| Clarity | X/10 | [one-line assessment] |
| Specificity | X/10 | [one-line assessment] |
| ... | ... | ... |
### Overall Score: XX/100
### Top Issues
1. [Issue description + specific location in prompt]
2. [Issue description + specific location in prompt]
3. [Issue description + specific location in prompt]
### Recommendations
[Numbered list of specific, actionable changes]
### Optimized Rewrite
[Full rewritten prompt with changes highlighted]
Anti-Patterns to Flag
Always check for and flag these common prompt anti-patterns:
- Vague role assignment: "You are a helpful assistant" (too generic)
- Missing output format: No specification of expected response structure
- Contradictory instructions: Conflicting directives in different sections
- Token waste: Excessive preamble, repeated instructions, or filler text
- Missing edge cases: No guidance for when the model doesn't know the answer
- Over-constraining: So many rules that the model struggles to satisfy all of them
- Under-constraining: So few rules that the model produces inconsistent outputs
- Prompt injection vulnerability: No defense against adversarial user inputs
- Hallucination risk: Encouraging the model to speculate without grounding
Examples
Example 1: Evaluating a Customer Support Prompt
Input prompt:
You are a customer support agent. Help users with their questions.
Be nice and helpful.
Evaluation result:
- Clarity: 4/10 — "Help users" is too vague; no scope defined
- Specificity: 2/10 — No output format, tone guidelines, or escalation rules
- Completeness: 2/10 — Missing: product knowledge, refund policy, hours, fallbacks
- Overall: 28/100
Optimized rewrite:
You are a customer support agent for [Company Name].
## Scope
You handle inquiries about: orders, shipping, returns, and product information.
You do NOT handle: billing disputes, account security, or technical bugs.
## Response Guidelines
- Tone: Professional, empathetic, concise
- Length: 2-4 sentences per response unless the issue requires detailed steps
- Always greet the user by name if available
- If you cannot resolve the issue, escalate with: "I'll connect you with a specialist."
## Output Format
1. Acknowledge the user's concern
2. Provide the solution or next step
3. Ask if there's anything else you can help with
Example 2: A/B Comparison
Prompt A: A 500-token system prompt for code review
Prompt B: A 200-token system prompt for code review
Result: Prompt B scores higher on Conciseness (9 vs 4) but lower on
Completeness (5 vs 8). Recommendation: Merge into a 300-token Prompt C
that retains A's completeness with B's concise style.
1---2name: prompt-evaluator3description: Evaluate and optimize LLM prompts for quality, clarity, and effectiveness. Use this skill when reviewing system prompts, user prompt templates, or any instructional text destined for an LLM. Produces a scored rubric with actionable rewrite suggestions. Supports single prompts, A/B comparison, and batch evaluation workflows.4license: MIT5---67# Prompt Evaluator89Systematically evaluate LLM prompts across multiple quality dimensions,10produce quantitative scores, and generate optimized rewrites.1112## When to Use1314- Reviewing or auditing system prompts before production deployment15- Comparing two or more prompt variants to choose the best one16- Optimizing an existing prompt that produces inconsistent results17- Establishing prompt quality standards for a team or organization18- Debugging why an LLM is not following instructions correctly1920## Evaluation Rubric2122Score every prompt on the following **8 dimensions** (each 1-10):2324| # | Dimension | What It Measures |25|---|-----------|-----------------|26| 1 | **Clarity** | Is the instruction unambiguous? Could a human follow it without asking questions? |27| 2 | **Specificity** | Does it define expected output format, length, style, and constraints? |28| 3 | **Completeness** | Are all necessary inputs, edge cases, and fallback behaviors covered? |29| 4 | **Conciseness** | Is every sentence load-bearing? Is there redundancy or filler? |30| 5 | **Structure** | Does it use clear sections, numbered steps, or formatting that aids parsing? |31| 6 | **Grounding** | Does it provide examples, few-shot demonstrations, or reference material? |32| 7 | **Safety** | Does it include guardrails against misuse, hallucination, or harmful output? |33| 8 | **Robustness** | Will it perform consistently across varied inputs and edge cases? |3435### Scoring Guidelines3637- **9-10**: Production-ready, best-in-class38- **7-8**: Good, minor improvements possible39- **5-6**: Functional but with notable weaknesses40- **3-4**: Significant issues that will cause failures41- **1-2**: Fundamentally broken, needs complete rewrite4243## Workflow4445### Mode 1: Single Prompt Evaluation46471. **Receive** the prompt text from the user.482. **Parse** the prompt to identify: role definition, task description, constraints,49 output format, examples, and safety guardrails.503. **Score** each of the 8 dimensions independently using the rubric above.514. **Calculate** the overall weighted score:52 - Clarity × 1.5 + Specificity × 1.3 + Completeness × 1.2 + Conciseness × 1.053 + Structure × 1.0 + Grounding × 1.1 + Safety × 1.3 + Robustness × 1.254 - Normalize to a 0-100 scale.555. **Identify** the top 3 weakest dimensions.566. **Generate** specific, actionable improvement suggestions for each weak area.577. **Produce** an optimized rewrite incorporating all suggestions.588. **Output** a structured evaluation report.5960### Mode 2: A/B Comparison61621. **Receive** two prompt variants (Prompt A and Prompt B).632. **Evaluate** each independently using the full rubric.643. **Produce** a side-by-side comparison table.654. **Declare** a winner with detailed justification.665. **Suggest** a merged "Prompt C" that combines the best elements of both.6768### Mode 3: Batch Evaluation69701. **Receive** a directory path or list of prompt files.712. **Evaluate** each prompt using the rubric.723. **Produce** a summary table ranked by overall score.734. **Identify** systemic patterns (e.g., "all prompts lack safety guardrails").745. **Generate** a team-level recommendations report.7576## Output Format7778Always produce the evaluation in this structure:7980```markdown81## Prompt Evaluation Report8283### Metadata84- **Evaluated at**: [timestamp]85- **Mode**: [Single / A/B / Batch]86- **Prompt length**: [token count estimate]8788### Scores8990| Dimension | Score | Assessment |91|-----------|-------|-----------|92| Clarity | X/10 | [one-line assessment] |93| Specificity | X/10 | [one-line assessment] |94| ... | ... | ... |9596### Overall Score: XX/1009798### Top Issues991. [Issue description + specific location in prompt]1002. [Issue description + specific location in prompt]1013. [Issue description + specific location in prompt]102103### Recommendations104[Numbered list of specific, actionable changes]105106### Optimized Rewrite107[Full rewritten prompt with changes highlighted]108```109110## Anti-Patterns to Flag111112Always check for and flag these common prompt anti-patterns:113114- **Vague role assignment**: "You are a helpful assistant" (too generic)115- **Missing output format**: No specification of expected response structure116- **Contradictory instructions**: Conflicting directives in different sections117- **Token waste**: Excessive preamble, repeated instructions, or filler text118- **Missing edge cases**: No guidance for when the model doesn't know the answer119- **Over-constraining**: So many rules that the model struggles to satisfy all of them120- **Under-constraining**: So few rules that the model produces inconsistent outputs121- **Prompt injection vulnerability**: No defense against adversarial user inputs122- **Hallucination risk**: Encouraging the model to speculate without grounding123124## Examples125126### Example 1: Evaluating a Customer Support Prompt127128**Input prompt**:129```130You are a customer support agent. Help users with their questions.131Be nice and helpful.132```133134**Evaluation result**:135- Clarity: 4/10 — "Help users" is too vague; no scope defined136- Specificity: 2/10 — No output format, tone guidelines, or escalation rules137- Completeness: 2/10 — Missing: product knowledge, refund policy, hours, fallbacks138- Overall: 28/100139140**Optimized rewrite**:141```142You are a customer support agent for [Company Name].143144## Scope145You handle inquiries about: orders, shipping, returns, and product information.146You do NOT handle: billing disputes, account security, or technical bugs.147148## Response Guidelines149- Tone: Professional, empathetic, concise150- Length: 2-4 sentences per response unless the issue requires detailed steps151- Always greet the user by name if available152- If you cannot resolve the issue, escalate with: "I'll connect you with a specialist."153154## Output Format1551. Acknowledge the user's concern1562. Provide the solution or next step1573. Ask if there's anything else you can help with158```159160### Example 2: A/B Comparison161162**Prompt A**: A 500-token system prompt for code review163**Prompt B**: A 200-token system prompt for code review164165Result: Prompt B scores higher on Conciseness (9 vs 4) but lower on166Completeness (5 vs 8). Recommendation: Merge into a 300-token Prompt C167that retains A's completeness with B's concise style.