writing-evals
できること
このスキルは、回答が毎回変わるAI機能のテストを開発者が作れるよう支援します。変更のたびに、AI機能がまだ正しく動くかを確かめたいチーム向けです。
使う場面
- ✓AI機能を作っていて、その回答を確かめるテストが欲しいとき。
- ✓同じ採点方法を使って、異なるAIモデルや設定を比べたいとき。
- ✓AIプロジェクト用にAxiomの評価ファイルを設定したいとき。
スキルのリンク
https://github.com/openclaw/clawhub/blob/main/.agents/skills/writing-evals/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“AIの要約機能が、回答を正確で短く保つことを確かめる評価テストを書いてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、テストケースを含む評価ファイルを作ります。採点チェックは、出力の一つの性質ごとに確認するように分けます。また、異なる選択肢を試せる設定も用意します。コードがお使いのバージョンに合うよう、最初にインストール済みのSDKのドキュメントを確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Writing Evals
You write evaluations that prove AI capabilities work. Evals are the test suite for non-deterministic systems: they measure whether a capability still behaves correctly after every change.
Prerequisites
- Complete the Axiom AI SDK Quickstart (instrumentation + authentication)
Verify the SDK is installed:
ls node_modules/axiom/dist/
If not installed, install it using the project's package manager (e.g., pnpm add axiom).
Always check node_modules/axiom/dist/docs/ first for the correct API signatures, import paths, and patterns for the installed SDK version. The bundled docs are the source of truth — do not rely on the examples in this skill if they conflict.
Philosophy
- Evals are tests for AI. Every eval answers: "does this capability still work?"
- Scorers are assertions. Each scorer checks one property of the output.
- Flags are variables. Flag schemas let you sweep models, temperatures, strategies without code changes.
- Data drives coverage. Happy path, adversarial, boundary, and negative cases.
- Validate before running. Never guess import paths or types—use reference docs.
Axiom Terminology
| Term | Definition |
|---|---|
| Capability | A generative AI system that uses LLMs to perform a specific task. Ranges from single-turn model interactions → workflows → single-agent → multi-agent systems. |
| Collection | A curated set of reference records used for testing and evaluation of a capability. The data array in an eval file is a collection. |
| Collection Record | An individual input-output pair within a collection: { input, expected, metadata? }. |
| Ground Truth | The validated, expert-approved correct output for a given input. The expected field in a collection record. |
| Scorer | A function that evaluates a capability's output, returning a score. Two types: reference-based (compares output to expected ground truth) and reference-free (evaluates quality without expected values, e.g., toxicity, coherence). |
| Eval | The process of testing a capability against a collection using scorers. Three modes: offline (against curated test cases), online (against live production traffic), backtesting (against historical production traces). |
| Flag | A configuration parameter (model, temperature, strategy) that controls capability behavior without code changes. |
| Experiment | An evaluation run with a specific set of flag values. Compare experiments to find optimal configurations. |
How to Start
When the user asks you to write evals for an AI feature, read the code first. Do not ask questions — inspect the codebase and infer everything you can.
Step 1: Understand the feature
- Find the AI function — search for the function the user mentioned. Read it fully.
- Trace the inputs — what data goes in? A string prompt, structured object, conversation history?
- Trace the outputs — what comes back? A string, category label, structured object, agent result with tool calls?
- Identify the model call — which LLM/model is used? What parameters (temperature, maxTokens)?
- Check for existing evals — search for
*.eval.tsfiles. Don't duplicate what exists. - Check for app-scope — look for
createAppScope,flagSchema,axiom.config.ts.
Step 2: Determine eval type
Based on what you found:
| Output type | Eval type | Scorer pattern |
|---|---|---|
| String category/label | Classification | Exact match |
| Free-form text | Text quality | Contains keywords or LLM-as-judge |
| Array of items | Retrieval | Set match |
| Structured object | Structured output | Field-by-field match |
| Agent result with tool calls | Tool use | Tool name presence |
| Streaming text | Streaming | Exact match or contains (auto-concatenated) |
Step 3: Choose scorers
Every eval needs at least 2 scorers. Use this layering:
- Correctness scorer (required) — Does the output match expected? Pick from the eval type table above (exact match, set match, field match, etc.).
- Quality scorer (recommended) — Is the output well-formed? Check confidence thresholds, output length, format validity, or field completeness.
- Reference-free scorer (add for user-facing text) — Is the output coherent, relevant, non-toxic? Use LLM-as-judge or autoevals.
| Output
よくある質問
AIの評価テストとは何ですか?
決まったケースでAI機能を動かして回答を採点する仕組みです。機能が引き続き適切に動くかどうかを確認できます。
Axiom SDKが必要ですか?
はい。このスキルはAxiom AI SDK向けに書かれているため、クイックスタートの設定とあわせて、SDKをインストールしておく必要があります。
どのようなケースが含まれますか?
正常系、難しいケース、境界値、否定的なケースを含みます。
詳細
作者による元の説明
Scaffolds evaluation suites for the Axiom AI SDK. Generates eval files, scorers, flag schemas, and config from natural-language descriptions. Use when creating evals, writing scorers, setting up flag schemas, or configuring axiom.config.ts.
repo: openclaw/clawhub
人気
- GitHubのスター
- 9.5k
- ランキング
- #12267
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
axiom-alerting
9.5kエージェントが、Axiom APIを通じてAxiomのモニターと通知のルートを作って管理し、アラートが期待どおり動くかを確認できるよう支援します。
axiom-sre
9.5kエージェントが、本番のインシデントやバグを段階的に調べ、各推測をAxiomのログに照らして検証してから結論を出せるよう支援します。
building-dashboards
9.5kエージェントが、何の判断を支えるべきかという点から始めて、適切なグラフ、クエリ、フィルターを使ったAxiomのダッシュボードを設計できるよう支援します。
controlling-costs
9.5kエージェントが、Axiomで誰も使っていないデータを見つけ、ログのコストを追跡して抑えるダッシュボードとモニターを作れるよう支援します。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。