Repository navigation
Add an API-based LLM Judge metric for SLU answers - #38
Conversation
#38 审阅反馈与修改要求审阅 head: 可选 SLU 文本 Judge 的接入方向合理,现有 accuracy 默认路线应继续保留。当前请保持 Draft,由作者完成下面的修复、文档和测试后再提交审阅。 1. HTTP 响应截断会丢失整批报告
已通过真实本地 HTTP 服务复现:
请在 HTTP adapter 边界处理实际传输/协议异常(包括 必要回归:第一条成功、第二条响应截断,最终仍落报告,包含两条样本结果, 2. Catalog / atlas 未完整重生成原 head 执行 三份 atlas 产物也未同步。在本地模拟合入最新 main 后,Git 无文本冲突,KOMOS 保留,catalog 共 178 条;但条目顺序和图谱仍有差异,不能通过最新 main 的 catalog/atlas freshness 检查。 请先同步最新 main,再通过生成器更新并提交 catalog 和三份 atlas,保持现有检查。不要通过删除检查或手动调整生成结果来绕过问题。 3. 产品要求:rubric 由用户输入,默认采用百分制这里调整此前“由仓库提供默认五档 rubric”的建议:具体评分 rubric 由用户自行定义并作为输入提供;框架默认使用 0–100 分、越高越好的百分制。 请相应修改接口和实现:
请说明 ref/context 与证据要求:Judge 无法直接听音频,对于依赖音频事实的问题,用户应提供足以判断的文本证据或参考答案,并在 rubric 中定义证据不足如何处理。 4. 文档和声明需要补齐请按现有
用户需要能看懂如何接入自己的 rubric、调用指定服务和复核结果。仅在 PR body 中标记 documentation pending 还不足以合并。 5. 简化建议:标准库节点可使用 in_process该节点只用标准库,没有 pip 依赖;当前 建议评估改为 6. CI 问题及建议的测试/CI PR远端 Core 40674313095 当前为 请同时提交有针对性的测试/CI 修改,并在更新后的精确 head 上跑完整 Core:
建议把必要的回归测试随本 PR 一起提交;如果发现确实需要改动共享 workflow,请另提一个范围小、用途清楚的 CI PR,并说明现有检查漏掉了什么。现有 Core 已能执行这些测试,通常无需新建 workflow/job,不要增加只检查名称/文件存在的重复用例,也无需公共 CI 使用真实密钥、付费 API 或 GPU。 请补一份可复核的少量真实 API smoke 记录,注明模型、用户 rubric、分数范围、输入和输出;它用于确认真实接入,不应被描述为评分准确率的充分验证。 完成上述作者侧修改、文档和 CI 后,再转为 ready for review。本次反馈只提出审阅意见,没有代为修复本 PR。 |
|
已根据反馈完成本轮修复,并合并最新上游 main。 已补充 HTTP 截断/协议异常、用户 rubric、百分制、失败批次 null 聚合及 in_process 环境相关回归测试,同时更新文档、catalog 和三份 atlas。 本地 Linux Python 3.10/3.11/3.12 各 829 passed、9 skipped;跳过项为旧 harness 材料相关测试和可选 srmrpy 测试。lint、CLI、构建和 wheel 安装验证均通过。真实 API smoke 记录已补在 docs/tasks/slu.md,仅用于确认接入行为。 当前远程 Core 仍在等待维护者批准。麻烦批准运行最新提交的 CI,我会继续跟进检查结果并处理失败项,谢谢。 |
Start Here
Read Contributing. If the category is unclear, use
Add Evaluation Capabilities.
Summary
Add an optional API-based LLM Judge metric for textual SLU answers.
and aligned reference answers.
Failed batches retain per-sample evidence and report a null aggregate.
PR Type
Guide followed: docs/pr_guides/new_metric.md.
Documentation requirements are still pending.
Guide followed:
Evaluation Identity
metric:llm_judgeexecution_metrics:llm_judgepipeline_id:slu.any.llm_judge.llm_judge_v1scores are unchanged. Judge scores are not directly equivalent to accuracy.
Score definition: each sample receives an integer in [1, 5], with higher
being better. The aggregate is the sum of sample scores divided by the
number of samples, provided all samples succeed.
Changed Declarations
node_env.yaml: yesdocs/node_readme_template.md: no — pendingdeclarations, the generated pipeline catalog, and tests. The node README,
task guide, and generated atlas still need review/update. Unrelated README
translations are not included.
Validation
Commands run in the prepared local/Linux environments:
Results:
The skipped portable tests require existing optional normalization environments,
dependencies, or harness-only artifacts. No focused Judge tests were skipped.
Exact pipeline selection and preservation through describe -> run -> report
are covered by:
test_slu_judge_routes_and_default_accuracytest_cli_routes_describe_run_and_standard_outputstest_judge_report_matches_accuracy_envelopeExpected pipeline:
slu.any.llm_judge.llm_judge_v1Runtime Smoke Test
This is an API-based node without local model checkpoints or GPU requirements.
A real API smoke test completed successfully for three textual samples.
Automated tests use fake credentials and mocked API responses; no real API
credentials are required by CI.
Safety
.venv, checkpoints, generated reports, local cache paths, or credentials committed