Implements iterative patterns for evaluating and refining AI agent outputs through self-critique, evaluator-optimizer pipelines, and rubric-based scoring.
- GitHub stars
- 41,038
- Files
- 1
- Last commit
- Nov 11, 2026
- License
- MIT
- Allowed tools
- —
What does the agentic-eval skill do?
agentic-eval implements iterative patterns for evaluating and refining AI agent outputs through self-critique, evaluator-optimizer pipelines, and rubric-based scoring.
Summary generated from the skill's SKILL.md.
About the agentic-eval skill
Improving the accuracy of AI-generated code, reports, or analysis is what agentic-eval enables. Developers use this skill to move beyond single-shot generation by implementing iterative loops where an agent assesses its own work and makes corrections. It provides structured patterns for self-critique, evaluator-optimizer pipelines, and test-driven refinement workflows.
An agent should load this skill when working on quality-critical tasks that require adherence to specific style guides, compliance standards, or measurable success metrics. The skill produces refined outputs by cycling through generation, evaluation, and optimization phases. It relies on techniques like LLM-as-judge for ranking, rubric-based scoring for weighted dimensions, and structured JSON parsing to ensure reliable feedback loops. Users can implement specific strategies such as the CodeReflector for fixing errors through pytest tests or the EvaluatorOptimizer to maintain a specific score threshold.
What an agent can do with it
- 1Refining complex technical reportsAn agent can use self-critique loops to ensure a generated report meets specific accuracy and clarity criteria.
- 2Automating code error correctionDevelopers can implement a test-driven loop that generates code and automatically fixes errors found during testing.
- 3Standardizing output quality via rubricsYou can score agent responses against weighted dimensions like completeness and accuracy to ensure they meet professional standards.
- 4Comparing multiple AI responsesUse an LLM judge to rank different versions of an output to determine which one best satisfies a set of criteria.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the agentic-eval skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the agentic-eval skill in Claude Code
~/.claude/skills/agentic-eval/SKILL.md
$ npx degit github/awesome-copilot/skills/agentic-eval ~/.claude/skills/agentic-evalInstall the agentic-eval skill in Claude Code (project)
.claude/skills/agentic-eval/SKILL.md
$ npx degit github/awesome-copilot/skills/agentic-eval .claude/skills/agentic-evalInstall the agentic-eval skill in Codex
~/.agents/skills/agentic-eval/SKILL.md
$ npx degit github/awesome-copilot/skills/agentic-eval ~/.agents/skills/agentic-evalInstall the agentic-eval skill in Gemini CLI
~/.gemini/skills/agentic-eval/SKILL.md
$ npx degit github/awesome-copilot/skills/agentic-eval ~/.gemini/skills/agentic-evalInstall the agentic-eval skill in Claude.ai
npx degit github/awesome-copilot/skills/agentic-eval agentic-eval && zip -r agentic-eval.zip agentic-eval # claude.ai → Customize → Skills → + → Create skill → Upload a skill → agentic-eval.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablegithub/awesome-copilot/skills/agentic-eval is public and reachablegithub.com/github/awesome-copilot/tree/HEAD/skills/agentic-e ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-11github.com/github/awesome-copilot/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/github/awesome-copilot/blob/HEAD/skills/agentic-e ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/github/awesome-copilot/blob/HEAD/skills/agentic-e ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 190 linesgithub.com/github/awesome-copilot/blob/HEAD/skills/agentic-e ↗Pass
SKILL.md
View on GitHubAgentic Evaluation Patterns
Patterns for self-improvement through iterative evaluation and refinement.
Overview
Evaluation patterns enable agents to assess and improve their own outputs, moving beyond single-shot generation to iterative refinement loops.
Generate → Evaluate → Critique → Refine → Output
↑ │
└──────────────────────────────┘
When to Use
- Quality-critical generation: Code, reports, analysis requiring high accuracy
- Tasks with clear evaluation criteria: Defined success metrics exist
- Content requiring specific standards: Style guides, compliance, formatting
Pattern 1: Basic Reflection
Agent evaluates and improves its own output through self-critique.
def reflect_and_refine(task: str, criteria: list[str], max_iterations: int = 3) -> str:
"""Generate with reflection loop."""
output = llm(f"Complete this task:\n{task}")
for i in range(max_iterations):
# Self-critique
critique = llm(f"""
Evaluate this output against criteria: {criteria}
Output: {output}
Rate each: PASS/FAIL with feedback as JSON.
""")
critique_data = json.loads(critique)
all_pass = all(c["status"] == "PASS" for c in critique_data.values())
if all_pass:
return output
# Refine based on critique
failed = {k: v["feedback"] for k, v in critique_data.items() if v["status"] == "FAIL"}
output = llm(f"Improve to address: {failed}\nOriginal: {output}")
return output
Key insight: Use structured JSON output for reliable parsing of critique results.
Pattern 2: Evaluator-Optimizer
Separate generation and evaluation into distinct components for clearer responsibilities.
class EvaluatorOptimizer:
def __init__(self, score_threshold: float = 0.8):
self.score_threshold = score_threshold
def generate(self, task: str) -> str:
return llm(f"Complete: {task}")
def evaluate(self, output: str, task: str) -> dict:
return json.loads(llm(f"""
Evaluate output for task: {task}
Output: {output}
Return JSON: {{"overall_score": 0-1, "dimensions": {{"accuracy": ..., "clarity": ...}}}}
"""))
def optimize(self, output: str, feedback: dict) -> str:
return llm(f"Improve based on feedback: {feedback}\nOutput: {output}")
def run(self, task: str, max_iterations: int = 3) -> str:
output = self.generate(task)
for _ in range(max_iterations):
evaluation = self.evaluate(output, task)
if evaluation["overall_score"] >= self.score_threshold:
break
output = self.optimize(output, evaluation)
return output
Pattern 3: Code-Specific Reflection
Test-driven refinement loop for code generation.
class CodeReflector:
def reflect_and_fix(self, spec: str, max_iterations: int = 3) -> str:
code = llm(f"Write Python code for: {spec}")
tests = llm(f"Generate pytest tests for: {spec}\nCode: {code}")
for _ in range(max_iterations):
result = run_tests(code, tests)
if result["success"]:
return code
code = llm(f"Fix error: {result['error']}\nCode: {code}")
return code
Evaluation Strategies
Outcome-Based
Evaluate whether output achieves the expected result.
def evaluate_outcome(task: str, output: str, expected: str) -> str:
return llm(f"Does output achieve expected outcome? Task: {task}, Expected: {expected}, Output: {output}")
LLM-as-Judge
Use LLM to compare and rank outputs.
def llm_judge(output_a: str, output_b: str, criteria: str) -> str:
return llm(f"Compare outputs A and B for {criteria}. Which is better and why?")
Rubric-Based
Score outputs against weighted dimensions.
RUBRIC = {
"accuracy": {"weight": 0.4},
"clarity": {"weight": 0.3},
"completeness": {"weight": 0.3}
}
def evaluate_with_rubric(output: str, rubric: dict) -> float:
scores = json.loads(llm(f"Rate 1-5 for each dimension: {list(rubric.keys())}\nOutput: {output}"))
return sum(scores[d] * rubric[d]["weight"] for d in rubric) / 5
Best Practices
| Practice | Rationale |
|---|---|
| Clear criteria | Define specific, measurable evaluation criteria upfront |
| Iteration limits | Set max iterations (3-5) to prevent infinite loops |
| Convergence check | Stop if output score isn't improving between iterations |
| Log history | Keep full trajectory for debugging and analysis |
| Structured output | Use JSON for reliable parsing of evaluation results |
Quick Start Checklist
## Evaluation Implementation Checklist
### Setup
- [ ] Define evaluation criteria/rubric
- [ ] Set score threshold for "good enough"
- [ ] Configure max iterations (default: 3)
### Implementation
- [ ] Implement generate() function
- [ ] Implement evaluate() function with structured output
- [ ] Implement optimize() function
- [ ] Wire up the refinement loop
### Safety
- [ ] Add convergence detection
- [ ] Log all iterations for debugging
- [ ] Handle evaluation parse failures gracefully
Files in this skill
1agentic-eval skill questions
How do I install the agentic-eval skill in Claude Code?
Run npx degit github/awesome-copilot/skills/agentic-eval ~/.claude/skills/agentic-eval. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the agentic-eval skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.