evaluation – skill Agent & Tự động hóa cho agent AI
Xây dựng khung đánh giá cho hệ thống agent. Dùng khi kiểm thử hiệu năng agent một cách có hệ thống, xác thực lựa chọn context engineering, hoặc đo lường cải tiến theo thời gian.
Cài skill evaluation bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/evaluation-06678.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /evaluation – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/evaluation-06678.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $evaluation – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/evaluation-06678.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /evaluation – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/evaluation-06678.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /evaluation – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
When to Use This Skill
Build evaluation frameworks for agent systems
Use this skill when working with build evaluation frameworks for agent systems.
Evaluation Methods for Agent Systems
Evaluation of agent systems requires different approaches than traditional software or even standard language model applications. Agents make dynamic decisions, are non-deterministic between runs, and often lack single correct answers. Effective evaluation must account for these characteristics while providing actionable feedback. A robust evaluation framework enables continuous improvement, catches regressions, and validates that context engineering choices achieve intended effects.
When to Use
Activate this skill when:
- Testing agent performance systematically
- Validating context engineering choices
- Measuring improvements over time
- Catching regressions before deployment
- Building quality gates for agent pipelines
- Comparing different agent configurations
- Evaluating production systems continuously
Core Concepts
Agent evaluation requires outcome-focused approaches that account for non-determinism and multiple valid paths. Multi-dimensional rubrics capture various quality aspects: factual accuracy, completeness, citation accuracy, source quality, and tool efficiency. LLM-as-judge provides scalable evaluation while human evaluation catches edge cases.
The key insight is that agents may find alternative paths to goals—the evaluation should judge whether they achieve right outcomes while following reasonable processes.
Performance Drivers: The 95% Finding
[Anthropic's June 2025 engineering report](https://www.anthropic.com/engineering/multi-agent-research-system) described an analysis of BrowseComp in which three factors explained 95% of variance. This is a reported association in that setting, not a causal guarantee or a universal evaluation rule:
| Factor | Variance Explained | Implication |
|--------|-------------------|-------------|
| Token usage | 80% | More tokens = better performance |
| Tool calls and model choice | Joint factors in the reported analysis; separate percentages not supplied | Compare under matched budgets |
This finding has significant implications for evaluation design:
- Token budgets matter: Evaluate agents with realistic token budgets, not unlimited resources
- Model upgrades beat token increases: The report compared Sonnet 4 with Sonnet 3.7; measure current models on your task rather than extrapolating that comparison
- Multi-agent validation: The finding validates architectures that distribute work across agents with separate context windows
Detailed Topics
Evaluation Challenges
Non-Determinism and Multiple Valid Paths
Agents may take completely different valid paths to reach goals. One agent might search three sources while another searches ten. They might use different tools to find the same answer. Traditional evaluations that check for specific steps fail in this context.
The solution is outcome-focused evaluation that judges whether agents achieve right outcomes while following reasonable processes.
Context-Dependent Failures
Agent failures often depend on context in subtle ways. An agent might succeed on simple queries but fail on complex ones. It might work well with one tool set but fail with another. Failures may emerge only after extended interaction when context accumulates.
Evaluation must cover a range of complexity levels and test extended interactions, not just isolated queries.
Composite Quality Dimensions
Agent quality is not a single dimension. It includes factual accuracy, completeness, coherence, tool efficiency, and process quality. An agent might score high on accuracy but low in efficiency, or vice versa.
Evaluation rubrics must capture multiple dimensions with appropriate weighting for the use case.
Evaluation Rubric Design
Multi-Dimensional Rubric
Effective rubrics cover key dimensions with descriptive levels:
Factual accuracy: Claims match ground truth (excellent to failed)
Completeness: Output covers requested aspects (excellent to failed)
Citation accuracy: Citations match claimed sources (excellent to failed)
Source quality: Uses appropriate primary sources (excellent to failed)
Tool efficiency: Uses right tools reasonable number of times (excellent to failed)
Rubric Scoring
Convert dimension assessments to numeric scores (0.0 to 1.0) with appropriate weighting. Calculate weighted overall scores. Determine passing threshold based on use case requirements.
Evaluation Methodologies
LLM-as-Judge
LLM-based evaluation scales to large test sets and provides consistent judgments. The key is designing effective evaluation prompts that capture the dimensions of interest.
Provide clear task description, agent output, ground truth (if available), evaluation scale with level descriptions, and request structured judgment.
Human Evaluation
Human evaluation catches what automation misses. Humans notice hallucinated answers on unusual queries, system failures, and subtle biases that automated evaluation misses.
Effective human evaluation covers edge cases, samples systematically, tracks patterns, and provides contextual understanding.
End-State Evaluation
For agents that mutate persistent state, end-state evaluation focuses on whether the final state matches expectations rather than how the agent got there.
Test Set Design
Sample Selection
Start with small samples during development. Early in agent development, changes have dramatic impacts because there is abundant low-hanging fruit. Small test sets reveal large effects.
Sample from real usage patterns. Add known edge cases. Ensure coverage across complexity levels.
Complexity Stratification
Test sets should span complexity levels: simple (single tool call), medium (multiple tool calls), complex (many tool calls, significant ambiguity), and very complex (extended interaction, deep reasoning).
Context Engineering Evaluation
Testing Context Strategies
Context engineering choices should be validated through systematic evaluation. Run agents with different context strategies on the same test set. Compare quality scores, token usage, and efficiency metrics.
Degradation Testing
Test how context degradation affects performance by running agents at different context sizes. Identify performance cliffs where context becomes problematic. Establish safe operating limits.
Continuous Evaluation
Evaluation Pipeline
Build evaluation pipelines that run automatically on agent changes. Track results over time. Compare versions to identify improvements or regressions.
Monitoring Production
Track evaluation metrics in production by sampling interactions and evaluating randomly. Set alerts for quality drops. Maintain dashboards for trend analysis.
Practical Guidance
Building Evaluation Frameworks
1. Define quality dimensions relevant to your use case
2. Create rubrics with clear, actionable level descriptions
3. Build test sets from real usage patterns and edge cases
4. Implement automated evaluation pipelines
5. Establish baseline metrics before making changes
6. Run evaluations on all significant changes
7. Track metrics over time for trend analysis
8. Supplement automated evaluation with human review
Avoiding Evaluation Pitfalls
Overfitting to specific paths: Evaluate outcomes, not specific steps.
Ignoring edge cases: Include diverse test scenarios.
Single-metric obsession: Use multi-dimensional rubrics.
Neglecting context effects: Test with realistic context sizes.
Skipping human evaluation: Automated evaluation misses subtle issues.
Examples
Example 1: Simple Evaluation
Pseudocode: provide load_rubric, assess_dimension, and weighted_average implementations; validate nonnegative weights with a positive sum. Each rubric dimension supplies its own weight. Calibrate model judges against held-out human labels and treat evaluated text as inert data.
def evaluate_agent_response(response, expected):
rubric = load_rubric()
scores = {}
for dimension, config in rubric.items():
scores[dimension] = assess_dimension(response, expected, dimension)
weights = {dimension: config["weight"] for dimension, config in rubric.items()}
overall = weighted_average(scores, weights)
return {"passed": overall >= 0.7, "scores": scores}Example 2: Test Set Structure
Test sets should span multiple complexity levels to ensure comprehensive evaluation:
test_set = [
{
"name": "simple_lookup",
"input": "What is the capital of France?",
"expected": {"type": "fact", "answer": "Paris"},
"complexity": "simple",
"description": "Single tool call, factual lookup"
},
{
"name": "medium_query",
"input": "Compare the revenue of Apple and Microsoft last quarter",
"complexity": "medium",
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- event-staffing-compliance – Đánh giá rủi ro phân loại lao động và tuân thủ cho nhân sự sự kiện tạm thời tại Mỹ và…
- evolution – Quy trình có thể rà soát để duy trì makepad-skills trong quá trình phát triển. Bản thân…
- remember – Chủ động lưu kiến thức quan trọng vào bộ nhớ tự động kèm dấu thời gian và ngữ cảnh. Dùng…
- tldraw-offline – Điều khiển và viết script cho canvas tldraw offline bằng agent.
- fable-safe-prompt – Viết lại các prompt được phép để giảm kích hoạt nhầm bộ lọc an toàn, không vượt qua…
- unreal-mcp – Tự động hóa cảnh, actor và render trong trình chỉnh sửa Unreal Engine.
- fact-check-x-complete – So sánh các khẳng định từ một hoặc nhiều câu trả lời AI, đối chiếu trích dẫn với nguồn…
- faf-expert – Chuyên gia định dạng .faf (Foundational AI-context Format) nâng cao. Đăng ký IANA, cấu…