Chuyển đến nội dung
Skillpedia
Kiểm thử9.5k · #12267

writing-evals

Skill này làm gì

Skill này giúp lập trình viên kiểm tra các tính năng AI cho ra câu trả lời khác nhau mỗi lần. Nó dành cho các nhóm muốn biết liệu một tính năng AI còn hoạt động đúng sau mỗi thay đổi hay không.

Khi nào nên dùng

  • ✓Khi bạn đang xây một tính năng AI và muốn có bài kiểm tra kiểm tra câu trả lời của nó.
  • ✓Khi bạn cần so sánh các model hoặc cài đặt AI khác nhau bằng cùng một bộ kiểm tra.
  • ✓Khi bạn muốn thiết lập file đánh giá Axiom cho một dự án AI.

Liên kết skill

https://github.com/openclaw/clawhub/blob/main/.agents/skills/writing-evals/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/openclaw/clawhub/blob/main/.agents/skills/writing-evals/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Viết bài kiểm tra đánh giá cho tính năng tóm tắt AI của tôi, kiểm tra xem câu trả lời có luôn chính xác và ngắn gọn không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tạo các file đánh giá với các trường hợp kiểm thử, các kiểm tra chấm điểm để mỗi kiểm tra chỉ kiểm chứng một thuộc tính của đầu ra, và các cài đặt cho phép bạn thử các tùy chọn khác nhau. Trước đó nó kiểm tra tài liệu SDK đã cài để code khớp với phiên bản của bạn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

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

  1. Evals are tests for AI. Every eval answers: "does this capability still work?"
  2. Scorers are assertions. Each scorer checks one property of the output.
  3. Flags are variables. Flag schemas let you sweep models, temperatures, strategies without code changes.
  4. Data drives coverage. Happy path, adversarial, boundary, and negative cases.
  5. 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

  1. Find the AI function — search for the function the user mentioned. Read it fully.
  2. Trace the inputs — what data goes in? A string prompt, structured object, conversation history?
  3. Trace the outputs — what comes back? A string, category label, structured object, agent result with tool calls?
  4. Identify the model call — which LLM/model is used? What parameters (temperature, maxTokens)?
  5. Check for existing evals — search for *.eval.ts files. Don't duplicate what exists.
  6. 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:

  1. Correctness scorer (required) — Does the output match expected? Pick from the eval type table above (exact match, set match, field match, etc.).
  2. Quality scorer (recommended) — Is the output well-formed? Check confidence thresholds, output length, format validity, or field completeness.
  3. Reference-free scorer (add for user-facing text) — Is the output coherent, relevant, non-toxic? Use LLM-as-judge or autoevals.

| Output

Câu hỏi thường gặp

Đánh giá AI là gì?

Nó chạy một tính năng AI trên các trường hợp đã định sẵn và chấm điểm câu trả lời, để bạn biết tính năng có còn hoạt động tốt không.

Có cần Axiom SDK không?

Có. Skill được viết cho Axiom AI SDK và cần SDK được cài đặt, cùng với thiết lập quickstart.

Skill bao gồm những trường hợp nào?

Skill bao gồm trường hợp đường đi thuận lợi, trường hợp khó, trường hợp biên và trường hợp phủ định.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
9.5k
Vị trí xếp hạng
#12267
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự