@tangle-network/agent-eval 0.182.0 → 0.184.0
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 +32 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-cell-s__adRnK.d.ts → agent-profile-cell-BHcB-mZX.d.ts} +8 -9
- package/dist/{agent-profile-cell-s__adRnK.d.ts.map → agent-profile-cell-BHcB-mZX.d.ts.map} +1 -1
- package/dist/{agent-profile-cell-Cv6UA-W_.js → agent-profile-cell-DcFW4vOc.js} +16 -15
- package/dist/agent-profile-cell-DcFW4vOc.js.map +1 -0
- package/dist/{agent-profile-CivaSsSy.d.ts → agent-profile-uAIQK3Nr.d.ts} +3 -3
- package/dist/{agent-profile-CivaSsSy.d.ts.map → agent-profile-uAIQK3Nr.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +10 -10
- package/dist/analyst/index.js +10 -9
- package/dist/analyst/index.js.map +1 -1
- package/dist/{benchmark-DQKzykkO.js → benchmark-BeQJyrRC.js} +3 -3
- package/dist/{benchmark-DQKzykkO.js.map → benchmark-BeQJyrRC.js.map} +1 -1
- package/dist/{benchmark-command-7X7HPNHh.js → benchmark-command-DlSePljH.js} +16 -15
- package/dist/{benchmark-command-7X7HPNHh.js.map → benchmark-command-DlSePljH.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +4 -4
- package/dist/benchmarks/index.js +3 -3
- package/dist/builder-eval/index.js +1 -1
- package/dist/campaign/index.d.ts +6 -5
- package/dist/campaign/index.js +9 -9
- package/dist/{campaign-B2U7WcFz.js → campaign-D6puiGFO.js} +16 -16
- package/dist/{campaign-B2U7WcFz.js.map → campaign-D6puiGFO.js.map} +1 -1
- package/dist/{campaign-evidence-PYPUftRy.js → campaign-evidence-aWEmfROB.js} +5 -5
- package/dist/{campaign-evidence-PYPUftRy.js.map → campaign-evidence-aWEmfROB.js.map} +1 -1
- package/dist/{canonical-DPyQ_rpt.js → canonical-BsZVgBhW.js} +2 -4
- package/dist/canonical-BsZVgBhW.js.map +1 -0
- package/dist/{chat-client-CkmjYlfB.js → chat-client-DqPqWzVV.js} +2 -2
- package/dist/{chat-client-CkmjYlfB.js.map → chat-client-DqPqWzVV.js.map} +1 -1
- package/dist/{chat-json-call-B_Xv2oJK.js → chat-json-call-C-DnDxEy.js} +2 -2
- package/dist/{chat-json-call-B_Xv2oJK.js.map → chat-json-call-C-DnDxEy.js.map} +1 -1
- package/dist/cli.js +4 -4
- package/dist/{client-kh2jOjTK.d.ts → client-Bc8LANCG.d.ts} +4 -4
- package/dist/{client-kh2jOjTK.d.ts.map → client-Bc8LANCG.d.ts.map} +1 -1
- package/dist/contract/index.d.ts +10 -10
- package/dist/contract/index.js +17 -17
- package/dist/{cost-ledger-B1qx30B4.js → cost-ledger-_IbkejCF.js} +2 -2
- package/dist/{cost-ledger-B1qx30B4.js.map → cost-ledger-_IbkejCF.js.map} +1 -1
- package/dist/{default-registry-DHWwIwa8.js → default-registry-CpLko4jB.js} +5 -4
- package/dist/{default-registry-DHWwIwa8.js.map → default-registry-CpLko4jB.js.map} +1 -1
- package/dist/{default-registry-BwDSWVzg.d.ts → default-registry-DYB4aHVn.d.ts} +6 -6
- package/dist/{default-registry-BwDSWVzg.d.ts.map → default-registry-DYB4aHVn.d.ts.map} +1 -1
- package/dist/{define-agent-eval-CwOWWQt_.d.ts → define-agent-eval-DE67ECH1.d.ts} +7 -7
- package/dist/{define-agent-eval-CwOWWQt_.d.ts.map → define-agent-eval-DE67ECH1.d.ts.map} +1 -1
- package/dist/{define-agent-eval-DSIPB4hi.js → define-agent-eval-RTekxhUE.js} +8 -8
- package/dist/{define-agent-eval-DSIPB4hi.js.map → define-agent-eval-RTekxhUE.js.map} +1 -1
- package/dist/{dspy-rlm-engine-S53V0HhE.js → dspy-rlm-engine-Da-l3CpD.js} +4 -4
- package/dist/{dspy-rlm-engine-S53V0HhE.js.map → dspy-rlm-engine-Da-l3CpD.js.map} +1 -1
- package/dist/{engine-DS1cysJy.d.ts → engine-D1ykrAKR.d.ts} +7 -7
- package/dist/{engine-DS1cysJy.d.ts.map → engine-D1ykrAKR.d.ts.map} +1 -1
- package/dist/{eval-campaign-CCEkwzoH.js → eval-campaign-XFHEpN86.js} +4 -4
- package/dist/{eval-campaign-CCEkwzoH.js.map → eval-campaign-XFHEpN86.js.map} +1 -1
- package/dist/evaluation.d.ts +75 -0
- package/dist/evaluation.d.ts.map +1 -0
- package/dist/evaluation.js +137 -0
- package/dist/evaluation.js.map +1 -0
- package/dist/{exact-types-BZDe0W2D.d.ts → exact-types-BEHN7tnq.d.ts} +2 -2
- package/dist/{exact-types-BZDe0W2D.d.ts.map → exact-types-BEHN7tnq.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +2 -2
- package/dist/experiment/index.js +5 -5
- package/dist/{experiment-tracker-C7PfnF4b.d.ts → experiment-tracker-URRGP9ek.d.ts} +2 -2
- package/dist/{experiment-tracker-C7PfnF4b.d.ts.map → experiment-tracker-URRGP9ek.d.ts.map} +1 -1
- package/dist/{exporters-Df7TgHFv.js → exporters-DEcXbvgO.js} +12 -4
- package/dist/exporters-DEcXbvgO.js.map +1 -0
- package/dist/{external-optimizer-process-QDRURJAM.js → external-optimizer-process-BbhvXTFx.js} +4 -4
- package/dist/{external-optimizer-process-QDRURJAM.js.map → external-optimizer-process-BbhvXTFx.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-D4dzUBZI.js → external-optimizer-subprocess-DMgmqTB6.js} +5 -5
- package/dist/{external-optimizer-subprocess-D4dzUBZI.js.map → external-optimizer-subprocess-DMgmqTB6.js.map} +1 -1
- package/dist/{feedback-trajectory-CXmtITBo.d.ts → feedback-trajectory-CytTR7u4.d.ts} +3 -3
- package/dist/{feedback-trajectory-CXmtITBo.d.ts.map → feedback-trajectory-CytTR7u4.d.ts.map} +1 -1
- package/dist/fuzz.js +1 -1
- package/dist/{hf-dataset-D8_RNIis.js → hf-dataset-CRqtSjnR.js} +2 -2
- package/dist/{hf-dataset-D8_RNIis.js.map → hf-dataset-CRqtSjnR.js.map} +1 -1
- package/dist/hosted/index.d.ts +2 -2
- package/dist/{index-DoykkxW0.d.ts → index-58wex7KV.d.ts} +11 -11
- package/dist/{index-DoykkxW0.d.ts.map → index-58wex7KV.d.ts.map} +1 -1
- package/dist/{index-CJ3LhKIX.d.ts → index-CKZa_rnt.d.ts} +4 -271
- package/dist/index-CKZa_rnt.d.ts.map +1 -0
- package/dist/{index-DbG8QbH9.d.ts → index-DVrtLO5j.d.ts} +6 -6
- package/dist/{index-DbG8QbH9.d.ts.map → index-DVrtLO5j.d.ts.map} +1 -1
- package/dist/{index-Bp_6sj3x.d.ts → index-ww8736Am.d.ts} +20 -315
- package/dist/index-ww8736Am.d.ts.map +1 -0
- package/dist/index.d.ts +23 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -29
- package/dist/{insight-report-D1qa0HWs.d.ts → insight-report-C3Bfl762.d.ts} +3 -3
- package/dist/{insight-report-D1qa0HWs.d.ts.map → insight-report-C3Bfl762.d.ts.map} +1 -1
- package/dist/jev-protocol.d.ts +74 -0
- package/dist/jev-protocol.d.ts.map +1 -0
- package/dist/jev-protocol.js +91 -0
- package/dist/jev-protocol.js.map +1 -0
- package/dist/jev.d.ts +131 -0
- package/dist/jev.d.ts.map +1 -0
- package/dist/jev.js +312 -0
- package/dist/jev.js.map +1 -0
- package/dist/{journal-Cs9f7385.js → journal-BuRLm6ho.js} +2 -2
- package/dist/{journal-Cs9f7385.js.map → journal-BuRLm6ho.js.map} +1 -1
- package/dist/{kind-factory-D5HOW3R0.js → kind-factory-DE088Zhv.js} +5 -4
- package/dist/{kind-factory-D5HOW3R0.js.map → kind-factory-DE088Zhv.js.map} +1 -1
- package/dist/ledger-core/index.js +2 -2
- package/dist/{llm-client-CGlSi8sb.js → llm-client-DDhZ29Vm.js} +2 -2
- package/dist/{llm-client-CGlSi8sb.js.map → llm-client-DDhZ29Vm.js.map} +1 -1
- package/dist/{llm-judge-BPFR12VJ.js → llm-judge-C5wbADA5.js} +11 -11
- package/dist/{llm-judge-BPFR12VJ.js.map → llm-judge-C5wbADA5.js.map} +1 -1
- package/dist/{matrix-CyhW-vgJ.d.ts → matrix-CPKsRY8Y.d.ts} +2 -2
- package/dist/{matrix-CyhW-vgJ.d.ts.map → matrix-CPKsRY8Y.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +54 -2
- package/dist/meta-eval/index.d.ts.map +1 -1
- package/dist/meta-eval/index.js +52 -3
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/{metrics-Qv-cpptD.js → metrics-DOMpkoeb.js} +5 -1
- package/dist/metrics-DOMpkoeb.js.map +1 -0
- package/dist/{mint-ySIIkKlV.js → mint-B4zgSAJW.js} +63 -14
- package/dist/mint-B4zgSAJW.js.map +1 -0
- package/dist/mint-BI14xehJ.d.ts +285 -0
- package/dist/mint-BI14xehJ.d.ts.map +1 -0
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/multishot/index.js +1 -1
- package/dist/openapi.json +1 -1
- package/dist/pipelines/index.js +2 -2
- package/dist/{produced-state-CkoG43gI.js → produced-state-D3uWsY8t.js} +25 -21
- package/dist/{produced-state-CkoG43gI.js.map → produced-state-D3uWsY8t.js.map} +1 -1
- package/dist/profile-cell.d.ts +1 -1
- package/dist/profile-cell.js +1 -1
- package/dist/{promotion-policy-BKFrl7CC.js → promotion-policy-CD-bUeyR.js} +3 -3
- package/dist/{promotion-policy-BKFrl7CC.js.map → promotion-policy-CD-bUeyR.js.map} +1 -1
- package/dist/{query-D1nLIKt7.js → query-DlV0pdx4.js} +2 -2
- package/dist/{query-D1nLIKt7.js.map → query-DlV0pdx4.js.map} +1 -1
- package/dist/{registry-BRbB6Y0v.d.ts → registry-D5Ly3GRV.d.ts} +3 -3
- package/dist/{registry-BRbB6Y0v.d.ts.map → registry-D5Ly3GRV.d.ts.map} +1 -1
- package/dist/{release-confidence-BcqeQTHW.d.ts → release-confidence-DsETiO4f.d.ts} +3 -3
- package/dist/{release-confidence-BcqeQTHW.d.ts.map → release-confidence-DsETiO4f.d.ts.map} +1 -1
- package/dist/{release-confidence-DMg8n18l.js → release-confidence-RanRUXRW.js} +2 -2
- package/dist/{release-confidence-DMg8n18l.js.map → release-confidence-RanRUXRW.js.map} +1 -1
- package/dist/reporting.d.ts +3 -3
- package/dist/reporting.js +2 -2
- package/dist/{researcher-64T49THL.d.ts → researcher-CJkH-6Ty.d.ts} +4 -4
- package/dist/{researcher-64T49THL.d.ts.map → researcher-CJkH-6Ty.d.ts.map} +1 -1
- package/dist/{reward-hacking-uzO_ihep.d.ts → reward-hacking-BIQ2BWLG.d.ts} +2 -2
- package/dist/{reward-hacking-uzO_ihep.d.ts.map → reward-hacking-BIQ2BWLG.d.ts.map} +1 -1
- package/dist/rl.d.ts +35 -40
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +79 -61
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +2 -1
- package/dist/rollout/index.js +4 -4
- package/dist/{rollout-BsN6pOU7.js → rollout-C0Ifk3vK.js} +4 -4
- package/dist/{rollout-BsN6pOU7.js.map → rollout-C0Ifk3vK.js.map} +1 -1
- package/dist/{rubric-predictive-validity-Bmj2_cll.d.ts → rubric-predictive-validity-CTU8y8Cv.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-Bmj2_cll.d.ts.map → rubric-predictive-validity-CTU8y8Cv.d.ts.map} +1 -1
- package/dist/{run-record-DPa2PeHx.js → run-record-BhMVsHR1.js} +2 -2
- package/dist/{run-record-DPa2PeHx.js.map → run-record-BhMVsHR1.js.map} +1 -1
- package/dist/{run-record-BiTWauyO.d.ts → run-record-D9wS35fK.d.ts} +2 -2
- package/dist/{run-record-BiTWauyO.d.ts.map → run-record-D9wS35fK.d.ts.map} +1 -1
- package/dist/{run-record-DualPTn2.js → run-record-tg_5H2IK.js} +2 -2
- package/dist/{run-record-DualPTn2.js.map → run-record-tg_5H2IK.js.map} +1 -1
- package/dist/search-ledger-types-D7KDVg-o.d.ts +302 -0
- package/dist/search-ledger-types-D7KDVg-o.d.ts.map +1 -0
- package/dist/{semantic-concept-judge-Bm5JDEKO.js → semantic-concept-judge-5r9hDEBA.js} +7 -7
- package/dist/{semantic-concept-judge-Bm5JDEKO.js.map → semantic-concept-judge-5r9hDEBA.js.map} +1 -1
- package/dist/{sequential-D_xHrBZe.js → sequential-BfDkCBGo.js} +3 -3
- package/dist/{sequential-D_xHrBZe.js.map → sequential-BfDkCBGo.js.map} +1 -1
- package/dist/{server-D_cjseFN.js → server-DmpcFiVK.js} +4 -4
- package/dist/{server-D_cjseFN.js.map → server-DmpcFiVK.js.map} +1 -1
- package/dist/{skillopt-optimization-method-B2IEaCeF.js → skillopt-optimization-method-B2zxoDk0.js} +8 -8
- package/dist/{skillopt-optimization-method-B2IEaCeF.js.map → skillopt-optimization-method-B2zxoDk0.js.map} +1 -1
- package/dist/{statistical-heldout-CpVd6FmY.d.ts → statistical-heldout-Bu4oNOJh.d.ts} +3 -3
- package/dist/{statistical-heldout-CpVd6FmY.d.ts.map → statistical-heldout-Bu4oNOJh.d.ts.map} +1 -1
- package/dist/{store-otlp-DWGUwlyj.js → store-otlp-rU5PFlOB.js} +2 -2
- package/dist/{store-otlp-DWGUwlyj.js.map → store-otlp-rU5PFlOB.js.map} +1 -1
- package/dist/{store-tool-spans-Dt-YdAuE.d.ts → store-tool-spans-DwdokbHg.d.ts} +54 -6
- package/dist/store-tool-spans-DwdokbHg.d.ts.map +1 -0
- package/dist/{store-tool-spans-ceJoiUgS.js → store-tool-spans-zrtftcRe.js} +68 -6
- package/dist/store-tool-spans-zrtftcRe.js.map +1 -0
- package/dist/{summary-report-IGAOtgPd.js → summary-report-BMvou2oZ.js} +2 -2
- package/dist/{summary-report-IGAOtgPd.js.map → summary-report-BMvou2oZ.js.map} +1 -1
- package/dist/{summary-report-D1h4dlrK.d.ts → summary-report-BzFS5UhZ.d.ts} +2 -2
- package/dist/{summary-report-D1h4dlrK.d.ts.map → summary-report-BzFS5UhZ.d.ts.map} +1 -1
- package/dist/{task-failure-attributes-B072KO_n.js → task-failure-attributes-BOxjfbhr.js} +2 -2
- package/dist/{task-failure-attributes-B072KO_n.js.map → task-failure-attributes-BOxjfbhr.js.map} +1 -1
- package/dist/{tool-groups-B2bSNaJB.d.ts → tool-groups-qHMydbAH.d.ts} +3 -3
- package/dist/tool-groups-qHMydbAH.d.ts.map +1 -0
- package/dist/{tool-waste-C7MU9u1e.js → tool-waste-nbHPAxei.js} +2 -2
- package/dist/{tool-waste-C7MU9u1e.js.map → tool-waste-nbHPAxei.js.map} +1 -1
- package/dist/trace-repair/index.d.ts +2 -2
- package/dist/trace-repair/index.js +3 -3
- package/dist/traces.d.ts +5 -5
- package/dist/traces.js +7 -7
- package/dist/trajectory-replay/index.js +1 -1
- package/dist/{types-CS0qk_Yp.d.ts → types-BTRcIqFr.d.ts} +3 -3
- package/dist/{types-CS0qk_Yp.d.ts.map → types-BTRcIqFr.d.ts.map} +1 -1
- package/dist/{types-D7gEdPoQ.d.ts → types-BjB2wZM9.d.ts} +2 -2
- package/dist/{types-D7gEdPoQ.d.ts.map → types-BjB2wZM9.d.ts.map} +1 -1
- package/dist/types-C8VBbiw6.js +91 -0
- package/dist/types-C8VBbiw6.js.map +1 -0
- package/dist/{types-BvZoPTGa.d.ts → types-c3ZRTbw9.d.ts} +3 -3
- package/dist/{types-BvZoPTGa.d.ts.map → types-c3ZRTbw9.d.ts.map} +1 -1
- package/dist/{types-DQ0e2E7y.js → usage-receipt-Cx3xNeyB.js} +2 -89
- package/dist/usage-receipt-Cx3xNeyB.js.map +1 -0
- package/dist/{verdict-BQ3pCFf8.js → verdict-DhPoXApk.js} +2 -2
- package/dist/{verdict-BQ3pCFf8.js.map → verdict-DhPoXApk.js.map} +1 -1
- package/dist/{verdict-cache-B3eCVQtY.js → verdict-cache-BQEsVy9n.js} +2 -2
- package/dist/{verdict-cache-B3eCVQtY.js.map → verdict-cache-BQEsVy9n.js.map} +1 -1
- package/dist/wire/index.d.ts +1 -1
- package/dist/wire/index.js +1 -1
- package/docs/changes/evaluation-definition-identity.md +27 -0
- package/docs/changes/jev-evidence-review.md +18 -0
- package/docs/changes/jev-product-adoption.md +18 -0
- package/docs/changes/probability-policy-audit.md +81 -0
- package/docs/jev-behavior-review.md +174 -0
- package/docs/jev-integrations.md +50 -0
- package/docs/jev.md +140 -0
- package/docs/produced-state.md +13 -0
- package/docs/profile-json-identity.md +33 -0
- package/docs/public-api.md +111 -95
- package/package.json +16 -1
- package/dist/agent-profile-cell-Cv6UA-W_.js.map +0 -1
- package/dist/canonical-DPyQ_rpt.js.map +0 -1
- package/dist/exporters-Df7TgHFv.js.map +0 -1
- package/dist/index-Bp_6sj3x.d.ts.map +0 -1
- package/dist/index-CJ3LhKIX.d.ts.map +0 -1
- package/dist/metrics-Qv-cpptD.js.map +0 -1
- package/dist/mint-ySIIkKlV.js.map +0 -1
- package/dist/store-tool-spans-Dt-YdAuE.d.ts.map +0 -1
- package/dist/store-tool-spans-ceJoiUgS.js.map +0 -1
- package/dist/tool-groups-B2bSNaJB.d.ts.map +0 -1
- package/dist/types-DQ0e2E7y.js.map +0 -1
package/dist/rl.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { s as ValidationError } from "./errors-Dngq5h35.js";
|
|
2
|
-
import { i as compareCodeUnits } from "./canonical-
|
|
2
|
+
import { i as compareCodeUnits } from "./canonical-BsZVgBhW.js";
|
|
3
3
|
import { a as medianInPlace } from "./internal-BMFSR8Ns.js";
|
|
4
4
|
import { t as mulberry32 } from "./random-Dn5fPWkt.js";
|
|
5
5
|
import { l as wilcoxonSignedRank } from "./paired-arms-JSDcs2zx.js";
|
|
6
6
|
import { r as pairedBootstrap } from "./paired-tests-C8iCsioC.js";
|
|
7
|
-
import { a as campaignCellToRunRecord, s as decidePairedPromotion } from "./run-record-
|
|
7
|
+
import { a as campaignCellToRunRecord, s as decidePairedPromotion } from "./run-record-BhMVsHR1.js";
|
|
8
8
|
import { r as observedSplitScore, s as trainingScore } from "./reward-nw2xZGZG.js";
|
|
9
|
-
import { s as runTaskScore } from "./run-record-
|
|
9
|
+
import { s as runTaskScore } from "./run-record-tg_5H2IK.js";
|
|
10
10
|
import { i as filterDeterministicallyRewarded, n as extractVerifiableReward, r as extractVerifiableRewardsFromRecords, t as detectRewardHacking } from "./reward-hacking-D0XwhVWE.js";
|
|
11
11
|
import { n as InMemoryTraceStore } from "./store-DNe_Uv1Q.js";
|
|
12
|
-
import { t as runEvalCampaign } from "./eval-campaign-
|
|
12
|
+
import { t as runEvalCampaign } from "./eval-campaign-XFHEpN86.js";
|
|
13
13
|
import { s as assertRewardGate } from "./schema-C1aaAxTf.js";
|
|
14
|
-
import { t as isSplitEligible } from "./exporters-
|
|
15
|
-
import { t as mintRolloutRows } from "./mint-
|
|
14
|
+
import { n as isTrainingLineEligible, s as toSftRows$1, t as isSplitEligible } from "./exporters-DEcXbvgO.js";
|
|
15
|
+
import { t as mintRolloutRows } from "./mint-B4zgSAJW.js";
|
|
16
16
|
import { t as evaluateInterimReleaseConfidence } from "./sequential-CzK5DarL.js";
|
|
17
17
|
import { n as assertUniqueObservationIds, s as validateOutcomeMetricSpecifications, t as rubricPredictiveValidity } from "./rubric-predictive-validity-CCK-1B7w.js";
|
|
18
18
|
import { n as thompsonCurriculum, r as varianceBasedCurriculum, t as observationsFromRunRecords } from "./active-curriculum-OjIWgrUJ.js";
|
|
@@ -664,10 +664,12 @@ function admitUngatedByInvocation(items, idsOf, context, requirement, inspect) {
|
|
|
664
664
|
* agent-eval's contract; without first-party exporters consumers reverse-
|
|
665
665
|
* engineer the mapping every release. The exporters codify it.
|
|
666
666
|
*
|
|
667
|
-
* The
|
|
668
|
-
* artifact
|
|
669
|
-
*
|
|
670
|
-
*
|
|
667
|
+
* The text-only formats (DPO, GRPO, PRM) take callbacks for prompt and
|
|
668
|
+
* completion text, which the canonical artifact does not carry as flat fields —
|
|
669
|
+
* the consumer resolves them from its trace store / raw event log. SFT is the
|
|
670
|
+
* one format whose row IS the captured conversation, so it projects the line's
|
|
671
|
+
* inline `messages` through `rollout/exporters.toSftRows` and uses the text
|
|
672
|
+
* lookups only to recover a gap line (a line minted without a transcript).
|
|
671
673
|
*
|
|
672
674
|
* Every exporter that produces a training row accepts canonical minted rollout
|
|
673
675
|
* lines. Convert run records once with `mintRolloutRows`; downstream transforms
|
|
@@ -749,7 +751,7 @@ async function toGrpoRows(lines, lookups) {
|
|
|
749
751
|
async function grpoRowsFromLines(lines, lookups) {
|
|
750
752
|
const grouped = /* @__PURE__ */ new Map();
|
|
751
753
|
for (const line of lines) {
|
|
752
|
-
if (!
|
|
754
|
+
if (!isSplitEligible(line, lookups)) continue;
|
|
753
755
|
const arr = grouped.get(line.task.instance_id) ?? [];
|
|
754
756
|
arr.push(line);
|
|
755
757
|
grouped.set(line.task.instance_id, arr);
|
|
@@ -796,62 +798,67 @@ function toGrpoJsonl(rows) {
|
|
|
796
798
|
* pass `include` to filter further (e.g., keep only `reward >= 0.8` for
|
|
797
799
|
* rejection-sampling SFT).
|
|
798
800
|
*
|
|
799
|
-
*
|
|
800
|
-
*
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
-
*
|
|
804
|
-
*
|
|
805
|
-
*
|
|
806
|
-
*
|
|
807
|
-
*
|
|
808
|
-
*
|
|
809
|
-
* `splitFilter: ['holdout']` — explicit selection replaces the default rule.
|
|
801
|
+
* Eligibility and the transcript projection belong to
|
|
802
|
+
* `rollout/exporters.toSftRows`: same fail-closed policy (realness-gated lines
|
|
803
|
+
* are dropped, not zeroed; `search` ships by default, held-out needs
|
|
804
|
+
* `allowHeldOutTrainingData`, `splitFilter` names an explicit slice) and the
|
|
805
|
+
* same copied-context drop. This adapter adds only the legacy text lookups: a
|
|
806
|
+
* line whose transcript was captured is exported as captured, tool turns
|
|
807
|
+
* included, and a gap line (empty `messages`, `provenance.gap` set) is
|
|
808
|
+
* recovered from `promptOf` / `completionOf` / `systemOf`. `meta.transcriptSource`
|
|
809
|
+
* says which path a row took. A captured transcript whose every turn is copied
|
|
810
|
+
* context yields no row rather than a lookup-built substitute.
|
|
810
811
|
*/
|
|
811
812
|
async function toSftRows(lines, lookups) {
|
|
812
|
-
|
|
813
|
-
}
|
|
814
|
-
async function sftRowsFromLines(lines, lookups) {
|
|
813
|
+
for (const line of lines) assertRewardGate(line, "SFT export");
|
|
815
814
|
const include = lookups.include ?? (() => true);
|
|
816
|
-
const minimumQualityExclusive = lookups.minimumQualityExclusive ?? 0;
|
|
817
|
-
if (!Number.isFinite(minimumQualityExclusive)) throw new Error("minimumQualityExclusive must be finite");
|
|
818
815
|
const rows = [];
|
|
819
816
|
for (const line of lines) {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
const [prompt, completion] = await Promise.all([Promise.resolve(lookups.promptOf(line.run_id)), Promise.resolve(lookups.completionOf(line.run_id))]);
|
|
829
|
-
const messages = [];
|
|
830
|
-
if (system) messages.push({
|
|
831
|
-
role: "system",
|
|
832
|
-
content: system
|
|
833
|
-
});
|
|
834
|
-
messages.push({
|
|
835
|
-
role: "user",
|
|
836
|
-
content: prompt
|
|
837
|
-
});
|
|
838
|
-
messages.push({
|
|
839
|
-
role: "assistant",
|
|
840
|
-
content: completion
|
|
841
|
-
});
|
|
817
|
+
if (!isTrainingLineEligible(line, lookups) || !include(line)) continue;
|
|
818
|
+
const captured = line.messages.length > 0;
|
|
819
|
+
const messages = captured ? line.messages : await recoveredTranscript(line, lookups);
|
|
820
|
+
const [row] = toSftRows$1([{
|
|
821
|
+
...line,
|
|
822
|
+
messages
|
|
823
|
+
}], lookups);
|
|
824
|
+
if (row === void 0) continue;
|
|
842
825
|
rows.push({
|
|
843
|
-
messages,
|
|
826
|
+
messages: row.messages,
|
|
844
827
|
meta: {
|
|
845
828
|
runId: line.run_id,
|
|
829
|
+
rolloutId: line.rollout_id,
|
|
846
830
|
candidateId: line.candidate_id ?? null,
|
|
847
831
|
scenarioId: line.task.instance_id,
|
|
848
|
-
score,
|
|
849
|
-
model: line.policy.model
|
|
832
|
+
score: row.metadata.reward,
|
|
833
|
+
model: line.policy.model,
|
|
834
|
+
transcriptSource: captured ? "captured" : "lookups",
|
|
835
|
+
captureGap: line.provenance.gap ?? null,
|
|
836
|
+
realness_gated: row.metadata.realness_gated,
|
|
837
|
+
realness_screened: row.metadata.realness_screened
|
|
850
838
|
}
|
|
851
839
|
});
|
|
852
840
|
}
|
|
853
841
|
return rows;
|
|
854
842
|
}
|
|
843
|
+
/** A gap line's transcript from the text lookups. Blank or non-string text is refused. */
|
|
844
|
+
async function recoveredTranscript(line, lookups) {
|
|
845
|
+
const system = lookups.systemOf?.(line);
|
|
846
|
+
const [prompt, completion] = await Promise.all([Promise.resolve(lookups.promptOf(line.run_id)), Promise.resolve(lookups.completionOf(line.run_id))]);
|
|
847
|
+
if (typeof prompt !== "string" || prompt.trim() === "" || typeof completion !== "string" || completion.trim() === "" || system != null && typeof system !== "string") throw new Error(`SFT export: rollout ${line.rollout_id} has invalid text lookups`);
|
|
848
|
+
const messages = [];
|
|
849
|
+
if (system) messages.push({
|
|
850
|
+
role: "system",
|
|
851
|
+
content: system
|
|
852
|
+
});
|
|
853
|
+
messages.push({
|
|
854
|
+
role: "user",
|
|
855
|
+
content: prompt
|
|
856
|
+
}, {
|
|
857
|
+
role: "assistant",
|
|
858
|
+
content: completion
|
|
859
|
+
});
|
|
860
|
+
return messages;
|
|
861
|
+
}
|
|
855
862
|
function toSftJsonl(rows) {
|
|
856
863
|
return rows.map((r) => JSON.stringify(r)).join("\n") + (rows.length > 0 ? "\n" : "");
|
|
857
864
|
}
|
|
@@ -961,10 +968,6 @@ function stepRewardsToJsonl(stepRewards, context) {
|
|
|
961
968
|
}));
|
|
962
969
|
return rows.map((r) => JSON.stringify(r)).join("\n") + (rows.length > 0 ? "\n" : "");
|
|
963
970
|
}
|
|
964
|
-
function isSelectedSplit(line, options) {
|
|
965
|
-
if (options.splitFilter !== void 0) return options.splitFilter.includes(line.task.split);
|
|
966
|
-
return isSplitEligible(line, options);
|
|
967
|
-
}
|
|
968
971
|
//#endregion
|
|
969
972
|
//#region src/rl/dataset.ts
|
|
970
973
|
const DATASET_FORMAT_SET = /* @__PURE__ */ new Set([
|
|
@@ -1052,9 +1055,10 @@ function computeStatsFromLines(lines) {
|
|
|
1052
1055
|
/**
|
|
1053
1056
|
* Package graded rollout lines into a publishable RL dataset bundle: the
|
|
1054
1057
|
* trainer-format JSONL files + a manifest + a datasheet. DPO requires
|
|
1055
|
-
* pre-extracted preference triples (pass `preferences`); GRPO
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
1058
|
+
* pre-extracted preference triples (pass `preferences`); GRPO derives from the
|
|
1059
|
+
* lines via the supplied text lookups; SFT ships each line's captured
|
|
1060
|
+
* transcript and uses the lookups only to recover gap lines. Throws on an
|
|
1061
|
+
* empty corpus — an empty dataset must never be published.
|
|
1058
1062
|
*/
|
|
1059
1063
|
async function buildRlDataset(lines, lookups, config, preferences) {
|
|
1060
1064
|
if (lines.length === 0) throw new Error("buildRlDataset: no rollout lines — refusing to package an empty dataset");
|
|
@@ -2058,12 +2062,25 @@ async function runRLCampaign(opts) {
|
|
|
2058
2062
|
validateOutcomeMetricSpecifications(outcomeMetrics);
|
|
2059
2063
|
}
|
|
2060
2064
|
const splitTag = opts.splitTag ?? "search";
|
|
2065
|
+
const stores = /* @__PURE__ */ new Map();
|
|
2061
2066
|
const campaign = await runEvalCampaign({
|
|
2062
2067
|
...opts,
|
|
2063
|
-
splitTag
|
|
2068
|
+
splitTag,
|
|
2069
|
+
storeFactory: (params) => {
|
|
2070
|
+
const store = opts.storeFactory(params);
|
|
2071
|
+
stores.set(params.runId, store);
|
|
2072
|
+
return store;
|
|
2073
|
+
}
|
|
2064
2074
|
});
|
|
2065
2075
|
const rewardSignals = extractVerifiableRewardsFromRecords(campaign.runs, opts.verifiableReward ?? {});
|
|
2066
|
-
const
|
|
2076
|
+
const scoredRuns = campaign.runs.filter((run) => runTaskScore(run) !== void 0);
|
|
2077
|
+
const rolloutLines = [];
|
|
2078
|
+
for (const run of scoredRuns) {
|
|
2079
|
+
const store = stores.get(run.runId);
|
|
2080
|
+
if (!store) throw new Error(`runRLCampaign: evaluation trace store missing for ${run.runId}`);
|
|
2081
|
+
const { rows } = await mintRolloutRows([run], store, opts.rollout);
|
|
2082
|
+
rolloutLines.push(...rows);
|
|
2083
|
+
}
|
|
2067
2084
|
const preferences = extractPreferences(rolloutLines, {
|
|
2068
2085
|
...opts.preferences,
|
|
2069
2086
|
strategy: opts.preferences?.strategy ?? "paired-by-scenario-and-seed",
|
|
@@ -2112,6 +2129,7 @@ async function runRLCampaign(opts) {
|
|
|
2112
2129
|
});
|
|
2113
2130
|
return {
|
|
2114
2131
|
campaign,
|
|
2132
|
+
rolloutLines,
|
|
2115
2133
|
rewardSignals,
|
|
2116
2134
|
preferences,
|
|
2117
2135
|
interimConfidence,
|