跳转到主要内容

运行卡规范

执行摘要。 运行卡是基准测试的原子单位——一份 JSON 文档,记录一次评估运行的完整配置、逐条结果和聚合分数。本页面文档化了模式、字段、指纹机制和分数结构。有关规范定义,请参阅基准规范

运行卡是单次评估运行的完整记录。它包含理解、复现和验证实验所需的一切:配置、分数、单条结果、令牌使用情况和环境元数据。

模式版本: 2.0

:::info 权威模式 基准规范是运行卡模式的唯一真实来源。有关指标定义、复合权重和质量等级,请参阅评分规范。本页面文档化了当前实现。 :::


顶级字段

字段类型描述
run_idstring在运行开始时生成的 UUID v4
harness_versionstring生成此卡的工具的语义版本(例如 2.0
model_slugstring用于运行的模型 slug(例如 google/gemini-3.1-pro
model_idstringAPI 返回的已解析模型标识符(例如 gemini-3.1-pro-001
conditionstring实验标签(例如 baselinecoached-v3few-shot
timestampstring运行开始时的 ISO 8601 UTC 时间戳
elapsed_secondsnumber整个运行的挂钟时长
{
"run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"harness_version": "2.0",
"model_slug": "google/gemini-3.1-pro",
"model_id": "gemini-3.1-pro-001",
"condition": "baseline",
"timestamp": "2026-06-01T03:22:41Z",
"elapsed_seconds": 142.7
}

dataset

标识评估数据集并通过 SHA-256 将其固定到特定内容版本。

字段类型描述
idstring数据集标识符(例如 edtekla-dev-v1
versionstring数据集版本字符串
language_pairstring显示标签(例如 EN→CRK
sha256string数据集文件内容的 SHA-256 哈希。保证使用的确切数据
entry_countnumber数据集中的条目数
// Example using master_corpus.json (62 gold + 342 textbook = 404)
{
"dataset": {
"id": "edtekla-dev-v1",
"version": "1.0",
"language_pair": "EN→CRK",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"entry_count": 404
}
}

config

用于此运行的 API 和批处理配置。

字段类型描述
api_providerstringAPI 提供商名称(例如 openrouter
temperaturenumber采样温度
max_tokensnumber每次完成的最大令牌数
batch_sizenumber每个并发批次的条目数
concurrencynumber最大并行 API 请求数
coaching_filestring指导提示文件的路径(如果使用)
method_pathstring方法插件目录的路径(如果使用)
fst_retriesnumberFST 重试尝试次数
{
"config": {
"api_provider": "openrouter",
"temperature": 0.0,
"max_tokens": 32768,
"batch_size": 25,
"concurrency": 8
}
}

:::info 已发布的运行卡包括 method_config 当运行卡通过 mt-eval publish 发布时,publish.py 会注入一个 method_config 块,其中包含规范的 8 字段 MethodConfig。这使得零摩擦的排行榜安装成为可能——任何人都可以直接从已发布的卡复现该方法。

{
"method_config": {
"model": "gemini-pro",
"temperature": 0.0,
"batchSize": 25,
"register": "Formal Plains Cree. Use SRO orthography.",
"coachingFile": "prompts/crk-coaching-v8.txt",
"coachingPrompt": null,
"promptContext": "champollion",
"qualityTier": "verified"
}
}

所有字段使用 camelCase 并遵循规范的 MethodConfig 模式(参见构建方法)。 :::


system_prompt_sha256 / system_prompt_used

字段类型描述
system_prompt_sha256string系统提示的 SHA-256 哈希。包含在指纹中
system_prompt_usedstring发送给模型的完整系统提示文本

提示哈希是指纹的一部分——两个具有不同提示的运行将具有不同的指纹,即使所有其他设置相同。


fingerprint

可复现性标识符。两个具有相同指纹的运行使用了相同的实验设置。

字段类型描述
hashstring排序组件的 SHA-256 哈希
componentsobject被哈希的输入值

指纹组件

组件描述
dataset_sha256数据集文件的哈希
model_slug使用的模型
condition实验条件标签
system_prompt_sha256系统提示的哈希
temperature采样温度
harness_version工具版本
{
"fingerprint": {
"hash": "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069",
"components": {
"dataset_sha256": "e3b0c44298fc1c14...",
"model_slug": "google/gemini-3.1-pro",
"condition": "baseline",
"system_prompt_sha256": "abc123...",
"temperature": 0.0,
"harness_version": "2.0"
}
}
}

:::info 指纹 ≠ 运行卡哈希 指纹标识实验配置run_card_hash 验证结果文件完整性。详见指纹与运行卡哈希。 :::


scores

整个运行的聚合指标。

顶级分数

字段类型描述
totalnumber评估的总条目数
exact_matchesnumber输出与金标准完全匹配的条目
exact_match_ratenumberexact_matches / total(0.0–1.0)
fst_acceptednumberFST 分析器接受的条目
fst_acceptance_ratenumberfst_accepted / total(0.0–1.0)。如果未使用 FST 分析器,则为 null
chrf_plus_plusnumber语料库级 chrF++ 分数(0–100)
errorsnumber失败的条目(API 错误、超时等)
avg_latency_secondsnumber所有条目的平均响应时间
median_latency_secondsnumber中位数响应时间
p95_latency_secondsnumber第 95 百分位数响应时间

by_difficulty

按难度等级分解的分数。每个键(整数 1–5)包含与顶级分数相同的指标字段。

{
"by_difficulty": {
"1": {
"total": 20,
"exact_matches": 8,
"exact_match_rate": 0.40,
"chrf_plus_plus": 68.2,
"fst_accepted": 18,
"fst_acceptance_rate": 0.90
},
"2": { ... },
"3": { ... },
"4": { ... },
"5": { ... }
}
}

by_provenance

按条目来源分解的分数。每个键(例如 gold_standardtextbook)包含相同的指标字段。

{
"by_provenance": {
"gold_standard": {
"total": 80,
"exact_matches": 10,
"exact_match_rate": 0.125,
"chrf_plus_plus": 44.8
},
"textbook": { ... }
}
}

totals

整个运行的令牌使用情况和成本跟踪。

字段类型描述
prompt_tokensnumber所有 API 调用中的总输入令牌数
completion_tokensnumber总输出令牌数
reasoning_tokensnumber用于链式思维推理的令牌(取决于模型,大多数模型为 0)
cached_tokensnumber从提供商的提示缓存提供的令牌
total_cost_usdnumber总成本(美元)(由 API 报告)
cost_per_entry_usdnumbertotal_cost_usd / entry_count
reasoning_rationumberreasoning_tokens / completion_tokens(0.0–1.0)
{
"totals": {
"prompt_tokens": 48200,
"completion_tokens": 3100,
"reasoning_tokens": 0,
"cached_tokens": 12000,
"total_cost_usd": 0.42,
"cost_per_entry_usd": 0.0034,
"reasoning_ratio": 0.0
}
}

environment

用于可复现性的运行时环境元数据。

字段类型描述
harness_versionstring工具版本(镜像顶级 harness_version
harness_git_commitstring运行时工具的 Git 提交 SHA
python_versionstringPython 解释器版本
sacrebleu_versionstringsacrebleu 库版本(用于 chrF++ 评分)
osstring操作系统标识符
{
"environment": {
"harness_version": "2.0",
"harness_git_commit": "a1b2c3d",
"python_version": "3.11.9",
"sacrebleu_version": "2.4.0",
"os": "macOS-14.5-arm64"
}
}

results[]

逐条结果数组。每个数据集条目一个对象,按索引顺序排列。

字段类型描述
entry_idinteger此条目在语料库中的 ID(匹配 entries[].id
sourcestring被翻译的源文本
referencestring语料库中的金标准参考
predictedstring方法的实际输出
exact_matchboolean规范化后 predicted 是否完全匹配 reference
entry_chrfnumber此条目的句子级 chrF++ 分数(0–100)
fst_acceptedboolean | nullFST 分析器是否接受输出。如果未配置分析器,则为 null
fst_analysisstring[]输出的 FST 分析字符串(如果未分析或被拒绝,则为空数组)
difficultyinteger语料库中的难度等级(1–5)
provenancestring语料库中的来源标签
latency_secondsnumber此单条条目的响应时间
usageobject逐条令牌使用情况:{ prompt_tokens, completion_tokens, reasoning_tokens }
errorstring | null如果此条目失败,则为错误消息。成功时为 null
{
"results": [
{
"entry_id": 1,
"source": "Hello",
"reference": "tânisi",
"predicted": "tânisi",
"exact_match": true,
"entry_chrf": 100.0,
"fst_accepted": true,
"fst_analysis": ["tânisi+V+AI+Ind+2Sg"],
"difficulty": 1,
"provenance": "gold_standard",
"latency_seconds": 0.82,
"usage": {
"prompt_tokens": 385,
"completion_tokens": 12,
"reasoning_tokens": 0
},
"error": null
}
]
}

run_card_hash

字段类型描述
run_card_hashstring整个运行卡 JSON 的 SHA-256 哈希,在哈希期间将 run_card_hash 字段本身设置为 ""

这是防篡改封条。排行榜在提交时重新计算此哈希,并拒绝不匹配的卡。

计算哈希:

  1. 将运行卡序列化为 JSON,run_card_hash 设置为 ""
  2. 计算序列化字符串的 SHA-256
  3. run_card_hash 设置为生成的十六进制摘要
import hashlib, json

card["run_card_hash"] = ""
card_json = json.dumps(card, sort_keys=True, ensure_ascii=False)
card["run_card_hash"] = hashlib.sha256(card_json.encode()).hexdigest()

:::info 逐条钻取 已发布的运行卡还会填充 run_card_entries Supabase 表,该表存储逐条结果以供排行榜上的钻取分析。此表在 mt-eval publish 期间自动填充。 :::


另见