creating-online-evaluations
它能做什么
本技能创建持续运行的评估,自动为新的 AI 回复或整段对话评分。适合希望在不逐条阅读回复的情况下,捕捉 AI 功能中特定问题的团队。
适用场景
- ✓当你希望设置一项自动检查,捕捉你在生产环境中已经见过的问题时。
- ✓当你希望长期持续检查 AI 回复是否符合某项规则的时候。
- ✓当你有一组失败模式,并希望把每一种都转化为受监控的检查时。
技能链接
https://github.com/PostHog/posthog/blob/master/products/ai_observability/skills/creating-online-evaluations/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请设置一项自动检查,标记那些没有回应用户问题的 AI 回复。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会先根据你数据中的真实失败案例,提出一份简短的检查清单,并等待你选择。然后,它会创建你选定的每项评估,并限定在相应的回复范围内,因此在关闭之前,新的回复会持续获得评分。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Creating online evaluations
An online evaluation automatically scores either each matching $ai_generation or the whole trace
containing it, until disabled. A good eval comes from a real failure mode you've found in production traffic,
not from a guess or a generic metric like "hallucination" or "helpfulness". This skill starts once those
failure modes are identified and turns them into scoped, continuously-running evals.
One eval per failure mode, and as many evals as the data justifies. How many to create is a judgment call you make from what the traces actually showed — sometimes one, often three or four. Never assume the answer is one, and never bundle unrelated modes into one evaluator. The exception is a set of modes that are outcomes of the same check, such as the reasons a reply missed the user's request: one categorical eval with a category per mode fits that (2.1).
Propose before you create. Bring the user a short list of candidate evals and let them pick which ones they want (Phase 1.1). Creating evals they didn't ask for costs them money and noise.
First, know what you're evaluating. Finding and ranking the failure modes worth catching is a
separate job. If the user doesn't specify what they want to evaluate, ask them. If they are still vague
about it and don't refer to a specific failure mode, run exploring-ai-failures to scope a use case,
find failing traces, and produce a ranked list of failure modes.
For the mechanics of writing and iterating an evaluator (Hog source vs LLM-judge prompt, dry-running,
debugging a live eval), defer to exploring-llm-evaluations.
Tools
| Tool | Purpose |
|---|---|
posthog:llma-evaluation-config-get |
Check the active provider key used by unpinned judges |
posthog:llma-provider-key-list |
Find a usable (ok state) provider key to pin |
posthog:llma-evaluation-judge-models |
List valid provider+model combos |
posthog:llma-evaluation-directory-list |
List directories available for organizing the evaluation |
posthog:llma-evaluation-directory-create |
Create a directory when the user asks for a new one |
posthog:llma-evaluation-test-hog |
Dry-run Hog source against recent generations before creating |
posthog:llma-evaluation-create |
Create the evaluation (always enabled: false first) |
posthog:llma-evaluation-run |
Spot-run a draft eval against one generation |
posthog:llma-evaluation-update |
Iterate config, then flip enabled: true |
posthog:llma-evaluation-backfill-estimate |
Count what a backfill over past data would evaluate |
posthog:llma-evaluation-backfill-create |
Evaluate past data, only after the user confirms the estimate |
posthog:llma-evaluation-backfill-get |
Track a backfill's progress and coverage |
posthog:llma-evaluation-backfill-list |
Find an evaluation's backfills, including one already running |
posthog:llma-evaluation-backfill-cancel |
Stop a running backfill when the user asks |
posthog:execute-sql |
Verify a condition matches the events and volume you expect |
posthog:generate-app-url |
Build a region- and project-qualified deep link to the eval |
The full create payload (every field, the config schemas, the exact conditions shape) is in
references/evaluation-payload.md.
Phase 1 — Decide what to propose, then let the user choose
Start from real, observed failures, not metrics you picked in advance. If you don't already have them,
run exploring-ai-failures to scope a use case, find failing traces, and produce a ranked list of failure
modes — then come back.
1.1 — Turn the failure modes into a candidate set
Let the data decide how many. One failure mode is one eval, so a ranked list of four distinct modes is a candidate set of four evals. Don't collapse them into one evaluator that tries to catch everything, and don't stop at the top mode when the traces clearly showed more worth watching. Keep a candidate when:
- **It
常见问题
它会创建我没有要求的检查吗?
不会。它会先提出一份简短清单,只创建你挑选的检查。
为什么不使用“幻觉”之类的通用检查?
本技能更倾向于基于你自身流量中发现的失败案例的检查,因为通用指标可能与你的产品不符。
这些检查运行需要花钱吗?
使用 AI 评审员的检查,每次运行都会进行一次模型调用。基于代码的检查则不会。
详情
作者的原始描述
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants evaluations that automatically score new generations or whole traces going forward — "create an eval to catch X", "continuously check that responses do Y", "turn these failures into evals". Covers letting the explored data decide how many evals to create, proposing that set for the user to pick, choosing the target and eval type (hog / llm_judge / sentiment), configuring a provider and model for an llm_judge eval (a provider key gates enabling, n
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6828
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。