@tangle-network/agent-bench 0.1.0 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/HARNESS.md +302 -0
- package/README.md +39 -2
- package/dist/adapters.d.ts +15 -0
- package/dist/adapters.js +43 -0
- package/dist/adapters.js.map +1 -0
- package/dist/benchmarks/_harness.d.ts +125 -0
- package/dist/benchmarks/_harness.js +33 -0
- package/dist/benchmarks/_harness.js.map +1 -0
- package/dist/benchmarks/aec-bench.d.ts +27 -0
- package/dist/benchmarks/aec-bench.js +8 -0
- package/dist/benchmarks/aec-bench.js.map +1 -0
- package/dist/benchmarks/agentbench.d.ts +16 -0
- package/dist/benchmarks/agentbench.js +10 -0
- package/dist/benchmarks/agentbench.js.map +1 -0
- package/dist/benchmarks/appworld.d.ts +37 -0
- package/dist/benchmarks/appworld.js +14 -0
- package/dist/benchmarks/appworld.js.map +1 -0
- package/dist/benchmarks/bfcl.d.ts +18 -0
- package/dist/benchmarks/bfcl.js +10 -0
- package/dist/benchmarks/bfcl.js.map +1 -0
- package/dist/benchmarks/cad-design.d.ts +45 -0
- package/dist/benchmarks/cad-design.js +7 -0
- package/dist/benchmarks/cad-design.js.map +1 -0
- package/dist/benchmarks/cadbench.d.ts +19 -0
- package/dist/benchmarks/cadbench.js +8 -0
- package/dist/benchmarks/cadbench.js.map +1 -0
- package/dist/benchmarks/cadgenbench.d.ts +22 -0
- package/dist/benchmarks/cadgenbench.js +8 -0
- package/dist/benchmarks/cadgenbench.js.map +1 -0
- package/dist/benchmarks/commit0.d.ts +31 -0
- package/dist/benchmarks/commit0.js +10 -0
- package/dist/benchmarks/commit0.js.map +1 -0
- package/dist/benchmarks/crag.d.ts +14 -0
- package/dist/benchmarks/crag.js +9 -0
- package/dist/benchmarks/crag.js.map +1 -0
- package/dist/benchmarks/dabstep.d.ts +18 -0
- package/dist/benchmarks/dabstep.js +10 -0
- package/dist/benchmarks/dabstep.js.map +1 -0
- package/dist/benchmarks/enterpriseops-gym.d.ts +38 -0
- package/dist/benchmarks/enterpriseops-gym.js +10 -0
- package/dist/benchmarks/enterpriseops-gym.js.map +1 -0
- package/dist/benchmarks/finresearchbench.d.ts +15 -0
- package/dist/benchmarks/finresearchbench.js +8 -0
- package/dist/benchmarks/finresearchbench.js.map +1 -0
- package/dist/benchmarks/finsearchcomp.d.ts +49 -0
- package/dist/benchmarks/finsearchcomp.js +7 -0
- package/dist/benchmarks/finsearchcomp.js.map +1 -0
- package/dist/benchmarks/frames.d.ts +59 -0
- package/dist/benchmarks/frames.js +13 -0
- package/dist/benchmarks/frames.js.map +1 -0
- package/dist/benchmarks/hotpotqa.d.ts +48 -0
- package/dist/benchmarks/hotpotqa.js +15 -0
- package/dist/benchmarks/hotpotqa.js.map +1 -0
- package/dist/benchmarks/humaneval.d.ts +53 -0
- package/dist/benchmarks/humaneval.js +15 -0
- package/dist/benchmarks/humaneval.js.map +1 -0
- package/dist/benchmarks/mind2web.d.ts +41 -0
- package/dist/benchmarks/mind2web.js +9 -0
- package/dist/benchmarks/mind2web.js.map +1 -0
- package/dist/benchmarks/nomiracl.d.ts +15 -0
- package/dist/benchmarks/nomiracl.js +9 -0
- package/dist/benchmarks/nomiracl.js.map +1 -0
- package/dist/benchmarks/open-rag-bench.d.ts +14 -0
- package/dist/benchmarks/open-rag-bench.js +9 -0
- package/dist/benchmarks/open-rag-bench.js.map +1 -0
- package/dist/benchmarks/programbench.d.ts +38 -0
- package/dist/benchmarks/programbench.js +10 -0
- package/dist/benchmarks/programbench.js.map +1 -0
- package/dist/benchmarks/rag-shared.d.ts +42 -0
- package/dist/benchmarks/rag-shared.js +39 -0
- package/dist/benchmarks/rag-shared.js.map +1 -0
- package/dist/benchmarks/ragbench.d.ts +16 -0
- package/dist/benchmarks/ragbench.js +9 -0
- package/dist/benchmarks/ragbench.js.map +1 -0
- package/dist/benchmarks/simpleqa.d.ts +64 -0
- package/dist/benchmarks/simpleqa.js +11 -0
- package/dist/benchmarks/simpleqa.js.map +1 -0
- package/dist/benchmarks/swe-bench.d.ts +56 -0
- package/dist/benchmarks/swe-bench.js +14 -0
- package/dist/benchmarks/swe-bench.js.map +1 -0
- package/dist/benchmarks/t2-ragbench.d.ts +14 -0
- package/dist/benchmarks/t2-ragbench.js +9 -0
- package/dist/benchmarks/t2-ragbench.js.map +1 -0
- package/dist/benchmarks/tau-bench-shared.d.ts +26 -0
- package/dist/benchmarks/tau-bench-shared.js +10 -0
- package/dist/benchmarks/tau-bench-shared.js.map +1 -0
- package/dist/benchmarks/tau2-bench.d.ts +7 -0
- package/dist/benchmarks/tau2-bench.js +11 -0
- package/dist/benchmarks/tau2-bench.js.map +1 -0
- package/dist/benchmarks/tau3-banking.d.ts +15 -0
- package/dist/benchmarks/tau3-banking.js +9 -0
- package/dist/benchmarks/tau3-banking.js.map +1 -0
- package/dist/benchmarks/terminal-bench.d.ts +24 -0
- package/dist/benchmarks/terminal-bench.js +8 -0
- package/dist/benchmarks/terminal-bench.js.map +1 -0
- package/dist/benchmarks/toollm.d.ts +16 -0
- package/dist/benchmarks/toollm.js +10 -0
- package/dist/benchmarks/toollm.js.map +1 -0
- package/dist/benchmarks/trata-hedge.d.ts +32 -0
- package/dist/benchmarks/trata-hedge.js +7 -0
- package/dist/benchmarks/trata-hedge.js.map +1 -0
- package/dist/benchmarks/types.d.ts +107 -0
- package/dist/benchmarks/types.js +1 -0
- package/dist/benchmarks/types.js.map +1 -0
- package/dist/benchmarks/webarena-verified.d.ts +16 -0
- package/dist/benchmarks/webarena-verified.js +10 -0
- package/dist/benchmarks/webarena-verified.js.map +1 -0
- package/dist/chunk-2PVVP7GN.js +197 -0
- package/dist/chunk-2PVVP7GN.js.map +1 -0
- package/dist/chunk-2XU6OGEN.js +170 -0
- package/dist/chunk-2XU6OGEN.js.map +1 -0
- package/dist/chunk-53UPUNBZ.js +325 -0
- package/dist/chunk-53UPUNBZ.js.map +1 -0
- package/dist/chunk-5SBJCB6W.js +144 -0
- package/dist/chunk-5SBJCB6W.js.map +1 -0
- package/dist/chunk-7WSD27QQ.js +118 -0
- package/dist/chunk-7WSD27QQ.js.map +1 -0
- package/dist/chunk-C7T7WEK2.js +103 -0
- package/dist/chunk-C7T7WEK2.js.map +1 -0
- package/dist/chunk-CKUVRZ2T.js +251 -0
- package/dist/chunk-CKUVRZ2T.js.map +1 -0
- package/dist/chunk-HBSWHQNJ.js +30 -0
- package/dist/chunk-HBSWHQNJ.js.map +1 -0
- package/dist/chunk-HHXFIHXC.js +116 -0
- package/dist/chunk-HHXFIHXC.js.map +1 -0
- package/dist/chunk-IFAV6KEM.js +276 -0
- package/dist/chunk-IFAV6KEM.js.map +1 -0
- package/dist/chunk-INNOYXCP.js +387 -0
- package/dist/chunk-INNOYXCP.js.map +1 -0
- package/dist/chunk-J3KDJNX2.js +182 -0
- package/dist/chunk-J3KDJNX2.js.map +1 -0
- package/dist/chunk-JRWWGMK7.js +148 -0
- package/dist/chunk-JRWWGMK7.js.map +1 -0
- package/dist/chunk-JTHWEDEW.js +32 -0
- package/dist/chunk-JTHWEDEW.js.map +1 -0
- package/dist/chunk-KDIKRJGB.js +120 -0
- package/dist/chunk-KDIKRJGB.js.map +1 -0
- package/dist/chunk-LRRD7NAG.js +301 -0
- package/dist/chunk-LRRD7NAG.js.map +1 -0
- package/dist/chunk-ODT47UAY.js +221 -0
- package/dist/chunk-ODT47UAY.js.map +1 -0
- package/dist/chunk-PA2ZKHJC.js +230 -0
- package/dist/chunk-PA2ZKHJC.js.map +1 -0
- package/dist/chunk-PPYSEKFM.js +182 -0
- package/dist/chunk-PPYSEKFM.js.map +1 -0
- package/dist/chunk-PUIRNYI7.js +189 -0
- package/dist/chunk-PUIRNYI7.js.map +1 -0
- package/dist/chunk-R36V2VP7.js +169 -0
- package/dist/chunk-R36V2VP7.js.map +1 -0
- package/dist/chunk-R67DFVLO.js +142 -0
- package/dist/chunk-R67DFVLO.js.map +1 -0
- package/dist/chunk-SEVJPLZC.js +260 -0
- package/dist/chunk-SEVJPLZC.js.map +1 -0
- package/dist/chunk-SYDW647C.js +318 -0
- package/dist/chunk-SYDW647C.js.map +1 -0
- package/dist/chunk-TBKU5XQI.js +228 -0
- package/dist/chunk-TBKU5XQI.js.map +1 -0
- package/dist/chunk-TSWPNOYM.js +147 -0
- package/dist/chunk-TSWPNOYM.js.map +1 -0
- package/dist/chunk-UAIOHCUK.js +27 -0
- package/dist/chunk-UAIOHCUK.js.map +1 -0
- package/dist/chunk-UPAMRDX4.js +233 -0
- package/dist/chunk-UPAMRDX4.js.map +1 -0
- package/dist/chunk-VQRS7VUC.js +342 -0
- package/dist/chunk-VQRS7VUC.js.map +1 -0
- package/dist/chunk-X3BTXCJ4.js +262 -0
- package/dist/chunk-X3BTXCJ4.js.map +1 -0
- package/dist/chunk-X5YKXC6V.js +211 -0
- package/dist/chunk-X5YKXC6V.js.map +1 -0
- package/dist/chunk-Y6O2OCUO.js +130 -0
- package/dist/chunk-Y6O2OCUO.js.map +1 -0
- package/dist/chunk-YCGY7UIZ.js +208 -0
- package/dist/chunk-YCGY7UIZ.js.map +1 -0
- package/dist/chunk-Z7ML6L77.js +162 -0
- package/dist/chunk-Z7ML6L77.js.map +1 -0
- package/dist/chunk-ZEWMTR5M.js +136 -0
- package/dist/chunk-ZEWMTR5M.js.map +1 -0
- package/dist/index.d.ts +355 -0
- package/dist/index.js +1908 -0
- package/dist/index.js.map +1 -0
- package/fixtures/aec-bench.json +18 -0
- package/fixtures/agentbench-dbbench.json +22 -0
- package/fixtures/bfcl.json +45 -0
- package/fixtures/commit0.json +72 -0
- package/fixtures/crag.json +10 -0
- package/fixtures/dabstep.json +22 -0
- package/fixtures/enterpriseops-gym.json +103 -0
- package/fixtures/finresearchbench.json +21 -0
- package/fixtures/finsearchcomp.json +66 -0
- package/fixtures/frames.json +26 -0
- package/fixtures/hotpotqa.json +182 -0
- package/fixtures/nomiracl.json +26 -0
- package/fixtures/open-rag-bench.json +16 -0
- package/fixtures/pier-agent/no-model-task/environment/Dockerfile +16 -0
- package/fixtures/pier-agent/no-model-task/environment/seed/src/status.txt +1 -0
- package/fixtures/pier-agent/no-model-task/instruction.md +6 -0
- package/fixtures/pier-agent/no-model-task/pre_artifacts.sh +6 -0
- package/fixtures/pier-agent/no-model-task/task.toml +35 -0
- package/fixtures/pier-agent/no-model-task/tests/Dockerfile +17 -0
- package/fixtures/pier-agent/no-model-task/tests/seed/src/status.txt +1 -0
- package/fixtures/pier-agent/no-model-task/tests/test.sh +19 -0
- package/fixtures/programbench.json +17 -0
- package/fixtures/ragbench.json +21 -0
- package/fixtures/simpleqa.json +121 -0
- package/fixtures/t2-ragbench.json +13 -0
- package/fixtures/tau2-bench.json +16 -0
- package/fixtures/tau3-banking.json +16 -0
- package/fixtures/toollm.json +28 -0
- package/fixtures/webarena-verified.json +20 -0
- package/package.json +60 -20
- package/pier_agents/__init__.py +18 -0
- package/pier_agents/candidate_contract.py +755 -0
- package/pier_agents/process_boundary.py +321 -0
- package/pier_agents/tangle_candidate.py +907 -0
- package/pier_agents/workspace_boundary.py +368 -0
- package/scripts/appworld_driver.py +359 -0
- package/scripts/cadbench_prepare.py +22 -0
- package/scripts/cadgenbench_hard_parts.py +48 -0
- package/scripts/clbench_codebase_judge.py +73 -0
- package/scripts/commit0_judge.py +170 -0
- package/scripts/dabstep_judge.py +42 -0
- package/scripts/enterpriseops_gym_judge.py +281 -0
- package/scripts/programbench_judge.py +120 -0
- package/scripts/render-gate-chart.mjs +176 -0
- package/scripts/run-package-tests.mjs +56 -0
- package/scripts/terminate-pier-trial.mts +66 -0
- package/scripts/trata-hedge/README.md +56 -0
- package/scripts/trata-hedge/run.sh +60 -0
- package/scripts/trata-hedge/solve.py +83 -0
- package/scripts/verify-packed-consumer.mjs +235 -0
- package/scripts/verify-pier-agent.mts +715 -0
- package/scripts/verify-pier-pair.mts +74 -0
- package/scripts/verify-pier-recovery.mts +139 -0
- package/src/adapters.ts +26 -0
- package/src/benchmarks/_harness.test.mts +178 -0
- package/src/benchmarks/_harness.ts +239 -16
- package/src/benchmarks/agentbench.ts +163 -0
- package/src/benchmarks/appworld.test.mts +15 -9
- package/src/benchmarks/bfcl.ts +346 -0
- package/src/benchmarks/crag.ts +137 -0
- package/src/benchmarks/dabstep.test.mts +70 -0
- package/src/benchmarks/dabstep.ts +212 -0
- package/src/benchmarks/external-adapters.test.mts +150 -0
- package/src/benchmarks/finresearchbench.ts +269 -0
- package/src/benchmarks/humaneval.ts +20 -8
- package/src/benchmarks/nomiracl.ts +180 -0
- package/src/benchmarks/open-rag-bench.ts +153 -0
- package/src/benchmarks/rag-benchmarks.test.mts +138 -0
- package/src/benchmarks/rag-shared.ts +327 -0
- package/src/benchmarks/ragbench.ts +171 -0
- package/src/benchmarks/swe-bench.test.mts +61 -0
- package/src/benchmarks/swe-bench.ts +201 -19
- package/src/benchmarks/t2-ragbench.ts +166 -0
- package/src/benchmarks/tau-bench-shared.ts +214 -0
- package/src/benchmarks/tau2-bench.ts +30 -0
- package/src/benchmarks/tau3-banking.ts +29 -0
- package/src/benchmarks/terminal-bench.test.mts +33 -0
- package/src/benchmarks/terminal-bench.ts +23 -8
- package/src/benchmarks/toollm.ts +254 -0
- package/src/benchmarks/types.ts +42 -0
- package/src/benchmarks/webarena-verified.ts +200 -0
- package/src/commit0-prereqs.sh +0 -0
- package/src/coordination-mcp-container-reach.mts +181 -0
- package/src/decoder-live.mts +1 -1
- package/src/examples/README.md +103 -39
- package/src/examples/benchmark-matrix.mts +101 -0
- package/src/examples/lean-proof-gate.README.md +77 -0
- package/src/examples/lean-proof-gate.mts +162 -0
- package/src/examples/lean-verify.ts +95 -0
- package/src/examples/lean.Dockerfile +12 -0
- package/src/examples/math-demo.mts +9 -7
- package/src/examples/strategy-demo.mts +10 -12
- package/src/gate.ts +3 -2
- package/src/hev-eval.mts +69 -0
- package/src/hev-improve.mts +169 -0
- package/src/hev-structural.mts +688 -0
- package/src/index.ts +73 -0
- package/src/mbpp-structural.mts +662 -0
- package/src/pier-agent.test-fixtures.mts +19 -0
- package/src/pier-agent.test.mts +363 -0
- package/src/pier-agent.ts +657 -0
- package/src/pier-result-grader.mjs +30 -0
- package/src/pier-result-grader.test.mts +62 -0
- package/src/pier-result-grader.ts +108 -0
- package/src/pier-task-outcome.test.mts +117 -0
- package/src/pier-task-outcome.ts +240 -0
- package/src/pier-trial-controller.test.mts +412 -0
- package/src/pier-trial-controller.ts +858 -0
- package/src/pier-trial-supervisor.mjs +352 -0
- package/src/resolve-client.ts +25 -2
- package/src/run-benchmarks-cli.mts +72 -0
- package/src/run-benchmarks-report.ts +66 -0
- package/src/run-benchmarks.test.mts +231 -0
- package/src/run-benchmarks.ts +589 -0
- package/src/smoke-structural-rollout.mts +393 -0
- package/src/swe-bench-env.test.ts +207 -0
- package/src/swe-bench-env.ts +554 -0
- package/src/swe-jail.ts +293 -0
- package/src/swe-self-improve.mts +84 -0
- package/src/swe-structural-judge-policy.test.ts +117 -0
- package/src/swe-structural-judge-policy.ts +133 -0
- package/src/swe-structural-policy.test.ts +124 -0
- package/src/swe-structural-policy.ts +132 -0
- package/src/swe-structural-provenance.test.ts +93 -0
- package/src/swe-structural-provenance.ts +138 -0
- package/src/swe-structural.mts +1260 -0
- package/src/swe-temp.ts +14 -0
- package/src/tb-container-executor.mts +234 -0
- package/src/tb-container-executor.test.mts +99 -0
- package/src/tb-supervisor-sidecar.mts +222 -0
- package/src/trata-gepa.mts +1 -1
- package/steerers/eops-itsm-population.json +1 -0
- package/tb_agents/opencode_refine_agent.py +117 -0
- package/tb_agents/opencode_router_agent.py +406 -0
- package/tb_agents/opencode_supervisor_agent.py +239 -0
- package/tb_agents/script_agent.py +66 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* HotpotQA adapter (hotpotqa/hotpot_qa, config 'distractor', split 'validation').
|
|
6
|
+
* Multi-hop factoid QA. Worker artifact = a single free-text final answer string.
|
|
7
|
+
*
|
|
8
|
+
* Judge is the official HotpotQA / SQuAD-style metric, FULLY DETERMINISTIC — no
|
|
9
|
+
* LLM. Both the predicted final answer and the gold are normalized (lowercase,
|
|
10
|
+
* strip articles a/an/the, strip punctuation, collapse whitespace), then scored
|
|
11
|
+
* by exact-match (EM) and token-level F1. resolved = EM OR F1 >= HOTPOTQA_F1_PASS
|
|
12
|
+
* (default 0.6); score = the F1 (0..1). detail carries em + f1. This gives the
|
|
13
|
+
* suite a judge that needs no model tokens at all.
|
|
14
|
+
*
|
|
15
|
+
* metadata carries the gold answer + supporting_facts (the title/sent_id pairs of
|
|
16
|
+
* the gold supporting sentences) — a SOFT retrieval signal for the loop's critic,
|
|
17
|
+
* never part of the score.
|
|
18
|
+
*
|
|
19
|
+
* Requires for a live run: the bench `.venv` with `datasets` installed + network
|
|
20
|
+
* to Hugging Face. For offline/CI verification set HOTPOTQA_FIXTURES=1 to load the
|
|
21
|
+
* committed fixtures (bench/fixtures/hotpotqa.json) — no HF download.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The official HotpotQA / SQuAD `normalize_answer`: lowercase, strip punctuation,
|
|
26
|
+
* drop articles (a/an/the), collapse whitespace. Token comparisons run on the
|
|
27
|
+
* output of this exactly as the published evaluator does.
|
|
28
|
+
*/
|
|
29
|
+
declare function normalizeAnswer(input: string): string;
|
|
30
|
+
/** Exact match on the normalized strings. */
|
|
31
|
+
declare function exactMatch(prediction: string, gold: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Token-level F1, the SQuAD/HotpotQA definition. Multiset (bag) intersection of
|
|
34
|
+
* normalized tokens. Mirrors the published evaluator's special-case handling of
|
|
35
|
+
* yes/no/noanswer and empty bags: if either side is empty, F1 is 1 only when both
|
|
36
|
+
* are empty, else 0.
|
|
37
|
+
*/
|
|
38
|
+
declare function tokenF1(prediction: string, gold: string): number;
|
|
39
|
+
/**
|
|
40
|
+
* Parse the worker artifact into the final answer string.
|
|
41
|
+
* Order: the `FINAL ANSWER:` sentinel first (deterministic-extraction discipline);
|
|
42
|
+
* fall back to the trimmed last non-empty line. Returns '' when nothing is
|
|
43
|
+
* parseable (fail-closed — never guess), which judge() counts as resolved=false.
|
|
44
|
+
*/
|
|
45
|
+
declare function parseFinalAnswer(artifact: string): string;
|
|
46
|
+
declare function createHotpotqaAdapter(): BenchmarkAdapter;
|
|
47
|
+
|
|
48
|
+
export { createHotpotqaAdapter, exactMatch, normalizeAnswer, parseFinalAnswer, tokenF1 };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createHotpotqaAdapter,
|
|
3
|
+
exactMatch,
|
|
4
|
+
normalizeAnswer,
|
|
5
|
+
parseFinalAnswer,
|
|
6
|
+
tokenF1
|
|
7
|
+
} from "../chunk-PA2ZKHJC.js";
|
|
8
|
+
export {
|
|
9
|
+
createHotpotqaAdapter,
|
|
10
|
+
exactMatch,
|
|
11
|
+
normalizeAnswer,
|
|
12
|
+
parseFinalAnswer,
|
|
13
|
+
tokenF1
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=hotpotqa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* HumanEval adapter — the deployable-checker domain as a `BenchmarkAdapter`, so the
|
|
6
|
+
* gate runner (`runGate`) can A/B the STEERING regime on it: a real rollout
|
|
7
|
+
* through the `Supervisor` that self-corrects across rounds, vs blind
|
|
8
|
+
* random@k. This is the experiment `humaneval-gate.mts` names as "the next one" —
|
|
9
|
+
* the gate measures SELECTION over stateless single completions; this measures
|
|
10
|
+
* whether observe→steer (self-correction) beats blind compute at equal k.
|
|
11
|
+
*
|
|
12
|
+
* Worker artifact = the model's reply (a Python function, fenced or raw). The
|
|
13
|
+
* DETERMINISTIC judge runs the candidate against the task's own `test` in an
|
|
14
|
+
* isolated `--network=none` python container — exit 0 = pass. No gold
|
|
15
|
+
* `canonical_solution` is ever shown to the model; `goldArtifact` returns it only
|
|
16
|
+
* to self-verify the judge before spending tokens.
|
|
17
|
+
*
|
|
18
|
+
* The primitives (loader / extractor / Docker checker) live here and are reused by
|
|
19
|
+
* `humaneval-gate.mts` — one home, no duplication.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
interface HumanEvalTask {
|
|
23
|
+
taskId: string;
|
|
24
|
+
prompt: string;
|
|
25
|
+
test: string;
|
|
26
|
+
entryPoint: string;
|
|
27
|
+
/** Reference solution body — used ONLY to self-verify the judge, never shown to the worker. */
|
|
28
|
+
canonicalSolution?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Pull the 164-task HumanEval JSONL.gz and parse it. Fail loud on a non-OK fetch
|
|
31
|
+
* or a malformed line — a silently-short task set would poison the gate. `offset`
|
|
32
|
+
* selects a deeper slice (the later tasks are harder) so the worker has a
|
|
33
|
+
* correctable middle band rather than a saturated easy prefix. */
|
|
34
|
+
declare function loadHumanEval(limit: number, offset?: number): Promise<HumanEvalTask[]>;
|
|
35
|
+
declare function basePrompt(task: HumanEvalTask): string;
|
|
36
|
+
/** Extract the function source from a model reply: prefer a fenced ```python (or
|
|
37
|
+
* bare ```) block, else fall back to the raw text. The deployable program adds the
|
|
38
|
+
* prompt header (imports + signature context), so a candidate that returns only a
|
|
39
|
+
* body still runs; a candidate that re-defines the function shadows the header. */
|
|
40
|
+
declare function extractCode(reply: string): string;
|
|
41
|
+
interface CheckResult {
|
|
42
|
+
/** {0,1} pass-count for this candidate (1 = the check() suite passed). */
|
|
43
|
+
pass: number;
|
|
44
|
+
/** On failure: the interpreter stderr tail (traceback / failing assertion). The
|
|
45
|
+
* execution-grounded feedback a self-repair loop steers on; ignored by selection. */
|
|
46
|
+
detail?: string;
|
|
47
|
+
}
|
|
48
|
+
declare function runChecker(task: HumanEvalTask, candidate: string): Promise<CheckResult>;
|
|
49
|
+
/** The HumanEval `BenchmarkAdapter`. OFFSET (env) selects the correctable middle
|
|
50
|
+
* band; loadTasks honors `limit`/`ids`. The judge is the Docker deployable checker. */
|
|
51
|
+
declare function createHumanEvalAdapter(): BenchmarkAdapter;
|
|
52
|
+
|
|
53
|
+
export { type CheckResult, type HumanEvalTask, basePrompt, createHumanEvalAdapter, extractCode, loadHumanEval, runChecker };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
basePrompt,
|
|
3
|
+
createHumanEvalAdapter,
|
|
4
|
+
extractCode,
|
|
5
|
+
loadHumanEval,
|
|
6
|
+
runChecker
|
|
7
|
+
} from "../chunk-PPYSEKFM.js";
|
|
8
|
+
export {
|
|
9
|
+
basePrompt,
|
|
10
|
+
createHumanEvalAdapter,
|
|
11
|
+
extractCode,
|
|
12
|
+
loadHumanEval,
|
|
13
|
+
runChecker
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=humaneval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Mind2Web adapter (osunlp/Multimodal-Mind2Web, split 'test_domain' by default).
|
|
6
|
+
* Web-agent ACTION PREDICTION: each task is one step of a real web task — given
|
|
7
|
+
* the natural-language goal and the page's candidate elements, the worker picks
|
|
8
|
+
* the SINGLE element to act on and the action (CLICK / TYPE / SELECT [+ value]).
|
|
9
|
+
*
|
|
10
|
+
* Judge is the published Mind2Web step metric, FULLY DETERMINISTIC — no LLM:
|
|
11
|
+
* element correct ⇔ predicted backend_node_id ∈ pos_candidates ids
|
|
12
|
+
* operation correct ⇔ op-type matches AND (TYPE/SELECT) the value matches
|
|
13
|
+
* resolved (Step-SR) ⇔ element correct AND operation correct
|
|
14
|
+
* score = 0.6·element + 0.4·operation (a gradient for the optimizer; the right
|
|
15
|
+
* element is most of the credit, mirroring Element-Acc ≫ Op as the lever)
|
|
16
|
+
* This is the low-noise reward a certifiable directive-lift needs: the number is a
|
|
17
|
+
* programmatic match against human-verified ground truth, not a judge's opinion.
|
|
18
|
+
*
|
|
19
|
+
* The worker artifact is three sentinel lines (ELEMENT / ACTION / VALUE) so the
|
|
20
|
+
* judge extracts deterministically; the prompt presents the candidate set as a
|
|
21
|
+
* choice over backend_node_id ordered by id (position uncorrelated with the answer).
|
|
22
|
+
*
|
|
23
|
+
* Each step carries the dataset's OWN page screenshot (written to a temp file by
|
|
24
|
+
* the loader); the worker drops it into a browser.<op> span so run-capsule's screen
|
|
25
|
+
* capsule turns the run into a film — the real page, not a re-rendered DOM.
|
|
26
|
+
*
|
|
27
|
+
* Requires for a live run: a python with `datasets` + `pillow` and network to
|
|
28
|
+
* Hugging Face. Point M2W_PYTHON at it (defaults to bench/.venv/bin/python).
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
interface ParsedAction {
|
|
32
|
+
elementId: string;
|
|
33
|
+
op: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
/** Parse the worker artifact's ELEMENT / ACTION / VALUE sentinel lines.
|
|
37
|
+
* Fail-closed: a missing ELEMENT or ACTION returns null (judge → resolved=false). */
|
|
38
|
+
declare function parseAction(artifact: string): ParsedAction | null;
|
|
39
|
+
declare function createMind2WebAdapter(): BenchmarkAdapter;
|
|
40
|
+
|
|
41
|
+
export { createMind2WebAdapter, parseAction };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* NoMIRACL adapter.
|
|
6
|
+
*
|
|
7
|
+
* NoMIRACL tests robustness to irrelevant retrieved passages. The worker does
|
|
8
|
+
* not generate an answer here; it classifies whether the supplied passages
|
|
9
|
+
* contain enough evidence to answer the query. This directly measures false
|
|
10
|
+
* positive / false negative behavior for RAG abstention.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare function createNoMiraclAdapter(): BenchmarkAdapter;
|
|
14
|
+
|
|
15
|
+
export { createNoMiraclAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Open RAG Bench adapter.
|
|
6
|
+
*
|
|
7
|
+
* This targets Vectara-style Open RAG Bench exports over PDF-derived text,
|
|
8
|
+
* table, and image contexts. The deterministic judge scores final-answer
|
|
9
|
+
* agreement and surfaces modality/document metadata for diagnostics.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
declare function createOpenRagBenchAdapter(): BenchmarkAdapter;
|
|
13
|
+
|
|
14
|
+
export { createOpenRagBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ProgramBench adapter (facebookresearch/ProgramBench) — cleanroom
|
|
6
|
+
* reverse-engineering: rebuild a black-box executable's behavior from scratch.
|
|
7
|
+
* The agent is given only the gold `./executable` (run-only) + stripped docs and
|
|
8
|
+
* must produce a `submission.tar.gz` whose `./compile.sh` builds an `./executable`
|
|
9
|
+
* with identical observable behavior. Judge = the official `programbench`
|
|
10
|
+
* harness: it extracts the submission, runs compile.sh in the per-task cleanroom
|
|
11
|
+
* Docker image, then runs the HIDDEN behavioral pytest suites (pulled via
|
|
12
|
+
* `programbench blob sync`). Score = fraction of non-ignored tests passed
|
|
13
|
+
* (GRADED, applying the tests.json ignore mask); resolved = all non-ignored tests
|
|
14
|
+
* pass. Fully deterministic — no LLM judge.
|
|
15
|
+
*
|
|
16
|
+
* OutputAdapter is stream-only, so the worker emits its codebase as fenced
|
|
17
|
+
* `path:`-prefixed file blocks (including compile.sh); the adapter materializes
|
|
18
|
+
* those into submission.tar.gz. Test execution is delegated to the real
|
|
19
|
+
* `programbench eval`/`info` harness — pytest scoring + the ignore mask are NOT
|
|
20
|
+
* reimplemented here.
|
|
21
|
+
*
|
|
22
|
+
* Requires for a live run: the bench `.venv` with `programbench` installed +
|
|
23
|
+
* Docker on linux/amd64 (per-task `<image>:task_cleanroom` images) + HF access for
|
|
24
|
+
* the hidden test blobs. For offline/CI listing set PROGRAMBENCH_FIXTURES=1 to load
|
|
25
|
+
* the committed instance ids (bench/fixtures/programbench.json); judging still
|
|
26
|
+
* needs the harness + Docker and fails loud without them — never a fabricated score.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Parse the worker stream into the submission text the driver materializes: the
|
|
31
|
+
* concatenation of every ```path:<p>``` fenced block. Passed through verbatim to
|
|
32
|
+
* the python driver, which tars it. Empty when the worker emitted no file block
|
|
33
|
+
* (fail-closed → the harness scores a missing compile.sh as 0).
|
|
34
|
+
*/
|
|
35
|
+
declare const programbenchSubmissionOutput: OutputAdapter<string>;
|
|
36
|
+
declare function createProgrambenchAdapter(): BenchmarkAdapter;
|
|
37
|
+
|
|
38
|
+
export { createProgrambenchAdapter, programbenchSubmissionOutput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchScore, BenchTask, LoadOptions } from './types.js';
|
|
3
|
+
|
|
4
|
+
declare const FINAL_ANSWER_SENTINEL = "FINAL ANSWER:";
|
|
5
|
+
interface RagContext {
|
|
6
|
+
id: string;
|
|
7
|
+
text: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
source?: string;
|
|
10
|
+
relevant?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface RagAnswerScore {
|
|
13
|
+
resolved: boolean;
|
|
14
|
+
score: number;
|
|
15
|
+
finalAnswer: string;
|
|
16
|
+
bestGold: string | null;
|
|
17
|
+
exact: boolean;
|
|
18
|
+
numeric: boolean;
|
|
19
|
+
f1: number;
|
|
20
|
+
threshold: number;
|
|
21
|
+
}
|
|
22
|
+
declare const ragAnswerOutput: OutputAdapter<string>;
|
|
23
|
+
declare function parseFinalAnswer(artifact: string): string;
|
|
24
|
+
declare function parseCitations(artifact: string): string[];
|
|
25
|
+
declare function normalizeAnswer(input: string): string;
|
|
26
|
+
declare function tokenF1(candidate: string, gold: string): number;
|
|
27
|
+
declare function scoreAnswerArtifact(artifact: string, golds: readonly string[], options?: {
|
|
28
|
+
threshold?: number;
|
|
29
|
+
numericTolerance?: number;
|
|
30
|
+
}): RagAnswerScore;
|
|
31
|
+
declare function answerScoreToBenchScore(score: RagAnswerScore, detail: Record<string, unknown>): BenchScore;
|
|
32
|
+
declare function readJsonRows(path: string): Promise<unknown[]>;
|
|
33
|
+
declare function selectTasks(tasks: BenchTask[], opts: LoadOptions, label: string): BenchTask[];
|
|
34
|
+
declare function stringFrom(value: unknown): string | undefined;
|
|
35
|
+
declare function stringArrayFrom(value: unknown): string[];
|
|
36
|
+
declare function firstString(row: Record<string, unknown>, keys: readonly string[]): string;
|
|
37
|
+
declare function allStrings(row: Record<string, unknown>, keys: readonly string[]): string[];
|
|
38
|
+
declare function contextsFrom(value: unknown): RagContext[];
|
|
39
|
+
declare function contextBlock(contexts: readonly RagContext[]): string;
|
|
40
|
+
declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
41
|
+
|
|
42
|
+
export { FINAL_ANSWER_SENTINEL, type RagAnswerScore, type RagContext, allStrings, answerScoreToBenchScore, contextBlock, contextsFrom, firstString, isObject, normalizeAnswer, parseCitations, parseFinalAnswer, ragAnswerOutput, readJsonRows, scoreAnswerArtifact, selectTasks, stringArrayFrom, stringFrom, tokenF1 };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FINAL_ANSWER_SENTINEL,
|
|
3
|
+
allStrings,
|
|
4
|
+
answerScoreToBenchScore,
|
|
5
|
+
contextBlock,
|
|
6
|
+
contextsFrom,
|
|
7
|
+
firstString,
|
|
8
|
+
isObject,
|
|
9
|
+
normalizeAnswer,
|
|
10
|
+
parseCitations,
|
|
11
|
+
parseFinalAnswer,
|
|
12
|
+
ragAnswerOutput,
|
|
13
|
+
readJsonRows,
|
|
14
|
+
scoreAnswerArtifact,
|
|
15
|
+
selectTasks,
|
|
16
|
+
stringArrayFrom,
|
|
17
|
+
stringFrom,
|
|
18
|
+
tokenF1
|
|
19
|
+
} from "../chunk-X3BTXCJ4.js";
|
|
20
|
+
export {
|
|
21
|
+
FINAL_ANSWER_SENTINEL,
|
|
22
|
+
allStrings,
|
|
23
|
+
answerScoreToBenchScore,
|
|
24
|
+
contextBlock,
|
|
25
|
+
contextsFrom,
|
|
26
|
+
firstString,
|
|
27
|
+
isObject,
|
|
28
|
+
normalizeAnswer,
|
|
29
|
+
parseCitations,
|
|
30
|
+
parseFinalAnswer,
|
|
31
|
+
ragAnswerOutput,
|
|
32
|
+
readJsonRows,
|
|
33
|
+
scoreAnswerArtifact,
|
|
34
|
+
selectTasks,
|
|
35
|
+
stringArrayFrom,
|
|
36
|
+
stringFrom,
|
|
37
|
+
tokenF1
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=rag-shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* RAGBench-compatible adapter.
|
|
6
|
+
*
|
|
7
|
+
* Live mode expects a local JSON/JSONL export from rungalileo/ragbench or a
|
|
8
|
+
* compatible table. Rows must carry a query and at least one reference answer.
|
|
9
|
+
* Contexts, TRACe labels, and source metadata are preserved in task metadata
|
|
10
|
+
* for diagnostics; the deterministic judge scores the worker's final answer
|
|
11
|
+
* against the reference answer(s).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
declare function createRagBenchAdapter(): BenchmarkAdapter;
|
|
15
|
+
|
|
16
|
+
export { createRagBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* SimpleQA adapter (OpenAI simple-evals; short-form factual QA). Worker artifact
|
|
6
|
+
* = a single free-text final answer string (optionally preceded by a CITATIONS:
|
|
7
|
+
* block). Each item ships a short gold `answer` plus metadata (topic,
|
|
8
|
+
* answer_type, source urls).
|
|
9
|
+
*
|
|
10
|
+
* Judge is the official SimpleQA grader — an LLM classifier that maps
|
|
11
|
+
* (question, gold target, predicted answer) to exactly one of:
|
|
12
|
+
* A = CORRECT — fully contains the gold, no contradiction
|
|
13
|
+
* B = INCORRECT — contradicts / contains a different factual value
|
|
14
|
+
* C = NOT_ATTEMPTED — hedged, non-committal, or no value given
|
|
15
|
+
* resolved = (grade == CORRECT). score = 1 for CORRECT else 0. The grade letter
|
|
16
|
+
* (with its label) rides in `detail`; NOT_ATTEMPTED is surfaced distinctly from
|
|
17
|
+
* INCORRECT so the scorecard can separate abstention from error.
|
|
18
|
+
*
|
|
19
|
+
* There is no deterministic tier: SimpleQA's rubric (containment + abstention)
|
|
20
|
+
* is the grader's job by design, so judge() always calls the pinned grader model
|
|
21
|
+
* (temperature 0) and fails loud on unparseable grader output. The final-answer
|
|
22
|
+
* extraction IS deterministic (FINAL ANSWER: sentinel, fail-closed to '').
|
|
23
|
+
*
|
|
24
|
+
* Requires for a live run: the bench `.venv` with `datasets`/`requests` not
|
|
25
|
+
* needed — the test set is a single public CSV fetched over HTTP — plus a
|
|
26
|
+
* grader key (TANGLE_API_KEY). For offline/CI verification set
|
|
27
|
+
* SIMPLEQA_FIXTURES=1 to load the committed fixtures
|
|
28
|
+
* (bench/fixtures/simpleqa.json) — no network.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Typed seam for the research worker. The benchmark adapter scores a plain
|
|
33
|
+
* `string` artifact (the BenchmarkAdapter contract); the loop worker decodes its
|
|
34
|
+
* agent runs into a {@link ResearchAnswer} and serializes `finalAnswer` (+ an
|
|
35
|
+
* optional `CITATIONS:` block) into that string before judging.
|
|
36
|
+
*/
|
|
37
|
+
interface ResearchTask {
|
|
38
|
+
id: string;
|
|
39
|
+
question: string;
|
|
40
|
+
/** Gold short answer — the grader's target. */
|
|
41
|
+
gold: string;
|
|
42
|
+
/** Source URLs cited by the dataset for this item — SOFT provenance signal, never a hard gate. */
|
|
43
|
+
goldSources: string[];
|
|
44
|
+
/** SimpleQA topic, e.g. 'Politics' — slices the scorecard by domain. */
|
|
45
|
+
topic: string;
|
|
46
|
+
/** SimpleQA answer_type, e.g. 'Person' | 'Date' | 'Number' | 'Place'. */
|
|
47
|
+
answerType: string;
|
|
48
|
+
}
|
|
49
|
+
interface ResearchAnswer {
|
|
50
|
+
finalAnswer: string;
|
|
51
|
+
citations: string[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Parse the worker artifact into the final answer string.
|
|
55
|
+
* Order: the `FINAL ANSWER:` sentinel first (deterministic-extraction discipline);
|
|
56
|
+
* fall back to the last non-empty line. Returns '' when nothing is parseable
|
|
57
|
+
* (fail-closed — never guess); judge() grades '' as NOT_ATTEMPTED.
|
|
58
|
+
*/
|
|
59
|
+
declare function parseFinalAnswer(artifact: string): string;
|
|
60
|
+
/** Extract every bare URL in the artifact (CITATIONS: block + inline). SOFT provenance signal. */
|
|
61
|
+
declare function parseCitations(artifact: string): string[];
|
|
62
|
+
declare function createSimpleQaAdapter(): BenchmarkAdapter;
|
|
63
|
+
|
|
64
|
+
export { type ResearchAnswer, type ResearchTask, createSimpleQaAdapter, parseCitations, parseFinalAnswer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { StagedRunCaptureSpec } from './_harness.js';
|
|
3
|
+
import { BenchmarkAdapter, BenchScore } from './types.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* SWE-bench Verified adapter. Worker artifact = a unified-diff patch. Judge =
|
|
7
|
+
* the official `swebench` harness: apply the patch in the instance's Docker
|
|
8
|
+
* image, run FAIL_TO_PASS + PASS_TO_PASS, report `resolved`. Fully deterministic
|
|
9
|
+
* — no LLM judge.
|
|
10
|
+
*
|
|
11
|
+
* Requires: the bench `.venv` with `swebench` installed + a running Docker
|
|
12
|
+
* daemon (per-instance images are pulled/built on first run).
|
|
13
|
+
*
|
|
14
|
+
* Process/Docker/report plumbing is shared via ./_harness; this file owns the
|
|
15
|
+
* SWE-specific pieces: the patch OutputAdapter, the dataset dump, and the
|
|
16
|
+
* predictions-file → run_evaluation argv → report-shape mapping.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The SWE deliverable's FALLBACK parser, from the agent's event STREAM.
|
|
21
|
+
*
|
|
22
|
+
* The PRIMARY deliverable is `boxExtract` below: a `git diff` of the agent's
|
|
23
|
+
* actual edits, read from the cloned repo's STATE inside the box (standard
|
|
24
|
+
* SWE-bench practice). This event-stream parse only runs when that diff is empty
|
|
25
|
+
* — a model that edited the source correctly but never printed a fenced diff (the
|
|
26
|
+
* exact failure this replaces) still scores off its real changes, not its prose.
|
|
27
|
+
*/
|
|
28
|
+
declare const swePatchOutput: OutputAdapter<string>;
|
|
29
|
+
type SweBenchCacheLevel = 'none' | 'base' | 'env' | 'instance';
|
|
30
|
+
interface SweBenchArtifactCaptureContext {
|
|
31
|
+
readonly taskId: string;
|
|
32
|
+
readonly runId: string;
|
|
33
|
+
/** One-based sequence unique within this adapter instance. */
|
|
34
|
+
readonly attemptSequence: number;
|
|
35
|
+
}
|
|
36
|
+
interface SweBenchAdapterOptions {
|
|
37
|
+
readonly timeoutMs?: number;
|
|
38
|
+
readonly cacheLevel?: SweBenchCacheLevel;
|
|
39
|
+
/**
|
|
40
|
+
* Return a unique destination for any attempt whose complete official
|
|
41
|
+
* evaluator directory and process logs should be retained.
|
|
42
|
+
*/
|
|
43
|
+
readonly captureEvaluatorArtifacts?: (context: SweBenchArtifactCaptureContext) => StagedRunCaptureSpec | undefined;
|
|
44
|
+
}
|
|
45
|
+
/** Convert one official report into a score without turning evaluator failures into agent failures. */
|
|
46
|
+
declare function scoreSweReport(taskId: string, value: unknown): BenchScore;
|
|
47
|
+
declare function sweEvaluationArgv(args: {
|
|
48
|
+
readonly predictionsPath: string;
|
|
49
|
+
readonly runId: string;
|
|
50
|
+
readonly instanceId: string;
|
|
51
|
+
readonly cacheLevel: SweBenchCacheLevel;
|
|
52
|
+
readonly namespace?: 'swebench' | 'none';
|
|
53
|
+
}): string[];
|
|
54
|
+
declare function createSweBenchAdapter(options?: SweBenchAdapterOptions): BenchmarkAdapter;
|
|
55
|
+
|
|
56
|
+
export { type SweBenchAdapterOptions, type SweBenchArtifactCaptureContext, type SweBenchCacheLevel, createSweBenchAdapter, scoreSweReport, sweEvaluationArgv, swePatchOutput };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSweBenchAdapter,
|
|
3
|
+
scoreSweReport,
|
|
4
|
+
sweEvaluationArgv,
|
|
5
|
+
swePatchOutput
|
|
6
|
+
} from "../chunk-CKUVRZ2T.js";
|
|
7
|
+
import "../chunk-LRRD7NAG.js";
|
|
8
|
+
export {
|
|
9
|
+
createSweBenchAdapter,
|
|
10
|
+
scoreSweReport,
|
|
11
|
+
sweEvaluationArgv,
|
|
12
|
+
swePatchOutput
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=swe-bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* T2-RAGBench adapter.
|
|
6
|
+
*
|
|
7
|
+
* T2-RAGBench stresses text+table retrieval and numerical reasoning over
|
|
8
|
+
* financial documents. The judge uses the shared deterministic answer scorer
|
|
9
|
+
* with numeric tolerance enabled by default.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
declare function createT2RagBenchAdapter(): BenchmarkAdapter;
|
|
13
|
+
|
|
14
|
+
export { createT2RagBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared tau-bench adapter spine.
|
|
6
|
+
*
|
|
7
|
+
* tau2 and tau3 live in the same upstream repository/package namespace today:
|
|
8
|
+
* `sierra-research/tau2-bench`, Python package `tau2`. Keep one implementation
|
|
9
|
+
* for task loading and reward recomputation so the domain/version adapters only
|
|
10
|
+
* choose env names, default domain, and fixture file.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
interface TauBenchConfig {
|
|
14
|
+
name: string;
|
|
15
|
+
fixturePath: string;
|
|
16
|
+
fixturesEnv: string;
|
|
17
|
+
dirEnv: string;
|
|
18
|
+
domainEnv: string;
|
|
19
|
+
defaultDomain: string;
|
|
20
|
+
installHint: string;
|
|
21
|
+
taskIntro: string;
|
|
22
|
+
}
|
|
23
|
+
declare const tauResultsOutput: OutputAdapter<string>;
|
|
24
|
+
declare function createTauBenchAdapter(config: TauBenchConfig): BenchmarkAdapter;
|
|
25
|
+
|
|
26
|
+
export { type TauBenchConfig, createTauBenchAdapter, tauResultsOutput };
|