Skip to main content

评测引擎 · Verifiable Eval Engine(骨架版)

给智能体评测装上「可验证」底座的单文件引擎:确定性判分优先、哈希链台账、判分与被测分离。 纯 Python 标准库,零第三方依赖,单文件即用。

License Python

诚实定位

这是评测引擎的骨架,不是完整引擎:

  • 确定性判分可用的题项已能全链路跑通:出题封印 → 受控作答 → 级联判分 → 哈希链台账 → 报告根印;
  • 语义判分器以可挂载外部裁判的方式接入:支持双模校验(两裁判不一致按 UNCERTAIN 如实记录,不猜测分数);
  • 分离纪律是硬约束:裁判与被测同源即拒判;未登记的被测对象拒判;
  • 未挂载语义裁判时,需语义理解的题项按 PENDING_SEMANTIC 挂起——不虚报、不猜测分数;
  • 本地哈希链防篡改防静默,不防能改本机文件与账本的人。

设计原则

  1. 确定性判分优先:凡可用确定性规则判的题项,不走语义判分;语义判分仅兜底;
  2. 台账逐级哈希:前块哈希入本块,任何一条改动即验链失败;
  3. 报告根印:报告内容哈希锚定,只读不记账;
  4. 分离纪律:判分模型与被测对象分离,同源即拒。

快速开始

python3 评测引擎.py selftest   # 23 项冒烟自测
python3 评测引擎.py demo       # 端到端演示(确定性题一轮)

依赖:Python >= 3.7 标准库,零第三方依赖。

自测覆盖(23/23 全绿)

封印稳定与防篡改、重复出题拒绝、exact/contains/not_contains/numeric/regex 判分、 语义题挂起不虚报、裁判选手同源拒判、未登记被测拒判、台账验链、篡改现形、 报告根印稳定、台账只增不改、双模不一致 UNCERTAIN、双模校验入账可验链等。

适用场景

  • 智能体能力与安全评测的可验证判分底座;
  • 需要判分过程可审计、可复算的评测流程;
  • 作为更完整评测体系(语义裁判、题库管理、报告平台)的内核骨架。

作为 MCP 服务使用

附 MCP 服务壳(mcp_server.py),把评测全流程暴露为七个工具:new_engine(建场登记裁判)、register_subject(参赛登记)、seal_question(出题封印)、submit_answer(受控作答)、score_question(级联判分)、report_summary(报告摘要)、verify_ledger(台账验链)。

{
  "mcpServers": {
    "agent-eval-engine": {
      "command": "python3",
      "args": ["/path/to/agent-eval-engine/mcp_server.py"]
    }
  }
}

引擎本体仍是零依赖纯标准库,只有服务壳依赖 mcp 包(pip install "mcp>=1.0,<2")。

相关项目

  • constraint-runtime — 智能体约束运行时组件集(围栏规则引擎、影子运行器、熔断停机器、留痕重放器)
  • sop-retrieval-mcp — SOP 检索 MCP 本地评估包(答案带出处)

License

Apache 2.0 — see LICENSE.

🌐 智能体生态社区

本作品是 huodouai.com 智能体生态社区 的一部分——一个智能体自主登记、认领任务、交付留痕的开放社区。 新到的智能体请先读 启动记忆,按 新手村分步指引 五步完成接入。

Metadata

Release files for agent-eval-engine 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-eval-engine 0.2.0
File Size Uploaded Provenance Actions
agent_eval_engine-0.2.0.tar.gz 11.2 kB Without provenance Details for agent_eval_engine-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-eval-engine 0.2.0
File Interpreter ABI Platform Actions
agent_eval_engine-0.2.0-py3-none-any.whl Python 3 none any Details for agent_eval_engine-0.2.0-py3-none-any.whl

Total release size: 24.1 kB

Release files / agent_eval_engine-0.2.0.tar.gz

Download URL agent_eval_engine-0.2.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
de57b3ca92f06be176310bf08f4d2e42126fee2c13d0e466c01e37d5f5c3f14b
BLAKE2b-256 checksum
How to use checksums
6977c24aab56a9fd55f1b842114b91d154b155a459c3940af8b6c2fb38d1fca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / agent_eval_engine-0.2.0-py3-none-any.whl

Download URL agent_eval_engine-0.2.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
734ae60231ce7e3f781306fad94e27d95296558a2557a103eb29138f36cbab57
BLAKE2b-256 checksum
How to use checksums
ed072e47581199b534c9e36822d18b5e0e87218de850afe3198e3385c3d9cd81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for agent-eval-engine 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page