自己批判、評価者・最適化者(evaluator-optimizer)パイプライン、およびルーブリックに基づくスコアリングを通じて、AIエージェントの出力を評価・改善するための反復パターンを実装します。
- GitHubスター
- 41,038
- ファイル
- 1
- 最終コミット
- 2026年11月11日
- ライセンス
- MIT
- 許可されたツール
- —
agentic-eval skillは何をしますか
agentic-evalはAgent Skillsです。 自己批判、評価者・最適化者(evaluator-optimizer)パイプライン、およびルーブリックに基づくスコアリングを通じて、AIエージェントの出力を評価・改善するための反復パターンを実装します。.
skillのSKILL.mdから生成された要約。
agentic-eval skill について
agentic-evalは、AIが生成したコード、レポート、または分析の精度を向上させるための機能です。開発者はこのSKILLを使用することで、単発の生成にとどまらず、エージェントが自身の成果物を評価して修正を行う反復ループを実装できます。自己批判、評価者・最適化者パイプライン、およびテスト駆動型の改善ワークフローのための構造化されたパターンを提供します。
特定のスタイルガイド、コンプライアンス基準、または測定可能な成功指標への準拠が必要な、品質が重視されるタスクに取り組む際、エージェントはこのSKILLをロードすべきです。このSKILLは、生成、評価、最適化のフェーズを繰り返すことで、洗練された出力を生成します。ランキングのためのLLM-as-judge、重み付けされた次元によるルーブリックベースのスコアリング、および信頼性の高いフィードバックループを確保するための構造化されたJSONパースなどの手法を活用します。ユーザーは、pytestテストを通じてエラーを修正するCodeReflectorや、特定のスコア閾値を維持するためのEvaluatorOptimizerといった具体的な戦略を実装できます。
エージェントができること
- 1複雑な技術レポートの改善エージェントは自己批判ループを使用して、生成されたレポートが特定の正確性と明快さの基準を満たしていることを確認できます。
- 2コードエラー修正の自動化開発者は、コードを生成し、テスト中に発見されたエラーを自動的に修正するテスト駆動型のループを実装できます。
- 3ルーブリックによる出力品質の標準化エージェントの回答を網羅性や正確性などの重み付けされた次元でスコアリングし、プロフェッショナルな基準を満たしていることを確認できます。
- 4複数のAI回答の比較LLM judgeを使用して出力の異なるバージョンをランク付けし、どのバージョンが設定された基準を最もよく満たしているかを判断します。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
agentic-eval skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。Claude Codeにagentic-eval skillをインストールする
~/.claude/skills/agentic-eval/SKILL.md
$ npx degit github/awesome-copilot/skills/agentic-eval ~/.claude/skills/agentic-evalClaude Code (project)にagentic-eval skillをインストールする
.claude/skills/agentic-eval/SKILL.md
$ npx degit github/awesome-copilot/skills/agentic-eval .claude/skills/agentic-evalCodexにagentic-eval skillをインストールする
~/.agents/skills/agentic-eval/SKILL.md
$ npx degit github/awesome-copilot/skills/agentic-eval ~/.agents/skills/agentic-evalGemini CLIにagentic-eval skillをインストールする
~/.gemini/skills/agentic-eval/SKILL.md
$ npx degit github/awesome-copilot/skills/agentic-eval ~/.gemini/skills/agentic-evalClaude.aiにagentic-eval skillをインストールする
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
自動チェック
実行日 2026年11月15日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。エージェントに実行させる前にスクリプトを読んでください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能github/awesome-copilot/skills/agentic-eval is public and reachablegithub.com/github/awesome-copilot/tree/HEAD/skills/agentic-e ↗合格
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit 2026-11-11github.com/github/awesome-copilot/commits ↗合格
- スクリプトにダウンロード実行や認証情報の窃取がないNo scripts in the skill folder合格
- SKILL.md に隠れた指示がないNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/github/awesome-copilot/blob/HEAD/skills/agentic-e ↗合格
- 事前許可ツールが限定されているNo pre-approved tools; the agent asks before using onegithub.com/github/awesome-copilot/blob/HEAD/skills/agentic-e ↗合格
- SKILL.md が Agent Skills の形式に従っているValid name and description; says when to use it; 190 linesgithub.com/github/awesome-copilot/blob/HEAD/skills/agentic-e ↗合格
SKILL.md
GitHubで表示Agentic 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
このスキルのファイル
1agentic-eval skillに関する質問
Claude Codeにagentic-eval skillをインストールするには
npx degit github/awesome-copilot/skills/agentic-eval ~/.claude/skills/agentic-evalを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
agentic-eval skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。