跳到正文
Skillpedia
智能体40k · #7191

eval-driven-dev

它能做什么

这个工具可以帮助测试和改进 AI 应用。它会模拟真实用户使用应用的方式,检查回答是否正确,并给出改进建议。

适用场景

  • ✓希望确保 AI 应用运行正常时。
  • ✓需要发现并修复 AI 应用中的错误时。
  • ✓想提升 AI 应用的质量和性能时。

技能链接

https://github.com/github/awesome-copilot/blob/main/skills/eval-driven-dev/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/eval-driven-dev/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我为我的 AI 应用设置测试。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会用测试数据运行应用,使用评估器将结果与预期进行比较,并告诉你测试是通过还是失败。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Eval-Driven Development for Python LLM Applications

You're building an automated evaluation pipeline that tests a Python-based AI application end-to-end — running it the same way a real user would, with real inputs — then scoring the outputs using evaluators and producing pass/fail results via pixie test.

What you're testing is the app itself — its request handling, context assembly (how it gathers data, builds prompts, manages conversation state), routing, and response formatting. The app uses an LLM, which makes outputs non-deterministic — that's why you use evaluators (LLM-as-judge, similarity scores) instead of assertEqual — but the thing under test is the app's code, not the LLM.

During evaluation, the app's own code runs for real — routing, prompt assembly, LLM calls, response formatting — nothing is mocked or stubbed. But the data the app reads from external sources (databases, caches, third-party APIs, voice streams) is replaced with test-specified values via instrumentations. This means each test case controls exactly what data the app sees, while still exercising the full application code path.

Rule: The app's LLM calls must go to a real LLM. Do not replace, mock, stub, or intercept the LLM with a fake implementation. The LLM is the core value-generating component — replacing it makes the eval tautological (you control both inputs and outputs, so scores are meaningless). If the project's test suite contains LLM mocking patterns, those are for the project's own unit tests — do NOT adopt them for the eval Runnable.

The deliverable is a working pixie test run with real scores — not a plan, not just instrumentation, not just a dataset.

This skill is about doing the work, not describing it. Read code, edit files, run commands, produce a working pipeline.


Before you start

First, activate the virtual environment. Identify the correct virtual environment for the project and activate it. After the virtual environment is active, run the setup.sh included in the skill's resources. The script updates the eval-driven-dev skill and pixie-qa python package to latest version, initialize the pixie working directory if it's not already initialized, and start a web server in the background to show user updates.

Setup error handling — what you can skip vs. what must succeed:

  • Skill update fails → OK to continue. The existing skill version is sufficient.
  • pixie-qa upgrade fails but was already installed → OK to continue with the existing version.
  • pixie-qa is NOT installed and installation fails → STOP. Ask the user for help. The workflow cannot proceed without the pixie package.
  • pixie init fails → STOP. Ask the user for help.
  • pixie start (web server) fails → STOP. Ask the user for help. Check server.log in the pixie root directory for diagnostics. Common causes: port conflict, missing dependency, slow environment. Do NOT proceed without the web server — the user needs it to see eval results.

The workflow

Follow Steps 1–6 straight through without stopping. Do not ask the user for confirmation at intermediate steps — verify each step yourself and continue.

How to work — read this before doing anything else:

  • One step at a time. Read only the current step's instructions. Do NOT read Steps 2–6 while working on Step 1.
  • Read references only when a step tells you to. Each step names a specific reference file. Read it when you reach that step — not before.
  • Create artifacts immediately. After reading code for a sub-step, write the output file for that sub-step before moving on. Don't accumulate understanding across multiple sub-steps before writing anything.
  • Verify, then move on. Each step has a checkpoint. Verify it, then proceed to the next step. Don't plan future steps while verifying the current one.

When to stop and ask for help:

Some blockers cannot and should not be worked around. When you encounter any of the following, stop immediately and ask the user for help — do not attempt workarounds:

  • Application won't run due to missing environment variables or configuration: The app requires environment variables or configuration that are not set and cannot be inferred. Do NOT work around this by mocking, faking, or replacing application components — the eval must exercise real production code. Ask the user to fix the environment setup.

…

常见问题

什么是“评估器”?

评估器是用来判断 AI 回答质量的工具,比如检查回答是否切题,或者格式是否正确。

为什么不能用假的测试替代 AI?

因为测试的目标是检验整个应用,包括真正的 AI。如果替换掉它,你就同时控制了输入和输出,测试就失去意义了。

什么是 pixie test?

它是负责运行测试、收集结果,并生成最终通过或失败报告的工具。

详情

作者的原始描述

Improve AI application with evaluation-driven development. Define eval criteria, instrument the application, build golden datasets, observe and evaluate application runs, analyze results, and produce a concrete action plan for improvements. ALWAYS USE THIS SKILL when the user asks to set up QA, add tests, add evals, evaluate, benchmark, fix wrong behaviors, improve quality, or do quality assurance

repo: github/awesome-copilot

热度

GitHub 星标
40k
排名
#7191
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能