OpenRouter 如何对 LLM 做基准测试:用代码判分与成本核算选模型
How to Benchmark LLMs
OpenRouter 发布 LLM 基准测试方法指南,主张用应用自身输入与输出格式构造任务,在 OpenRouter 上跑相同任务并比较判分准确率、计费成本与请求耗时。在其 60 个合成任务上,GPT-6.1 Sol 在三次重复中通过 180/180 次试验,DeepSeek 响应成本最低、通过 157/180;该结果与公开排名的 Spearman 相关性仅 0.109。
根据应用程序的输入和输出格式中的证据来选择模型。将相同的任务通过 OpenRouter 运行,并比较评分准确率、计费成本和请求时间。在我们的 60 个合成任务上,GPT-6.1 Sol 在测试的契约和设置下,三次重复共通过 180/180 次试验。
TL;DR
-
代码检查衡量正确性和输出合规性。
-
Sol 在我们的合成集上通过了 180/180 次试验;DeepSeek 的响应成本最低,通过 157/180 次。
-
与公开排名的一致性较弱,Spearman 相关系数为 0.109。
-
在你信任某个分数之前,请检查每个任务运行了多少次、返回了多少个答案,以及每笔账单是否经过验证。
先定义行为,再定义其检查。
步骤 1. 编写答案可由脚本检查的任务
一个任务需要输入、预期答案和输出契约。对于发票,需指定包含的行、舍入方式和可接受的货币后缀。
我们在最终运行之前编写了全部 40 个基线任务和 20 个困难任务。
| 类别 | 示例 | 检查 |
|---|---|---|
| 发票算术 | 折扣后的未付行总额 | 小数总额和舍入 |
| 日期和日程 | 转换时间戳或列出匹配的日期 | 精确时刻或日期列表 |
| 电子邮件提取 | 将字段提取为 JSON | 键、类型和值 |
| Python 函数 | 针对隐藏输入实现一个函数 | 在隔离运行时中的结果 |
| 输出约束 | 在指定限制内生成文本 | 长度、词汇和格式 |
| 退款决策 | 在其边界处应用书面政策 | 每个订单的决策 |
独立计算参考值。将提示调优用例与最终评估分开。退款用例测试书面决策,不执行交易。
步骤 2. 用代码评分,并检查评分器
对 APPROVE 使用精确匹配,对 JSON 使用模式/值检查。仅规范化允许的差异。当你的消费者只要求一个数字时,接受数字周围的散文会掩盖失败。
测试已知正确、错误和格式错误的响应。对于退款阈值,包含恰好 $200 和 30 天,然后包含略高于每个边界的值。
我们的开发检查器拒绝了有效的 Python,因为它遗漏了 ord 和 type。我们在最终研究之前纠正了它,指定 CPython 3.12.10/WASI 并设置资源限制。否则,检查器失败会被计入模型。
完整研究运行器隔离生成的代码,并在缺少沙箱设置时停止。教学示例不执行任何生成的代码。
步骤 3. 运行三任务 Python 示例
下载配套 ZIP。在解压之前,将其 SHA-256 校验和与以下内容进行比较:
a38ee17a2eb7090f9f4849a605cc8214691c889ca0ae40c121259603592178e8PowerShell:
Get-FileHash .\benchmark-reader-companion.zip -Algorithm SHA256Linux 或 macOS:
# Linux
sha256sum benchmark-reader-companion.zip
# macOS
shasum -a 256 benchmark-reader-companion.zip如果值不同,请停止并检查下载。在它们匹配后,解压 ZIP。你需要 Python 3.12 或更高版本。标准库教学运行器、JSON 示例和比较在 Windows x64 和 Linux 上通过了离线检查。macOS 尚未测试。捆绑的完整研究沙箱和原生 Ori 设置仅支持 Windows x64。
从解压后的文件夹中:
python verify_package.py
python three_tasks.py check检查会打印 OFFLINE reference and grader checks passed; zero inference calls。完整脚本按文件顺序如下。其配套模块处理请求、持久化和报告。
"""Three exact contracts; run from the extracted companion (standard library)."""
import argparse
from datetime import datetime, timezone
from decimal import Decimal
import json
from pathlib import Path
import re
from reader_core import execute, reconcile, report, read, load_config, finish_grade
TASKS = [
{"id": "invoice", "prompt": "Two unpaid lines cost 3 x 12.50 USD and 2 x 4.25 USD. Return only their total with exactly two decimal places.", "expected": "46.00"},
{"id": "utc", "prompt": "Convert 2026-10-18T10:30:00+02:00 to UTC. Return only YYYY-MM-DDTHH:MM:SSZ.", "expected": "2026-10-18T08:30:00Z"},
{"id": "refund", "prompt": "Policy: approve only if amount <= 200 USD and age <= 30 days. Amount=200 USD; age=30 days. Return only APPROVE or DENY.", "expected": "APPROVE"},
]
def refund_policy(amount, days):
return "APPROVE" if Decimal(str(amount)) <= 200 and days <= 30 else "DENY"
def grade(task, text, finish):
terminal = finish_grade(finish)
if terminal:
return terminal
if not isinstance(text, str) or not text.strip():
return {"passed": False, "classification": "empty"}
text = text.strip()
patterns = {"invoice": r"\d+\.\d{2}",
"utc": r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z",
"refund": r"APPROVE|DENY"}
valid = bool(re.fullmatch(patterns.get(task["id"], r"\d+\.\d{2}"), text))
passed = valid and text == task["expected"] and finish == "stop"
return {"passed": passed, "classification": "pass" if passed else
("incorrect" if valid else "malformed")}在使用分数之前,请检查其参考值和拒绝规则。这些离线夹具涵盖边界决策、无效格式和截断答案,且不调用模型。
def offline():
money = Decimal(3) * Decimal("12.50") + Decimal(2) * Decimal("4.25")
assert format(money, ".2f") == TASKS[0]["expected"]
utc = datetime.fromisoformat("2026-10-18T10:30:00+02:00")
assert utc.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") == TASKS[1]["expected"]
assert refund_policy(200, 30) == TASKS[2]["expected"]
for amount, days, expected in [(200.01, 30, "DENY"), (200, 31, "DENY"),
(199.99, 29, "APPROVE"), (0, 0, "APPROVE")]:
assert refund_policy(amount, days) == expected
for task in TASKS:
assert grade(task, task["expected"], "stop")["passed"]
for bad in ("wrong", None, "", '{"answer": 46}', "APPROVE please"):
assert not grade(task, bad, "stop")["passed"]
assert not grade(task, task["expected"], "length")["passed"]
assert not grade(TASKS[0], "47.00", "stop")["passed"]
assert not grade(TASKS[2], "DENY", "stop")["passed"]
print("OFFLINE reference and grader checks passed; zero inference calls.")将检查与花费分开。命令接口默认使用离线验证,需要显式启用实时选项和额度后才能进行推理。
def main(tasks=None, grader=grade, default_config="demo-config.json", offline_check=None):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("operation", nargs="?", default="check",
choices=["check", "plan", "run", "report", "reconcile"])
parser.add_argument("--config", default=default_config)
parser.add_argument("--run-dir", type=Path, default=Path("runs/demo"))
parser.add_argument("--live", action="store_true")
parser.add_argument("--max-usd", default="0")
parser.add_argument("--resume", action="store_true")
parser.add_argument("--tasks", help="Optional exact-contract custom task JSON")
args = parser.parse_args()
if args.operation == "check":
if args.tasks:
parser.error("Use an example entry point with its own offline_check; check does not accept --tasks overrides")
if offline_check is not None:
offline_check()
elif tasks is not None or grader is not grade or args.tasks:
parser.error("Custom tasks/graders require offline_check=... for their own reference and fixture checks")
else:
offline()
return
selected = read(args.tasks) if args.tasks else (tasks if tasks is not None else TASKS)
config = load_config(args.config)
if args.operation == "report":
print(json.dumps(report(args.run_dir), indent=2))
elif args.operation == "reconcile":
reconcile(args.run_dir, live=args.live)
print(json.dumps(report(args.run_dir), indent=2))
else:
execute(args.run_dir, selected, config, grader, args.max_usd,
live=args.live, resume=args.resume, plan=args.operation == "plan")
if __name__ == "__main__":
main()配置并检查计划
使用提供的 Luna 配置来设置模型、重复次数、token 额度和提供商约束:
{
"models": [
"openai/gpt-6-luna"
],
"repeats": 1,
"max_tokens": 1024,
"settings": {
"openai/gpt-6-luna": {
"provider": {
"require_parameters": true,
"allow_fallbacks": true,
"max_price": {
"prompt": 0.09999999999999999,
"completion": 0.5,
"request": 0
}
},
"reasoning": {
"effort": "low"
}
}
}
}Sol 的配置保留重复/token 设置,但使用自己的价格上限:
{
"models": [
"openai/gpt-6.1-sol"
],
"repeats": 1,
"max_tokens": 1024,
"settings": {
"openai/gpt-6.1-sol": {
"provider": {
"require_parameters": true,
"allow_fallbacks": true,
"max_price": {
"prompt": 2.0,
"completion": 10.0,
"request": 0
}
},
"reasoning": {
"effort": "low"
}
}
}
}models 选择候选模型,repeats 指定每个任务的请求次数,max_tokens 设置补全额度。推理可能在可见输出之前消耗该额度。离线检查不发起 API 调用。付费运行需要显式指定 —live 标志。因长度截断的响应会失败且不重试。
价格上限以每百万 token 的美元计;Luna 的提示词上限约为 $0.10。如果提供商不再支持已保存的设置,运行器必须停止,而不是静默更改它们。提供商回退不会切换模型或重新发送推理请求。
python three_tasks.py plan --config luna-config.json实际离线输出:
{"planned_calls": 3, "max_tokens": 1024, "models": ["openai/gpt-6-luna"], "repeats": 1, "estimated_reservations_usd": "0.0023543749999999999565625"}预留是本地成本估算,不是账户冻结或保证上限。在选择额度之前先做好计划。
| 教学选择 | 调用 | 预估预留 |
|---|---|---|
| Luna,三个任务 | 3 | $0.0023544 |
| Sol,三个任务 | 3 | $0.0470875 |
| Luna,下方 JSON 任务 | 1 | $0.00080725 |
| Sol,下方 JSON 任务 | 1 | $0.016145 |
更改任务、重复次数或 token 会改变估算值。如果花费超出估算值,脚本会停止发送新请求。
进行一次小规模付费运行
在 API 密钥设置 中创建密钥,添加 额度,并配置合适的密钥限额。在终端中本地设置该变量。
PowerShell:
$env:OPENROUTER_API_KEY = "YOUR_OPENROUTER_API_KEY"Bash 或 Zsh:
export OPENROUTER_API_KEY="YOUR_OPENROUTER_API_KEY"如果已配置现有变量,可重复使用。该包不会加载 .env。对于随附的三任务 Luna 配置:
python three_tasks.py run --config luna-config.json --run-dir runs/my-luna --live --max-usd 0.01
python three_tasks.py reconcile --run-dir runs/my-luna --live
python three_tasks.py report --run-dir runs/my-luna对账执行只读的 生成元数据 查询。报告显示响应覆盖率,即已完成的响应数除以计划试验数,以及通过/评分、失败、已验证成本和请求时间中位数。在账单得到验证之前,报告会将其成本保持为未解决状态。请求时间不包括评分和元数据;它不是首 token 时间。
实时结果会有所不同。下面的合成示例仅用于说明报告方式,并非模型测量结果。
第 4 步。添加你自己的任务和评分器
随附的 custom-tasks.json 展示了任务格式:
[
{
"id": "custom-total",
"prompt": "Four items cost 12.50 USD each. Return only the total with exactly two decimals.",
"expected": "50.00"
}
]python custom_task.py check 使用 Decimal 独立计算其参考值,并测试正确、错误和格式错误的答案。自定义货币 ID 使用两位小数的评分器。其他契约需要自己的评分器和检查。
完整的 json_extraction.py 按文件顺序分三部分给出。它允许 JSON 空白和键顺序差异,但拒绝缺失、多余或重复的键以及错误的类型。一个符合 schema 但值错误的对象会被判定为不正确。被过滤或异常结束的情况有单独的分类。
"""A complete exact-schema JSON extraction example; offline check by default."""
import json
from reader_core import finish_grade
from three_tasks import main
CUSTOMER_EMAIL = "mira@example.test"
ORDER_CODE = "A-104"
ITEM_COUNT = 3
SOURCE_TEXT = ("Customer: Mira. Email: mira@example.test. Order: A-104. "
"Items: 3. Gift wrap: no.")
# Define reference fields from the independently specified source facts.
# Do not ask a model (or the grader) to produce the reference.
EXPECTED = {"email": CUSTOMER_EMAIL, "order_id": ORDER_CODE,
"item_count": ITEM_COUNT, "gift_wrap": False}
TASKS = [{"id": "order-extraction", "grader": "exact-order-json-v1",
"prompt": "Extract email, order_id, item_count and gift_wrap from this order. "
"Return a JSON object only, with exactly those keys. email and order_id "
"are strings; item_count is an integer; gift_wrap is a boolean. " + SOURCE_TEXT,
"expected": EXPECTED}]仅靠 JSON 语法是不够的。拒绝重复键和无效数值,然后在将字段与参考值比较之前验证 schema。
def strict_json(text):
def pairs(items):
result = {}
for key, value in items:
if key in result:
raise ValueError("Duplicate JSON key")
result[key] = value
return result
def nonfinite(value):
raise ValueError("Nonfinite JSON number")
return json.loads(text, object_pairs_hook=pairs, parse_constant=nonfinite)
def grade(task, text, finish):
terminal = finish_grade(finish)
if terminal:
return terminal
if not isinstance(text, str) or not text.strip():
return {"passed": False, "classification": "empty"}
try:
actual = strict_json(text)
except (ValueError, TypeError):
return {"passed": False, "classification": "malformed"}
types = {"email": str, "order_id": str, "item_count": int, "gift_wrap": bool}
schema_ok = (type(actual) is dict and actual.keys() == types.keys()
and all(type(actual[key]) is kind for key, kind in types.items()))
if not schema_ok:
return {"passed": False, "classification": "malformed"}
passed = actual == task["expected"]
return {"passed": passed, "classification": "pass" if passed else "incorrect"}同时检查接受和拒绝两种情况。这些测试用例区分有效但错误的值与格式错误的输出,并验证过滤或截断不能算作通过。
CORRECT = '{"order_id":"A-104","email":"mira@example.test","gift_wrap":false,"item_count":3}'
WRONG = '{"email":"other@example.test","order_id":"A-104","item_count":3,"gift_wrap":false}'
MALFORMED = ["not JSON", '```json\n' + CORRECT + '\n```',
'{"email":"mira@example.test"}', CORRECT.replace('3}', 'true}'),
CORRECT.replace('3}', '3.0}'), CORRECT.replace('3}', 'NaN}'),
CORRECT[:-1] + ',"item_count":3}', CORRECT[:-1] + ',"extra":1}']
def offline():
assert EXPECTED == {"email": "mira@example.test", "order_id": "A-104",
"item_count": 3, "gift_wrap": False}
assert f"Email: {CUSTOMER_EMAIL}." in SOURCE_TEXT
assert f"Order: {ORDER_CODE}." in SOURCE_TEXT
assert f"Items: {ITEM_COUNT}." in SOURCE_TEXT and "Gift wrap: no." in SOURCE_TEXT
task = TASKS[0]
assert grade(task, CORRECT, "stop")["passed"]
assert grade(task, json.dumps(EXPECTED, indent=2), "stop")["passed"]
assert grade(task, WRONG, "stop")["classification"] == "incorrect"
for text in MALFORMED:
assert grade(task, text, "stop")["classification"] == "malformed", text
assert grade(task, "", "stop")["classification"] == "empty"
assert grade(task, CORRECT, "content_filter")["classification"] == "content_filtered"
assert grade(task, CORRECT, "length")["classification"] == "truncated"
print("OFFLINE JSON extraction: independent source facts, schema, correct/wrong/malformed fixtures passed; zero requests.")
if __name__ == "__main__":
main(tasks=TASKS, grader=grade, offline_check=offline)最后的 main(…) 调用将任务、评分和参考检查连接到运行器。调整源事实和预期字段,然后运行:
python json_extraction.py check
python json_extraction.py plan --config luna-config.json预期检查输出:
OFFLINE JSON extraction: independent source facts, schema, correct/wrong/malformed fixtures passed; zero requests.使用单独的文件夹。这些额度仅适用于随附的单用例计划。
python json_extraction.py run --config luna-config.json --run-dir runs/json-luna --live --max-usd 0.01
python json_extraction.py run --config sol-config.json --run-dir runs/json-sol --live --max-usd 0.03
python json_extraction.py reconcile --run-dir runs/json-luna --live
python json_extraction.py reconcile --run-dir runs/json-sol --live开始前设置相同的重复次数。一个用例重复三次测试的是变异性,而不是工作负载覆盖。在得出更广泛的结论之前,添加有代表性的边界用例和留出用例。
第 5 步:比较已保存的运行并处理缺失答案
对于已保存的 JSON 运行:
python compare_runs.py runs/json-luna runs/json-sol --output comparisons/json这会写出 comparison.md 和 comparison.json,不进行推理或重新评分。它会校验契约、设置和身份;不兼容的运行需要调查,而不是静默排名。
先离线演练:
python synthetic_comparison.py runs/comparison-demo
python compare_runs.py runs/comparison-demo/luna runs/comparison-demo/sol --output comparisons/full表格包含这些合成夹具值,以缩写列显示:
| 夹具标签 | 已完成/计划 | 通过/已评分 | 已过滤 | 已验证成本/100 | 中位秒数 |
|---|---|---|---|---|---|
| Luna | 6/6 | 5/6 | 1 | $0.000100 | 0.150 |
| Sol | 5/6 | 5/5 | 0 | 不可用 | 0.155 |
Sol 的夹具有一个缺失答案和一张未验证的账单。其 5/5 分数缺乏完整覆盖。这些数字既不衡量任何模型。
保留不确定的试验及其预留。修复访问或速率限制问题,然后以不变的配置、来源和配额继续:
python json_extraction.py run --config luna-config.json --run-dir runs/json-luna --live --max-usd 0.01 --resume恢复仅继续从未尝试过的试验。已知账单无法恢复缺失的文本。如果我们找不到某个请求的生成记录,报告会将其标记为未解决。不要丢弃运行或删除尝试。README 涵盖了崩溃后的陈旧锁。
要比较每个参与者都回答过的用例:
python compare_runs.py runs/comparison-demo/luna runs/comparison-demo/sol --common-completed --output comparisons/common显式交集保留原始覆盖并列出排除项。它可能选择更简单的用例,且不能修复缺失的账单。绝不在不披露的情况下比较不同的子集。
可选的 60 任务运行器和运行时设置位于配套文件中。其历史结果提供了一个更大的完整示例。
哪个模型在我们的基准测试中表现最好?
每个模型收到 40 个基线任务和 20 个困难任务各三次,共给出 120 个基线和 60 个困难评分。这些结果描述了 2026 年 10 月 20 日完成的、在我们固定设置下的 60 个合成任务。AA 表示来自我们带日期的公开快照的 Artificial Analysis Intelligence Index。
| 模型和 API ID | 基线 % | 困难 % | 合并通过数 | 每 100 个任务响应的成本 | 中位秒数 | AA 指数 |
|---|---|---|---|---|---|---|
Claude Haiku 5.5anthropic/claude-haiku-5.5 | 90.8 | 76.7 | 155/180 | $0.03434 | 3.37 | 43.4 |
Claude Sonnet 5.5anthropic/claude-sonnet-5.5 | 47.5 | 45.0 | 84/180 | $0.47273 | 2.33 | 56 |
GPT-6 Lunaopenai/gpt-6-luna | 98.3 | 73.3 | 162/180 | $0.01848 | 3.81 | 38.1 |
GPT-6.1 Solopenai/gpt-6.1-sol | 100.0 | 100.0 | 180/180 | $0.24490 | 3.52 | 51.8 |
Gemini 3.8 Flashgoogle/gemini-3.8-flash | 95.0 | 96.7 | 172/180 | $0.30412 | 3.38 | 40.9 |
DeepSeek V4.1 Flashdeepseek/deepseek-v4.1-flash | 93.3 | 75.0 | 157/180 | $0.00394 | 4.66 | 24.7 |
Grok 4.7x-ai/grok-4.7 | 99.2 | 96.7 | 177/180 | $1.03462 | 5.97 | 46.4 |
MiMo V2.6 Flashxiaomi/mimo-v2.6-flash | 89.2 | 63.3 | 145/180 | $0.03156 | 5.00 | 37.9 |
Mistral Large 4.0mistralai/mistral-large-4-0 | 90.0 | 51.7 | 139/180 | $0.58945 | 31.45 | 38.4 |
GLM 5.3z-ai/glm-5.3 | 92.5 | 73.3 | 155/180 | $0.06083 | 1.59 | 44.8 |
每 100 个任务响应的成本是 180 个已评分答案的已验证成本,按比例缩放到 100。它不包括运营开销和未解决的账单。中位秒数衡量本地请求的耗时。
三项发现指导了在此集合上的选择。
-
最高通过率。Sol 以每 100 个响应约 $0.2449 的成本通过了 180/180。
-
最低响应成本。DeepSeek 每 100 个响应成本约 $0.00394,通过了 157/180,有 14 次截断。Luna 以约 $0.01848 通过了 162/180。根据你所需的通过率和失败后果进行选择。
-
输出合规性影响分数。Sonnet 的 66 个格式错误响应涵盖 21 个发票、30 个日期和 15 个退款试验。原始答案包含解释,而提示只要求一个数字或 JSON。分数衡量契约合规性和答案正确性,而非纯粹的推理能力。
每个模型行总计 180。最后一行总计所有 1,800 个响应。类别记录失败的检查,而非其根本原因。
| 模型 | 通过 | 错误 | 格式错误 | 被截断 | 空 |
|---|---|---|---|---|---|
| Haiku | 155 | 7 | 18 | 0 | 0 |
| Sonnet | 84 | 30 | 66 | 0 | 0 |
| Luna | 162 | 18 | 0 | 0 | 0 |
| Sol | 180 | 0 | 0 | 0 | 0 |
| Gemini | 172 | 8 | 0 | 0 | 0 |
| DeepSeek | 157 | 0 | 9 | 14 | 0 |
| Grok | 177 | 3 | 0 | 0 | 0 |
| MiMo | 145 | 8 | 13 | 14 | 0 |
| Mistral | 139 | 8 | 7 | 25 | 1 |
| GLM | 155 | 18 | 7 | 0 | 0 |
| 总计 | 1526 | 100 | 120 | 53 | 1 |
全部 53 个被截断的响应仍然失败。
该研究请求 8,192 个 token,并在支持时使用低推理。有 16 次试验需要替换请求,因为此前的尝试没有返回答案。其中一次替换也没有返回答案,需要再次派发,因此针对 16 个选定答案共进行了 17 次替换派发。没有对任何返回的答案进行重试。配套程序保留了每一次尝试。
已知的研究费用为 $5.1032,另有 $0.5383 预留给未解决的账单。Reader 方案估计 Luna 的 180 次研究试验为 $0.97,Sol 的为 $19.46。路由、日期以及原始的并发/恢复调度限制了对串行 reader 运行器的比较。
公开的 LLM 基准测试与您自己的基准测试相比如何?
我们于 2026 年 10 月 20 日 10:03 UTC 通过我们的 基准测试 API 获取了一份 Artificial Analysis 快照,匹配了精确的规范模型版本。
Spearman 相关性比较排名顺序,从 −1(排名相反)到 +1(排名一致)。在十个模型中:
| 集合 | Spearman 相关性 |
|---|---|
| 基线 | 0.115 |
| 困难 | 0.183 |
| 合并 | 0.109 |
在此样本中一致性较弱。不同的任务和设置使得无法就一般基准测试的可靠性得出结论。使用公开分数进行初筛,然后评估您的工作负载。
每个任务应该运行多少次?
在 600 个模型-任务对中,有 68 个模型通过了部分重复试验,但未通过其他重复试验。保留每一次重复。这些是对 60 个案例的重复观察,而不是每个模型的 180 个不同案例。接近的排名需要更多留出案例和重复。
常见问题
我需要多少个测试案例?
从一小组案例开始,覆盖一个工作流的常见输入、边界和已知故障。十个经过仔细审查的示例可以支持初步探索,但它们不提供统计保证。当差异接近或故障代价高昂时,用有代表性的留出案例进行扩展。重复评估一致性;它们不能替代覆盖范围。
我可以使用 LLM 评判器吗?
可以,对于语气或解释质量等难以精确检查的属性。根据人工标注的示例验证其评分标准,并检查分歧。对可计算的答案和必需的 schema 保留代码检查。我们的 LLM 作为评判器指南 解释了该方法。
后续步骤
使用我们的 黄金评估数据集指南 从您的应用程序构建一个代表性集合。比较候选者,然后 在检查上对拉取请求进行门控。
来源:OpenRouter Announcements · openrouter.ai