分析期望的两处小修:期望 SQL 只返回两期时补上的基期、本期写成文字交给分析工具的参数(期次是数的也认,算子按写出来的样子比);参数和结果对不上的原因前面写「第 n 个期望(贡献)算不出期望」,不再叠两个「的」。测试补逐题 E1 顺着下钻找到两层的查询

This commit is contained in:
ThearchyHelios
2026-10-21 18:30:08 +08:00
parent 078c2c4d97
commit 94a6eb9c64
3 changed files with 13 additions and 2 deletions
+10
View File
@@ -315,3 +315,13 @@ def test_the_summary_counts_outcomes_by_kind():
assert summary["outcomes_by_kind"] == {"contribution": {"traced": 1}, "verdict": {"wrong": 1},
"scalar": {"untraced": 1}}
assert summary["outcomes"] == {"traced": 1, "wrong": 1, "untraced": 1}
def test_e1_follows_the_analysis_inputs_down_the_drill():
"""逐题 E1 拿产出答案的查询:引用的是下钻那一层的分析结论时,顺着上一层的结论找到两层各自读的查询。"""
from app.eval.score import _query_inputs
found = {"a1": {"inputs": ["q1"]}, "a2": {"inputs": ["a1", "q2"]}}
assert _query_inputs(found["a2"], found, {"q1": {}, "q2": {}}) == ["q1", "q2"]
assert _query_inputs({"inputs": ["gone"]}, found, {"q1": {}}) == [], "取不回的输入不算"