@tangle-network/agent-eval 0.131.1 → 0.133.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.
Files changed (133) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/analyst/index.d.ts +5 -5
  3. package/dist/analyst/index.js +3 -3
  4. package/dist/{analyze-runs-CBnCgfse.d.ts → analyze-runs-DZr7JW-m.d.ts} +5 -5
  5. package/dist/{analyze-runs-CBnCgfse.d.ts.map → analyze-runs-DZr7JW-m.d.ts.map} +1 -1
  6. package/dist/benchmarks/index.d.ts +1 -1
  7. package/dist/benchmarks/index.js +1 -1
  8. package/dist/{benchmarks-BDtRiOvE.js → benchmarks-DncrVrSr.js} +3 -3
  9. package/dist/{benchmarks-BDtRiOvE.js.map → benchmarks-DncrVrSr.js.map} +1 -1
  10. package/dist/campaign/index.d.ts +4 -4
  11. package/dist/campaign/index.js +2 -2
  12. package/dist/{campaign-CLG6y9jF.js → campaign-CyQMCCEU.js} +4 -4
  13. package/dist/{campaign-CLG6y9jF.js.map → campaign-CyQMCCEU.js.map} +1 -1
  14. package/dist/cli.js +1 -1
  15. package/dist/{client-w90OcvvR.d.ts → client-D4F9hdzR.d.ts} +4 -4
  16. package/dist/{client-w90OcvvR.d.ts.map → client-D4F9hdzR.d.ts.map} +1 -1
  17. package/dist/contract/index.d.ts +188 -22
  18. package/dist/contract/index.d.ts.map +1 -1
  19. package/dist/contract/index.js +1663 -65
  20. package/dist/contract/index.js.map +1 -1
  21. package/dist/control.d.ts +1 -1
  22. package/dist/{cost-ledger-DIgQUFZZ.js → cost-ledger-BrJxbrMy.js} +278 -9
  23. package/dist/cost-ledger-BrJxbrMy.js.map +1 -0
  24. package/dist/{cost-ledger-Dye6jCgg.d.ts → cost-ledger-fGS_u_O1.d.ts} +18 -2
  25. package/dist/cost-ledger-fGS_u_O1.d.ts.map +1 -0
  26. package/dist/{default-registry-Cj1oUpLN.d.ts → default-registry-Cl3pHo4n.d.ts} +4 -4
  27. package/dist/{default-registry-Cj1oUpLN.d.ts.map → default-registry-Cl3pHo4n.d.ts.map} +1 -1
  28. package/dist/{default-registry-C-vFCSEc.js → default-registry-D3T9XbuY.js} +4 -13
  29. package/dist/default-registry-D3T9XbuY.js.map +1 -0
  30. package/dist/{eval-campaign-C2k-m4aY.js → eval-campaign-CYkUME2T.js} +2 -2
  31. package/dist/{eval-campaign-C2k-m4aY.js.map → eval-campaign-CYkUME2T.js.map} +1 -1
  32. package/dist/{task-failure-attributes-CQZlB3et.js → extract-usage-2j25whHw.js} +154 -2
  33. package/dist/extract-usage-2j25whHw.js.map +1 -0
  34. package/dist/fuzz.d.ts +1 -1
  35. package/dist/fuzz.js +1 -1
  36. package/dist/hosted/index.d.ts +2 -2
  37. package/dist/{index-B11XCkdf2.d.ts → index-3cdlURSk.d.ts} +2 -2
  38. package/dist/index-3cdlURSk.d.ts.map +1 -0
  39. package/dist/{index-VTypFU3t.d.ts → index-B_eUhU9K.d.ts} +7 -7
  40. package/dist/{index-VTypFU3t.d.ts.map → index-B_eUhU9K.d.ts.map} +1 -1
  41. package/dist/{index-DNXoNaFF.d.ts → index-C2fkZhv_.d.ts} +2 -2
  42. package/dist/{index-DNXoNaFF.d.ts.map → index-C2fkZhv_.d.ts.map} +1 -1
  43. package/dist/{index-NPeSWD98.d.ts → index-CiP2DRCj.d.ts} +5 -5
  44. package/dist/{index-NPeSWD98.d.ts.map → index-CiP2DRCj.d.ts.map} +1 -1
  45. package/dist/index.d.ts +69 -23
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +100 -12
  48. package/dist/index.js.map +1 -1
  49. package/dist/{llm-client-B_nIBlYo.d.ts → llm-client-BiK4HW0u.d.ts} +2 -2
  50. package/dist/{llm-client-B_nIBlYo.d.ts.map → llm-client-BiK4HW0u.d.ts.map} +1 -1
  51. package/dist/{llm-client--GR4JbZE.js → llm-client-ClPW-dWB.js} +2 -2
  52. package/dist/{llm-client--GR4JbZE.js.map → llm-client-ClPW-dWB.js.map} +1 -1
  53. package/dist/meta-eval/index.d.ts +216 -3
  54. package/dist/{index-D_F6VAKe.d.ts.map → meta-eval/index.d.ts.map} +1 -1
  55. package/dist/meta-eval/index.js +91 -1
  56. package/dist/meta-eval/index.js.map +1 -1
  57. package/dist/multishot/index.d.ts +1 -1
  58. package/dist/openapi.json +1 -1
  59. package/dist/{release-report-Crg9oFJ0.d.ts → release-report-DfmKSIEE.d.ts} +3 -3
  60. package/dist/{release-report-Crg9oFJ0.d.ts.map → release-report-DfmKSIEE.d.ts.map} +1 -1
  61. package/dist/{replay-RE97Ckjl.d.ts → replay-BI6CVKkp.d.ts} +2 -2
  62. package/dist/{replay-RE97Ckjl.d.ts.map → replay-BI6CVKkp.d.ts.map} +1 -1
  63. package/dist/{replay-D18-pBAA.js → replay-BMR4TEYY.js} +2 -3
  64. package/dist/{replay-D18-pBAA.js.map → replay-BMR4TEYY.js.map} +1 -1
  65. package/dist/reporting.d.ts +4 -4
  66. package/dist/{researcher-Q5rpPqZY.d.ts → researcher-DMimgHtN.d.ts} +4 -4
  67. package/dist/{researcher-Q5rpPqZY.d.ts.map → researcher-DMimgHtN.d.ts.map} +1 -1
  68. package/dist/{reward-hacking-CW-3HN0n.d.ts → reward-hacking-D-QqXvg-.d.ts} +2 -2
  69. package/dist/{reward-hacking-CW-3HN0n.d.ts.map → reward-hacking-D-QqXvg-.d.ts.map} +1 -1
  70. package/dist/rl.d.ts +156 -6
  71. package/dist/rl.d.ts.map +1 -1
  72. package/dist/rl.js +217 -2
  73. package/dist/rl.js.map +1 -1
  74. package/dist/rollout/index.d.ts +1 -1
  75. package/dist/{rubric-predictive-validity-lXLmashy.d.ts → rubric-predictive-validity-C1dCLcvb.d.ts} +2 -2
  76. package/dist/{rubric-predictive-validity-lXLmashy.d.ts.map → rubric-predictive-validity-C1dCLcvb.d.ts.map} +1 -1
  77. package/dist/{run-evidence-oByzm-dE.d.ts → run-evidence-DokQtX0-.d.ts} +2 -2
  78. package/dist/{run-evidence-oByzm-dE.d.ts.map → run-evidence-DokQtX0-.d.ts.map} +1 -1
  79. package/dist/run-record-CN8Zd21B.js.map +1 -1
  80. package/dist/{run-record-BJnYdTxO.d.ts → run-record-DcObtIGh.d.ts} +4 -14
  81. package/dist/run-record-DcObtIGh.d.ts.map +1 -0
  82. package/dist/{semantic-concept-judge-b5m3irbR.js → semantic-concept-judge-BypLt6Fw.js} +4 -4
  83. package/dist/{semantic-concept-judge-b5m3irbR.js.map → semantic-concept-judge-BypLt6Fw.js.map} +1 -1
  84. package/dist/{server-m5D9cvnG.js → server-BPqlDBWK.js} +3 -3
  85. package/dist/{server-m5D9cvnG.js.map → server-BPqlDBWK.js.map} +1 -1
  86. package/dist/{skill-usage-D5mlWdAJ.d.ts → skill-usage-BaaxFSJR.d.ts} +5 -5
  87. package/dist/{skill-usage-D5mlWdAJ.d.ts.map → skill-usage-BaaxFSJR.d.ts.map} +1 -1
  88. package/dist/{skillopt-optimization-method-D0MVjJdP.d.ts → skillopt-optimization-method-CAASpcS3.d.ts} +9 -9
  89. package/dist/{skillopt-optimization-method-D0MVjJdP.d.ts.map → skillopt-optimization-method-CAASpcS3.d.ts.map} +1 -1
  90. package/dist/{skillopt-optimization-method-eOJL2570.js → skillopt-optimization-method-DgN7U9iR.js} +3 -3
  91. package/dist/{skillopt-optimization-method-eOJL2570.js.map → skillopt-optimization-method-DgN7U9iR.js.map} +1 -1
  92. package/dist/{statistics-Cmj6nynr.d.ts → statistics-DbvkkDPa.d.ts} +2 -2
  93. package/dist/{statistics-Cmj6nynr.d.ts.map → statistics-DbvkkDPa.d.ts.map} +1 -1
  94. package/dist/{summary-report-CWwB_LiV.d.ts → summary-report-DnUcjVpV.d.ts} +2 -2
  95. package/dist/{summary-report-CWwB_LiV.d.ts.map → summary-report-DnUcjVpV.d.ts.map} +1 -1
  96. package/dist/traces.d.ts +2 -2
  97. package/dist/traces.js +2 -2
  98. package/dist/{types-CsD5nTfV.d.ts → types-BokuXvOG.d.ts} +4 -4
  99. package/dist/{types-CsD5nTfV.d.ts.map → types-BokuXvOG.d.ts.map} +1 -1
  100. package/dist/{types-DGsxbAEd.d.ts → types-Cc3qbqzj.d.ts} +3 -3
  101. package/dist/{types-DGsxbAEd.d.ts.map → types-Cc3qbqzj.d.ts.map} +1 -1
  102. package/dist/wire/index.d.ts +2 -2
  103. package/dist/wire/index.js +1 -1
  104. package/package.json +3 -8
  105. package/dist/belief-state/index.d.ts +0 -622
  106. package/dist/belief-state/index.d.ts.map +0 -1
  107. package/dist/belief-state/index.js +0 -1819
  108. package/dist/belief-state/index.js.map +0 -1
  109. package/dist/calibration-CNWWA6K8.js +0 -94
  110. package/dist/calibration-CNWWA6K8.js.map +0 -1
  111. package/dist/code-agent-session-BjkMTQ7H.js +0 -1390
  112. package/dist/code-agent-session-BjkMTQ7H.js.map +0 -1
  113. package/dist/code-agent-session-aYa3SGKz.d.ts +0 -143
  114. package/dist/code-agent-session-aYa3SGKz.d.ts.map +0 -1
  115. package/dist/cost-ledger-DIgQUFZZ.js.map +0 -1
  116. package/dist/cost-ledger-Dye6jCgg.d.ts.map +0 -1
  117. package/dist/default-registry-C-vFCSEc.js.map +0 -1
  118. package/dist/extract-usage-BrQ8mCLX.js +0 -155
  119. package/dist/extract-usage-BrQ8mCLX.js.map +0 -1
  120. package/dist/index-B11XCkdf2.d.ts.map +0 -1
  121. package/dist/index-D_F6VAKe.d.ts +0 -217
  122. package/dist/metrics-C9YY1OcL.js +0 -239
  123. package/dist/metrics-C9YY1OcL.js.map +0 -1
  124. package/dist/off-policy-DvgzvtIx.js +0 -220
  125. package/dist/off-policy-DvgzvtIx.js.map +0 -1
  126. package/dist/off-policy-mskQw8Mb.d.ts +0 -153
  127. package/dist/off-policy-mskQw8Mb.d.ts.map +0 -1
  128. package/dist/run-record-BJnYdTxO.d.ts.map +0 -1
  129. package/dist/runtime-trajectory-1gyaTOoC.js +0 -93
  130. package/dist/runtime-trajectory-1gyaTOoC.js.map +0 -1
  131. package/dist/runtime-trajectory-BXxG4lyi.d.ts +0 -50
  132. package/dist/runtime-trajectory-BXxG4lyi.d.ts.map +0 -1
  133. package/dist/task-failure-attributes-CQZlB3et.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { a as rubricPredictiveValidity, i as RubricRanking, n as RubricPredictiveValidityInput, r as RubricPredictiveValidityReport, t as RubricOutcomePair } from "./rubric-predictive-validity-lXLmashy.js";
2
- import { I as pairedBootstrap, Z as wilcoxonSignedRank, d as PairedBootstrapOptions, f as PairedBootstrapResult, y as benjaminiHochberg } from "./statistics-Cmj6nynr.js";
3
- import { _ as paretoChart, a as ParetoPoint, c as ResearchReportCandidate, d as ResearchReportOptions, f as ResearchReportRecommendation, g as gainHistogram, h as SummaryTableRow, i as ParetoFigureSpec, l as ResearchReportDecision, m as SummaryTableOptions, n as GainDistributionFigureSpec, o as RESEARCH_REPORT_HARD_PAIR_FLOOR, p as SummaryTable, r as GainDistributionOptions, s as ResearchReport, t as GainDistributionBin, u as ResearchReportMethodology, v as researchReport, y as summaryTable } from "./summary-report-CWwB_LiV.js";
4
- import { _ as ReleaseConfidenceStatus, a as JudgeReplayGateArgs, b as assertReleaseConfidence, c as judgeReplayGate, d as ReleaseConfidenceAxis, f as ReleaseConfidenceAxisName, g as ReleaseConfidenceScorecard, h as ReleaseConfidenceMetrics, i as BootstrapResult, m as ReleaseConfidenceIssue, n as renderReleaseReport, o as Verdict, p as ReleaseConfidenceInput, r as BootstrapOptions, s as bootstrapCi, t as RenderReleaseReportOptions, v as ReleaseConfidenceThresholds, x as evaluateReleaseConfidence, y as ReleaseTraceEvidence } from "./release-report-Crg9oFJ0.js";
1
+ import { I as pairedBootstrap, Z as wilcoxonSignedRank, d as PairedBootstrapOptions, f as PairedBootstrapResult, y as benjaminiHochberg } from "./statistics-DbvkkDPa.js";
2
+ import { _ as paretoChart, a as ParetoPoint, c as ResearchReportCandidate, d as ResearchReportOptions, f as ResearchReportRecommendation, g as gainHistogram, h as SummaryTableRow, i as ParetoFigureSpec, l as ResearchReportDecision, m as SummaryTableOptions, n as GainDistributionFigureSpec, o as RESEARCH_REPORT_HARD_PAIR_FLOOR, p as SummaryTable, r as GainDistributionOptions, s as ResearchReport, t as GainDistributionBin, u as ResearchReportMethodology, v as researchReport, y as summaryTable } from "./summary-report-DnUcjVpV.js";
3
+ import { _ as ReleaseConfidenceStatus, a as JudgeReplayGateArgs, b as assertReleaseConfidence, c as judgeReplayGate, d as ReleaseConfidenceAxis, f as ReleaseConfidenceAxisName, g as ReleaseConfidenceScorecard, h as ReleaseConfidenceMetrics, i as BootstrapResult, m as ReleaseConfidenceIssue, n as renderReleaseReport, o as Verdict, p as ReleaseConfidenceInput, r as BootstrapOptions, s as bootstrapCi, t as RenderReleaseReportOptions, v as ReleaseConfidenceThresholds, x as evaluateReleaseConfidence, y as ReleaseTraceEvidence } from "./release-report-DfmKSIEE.js";
5
4
  import { a as PairedEvalueStep, c as pairedEvalueSequence, i as PairedEvalueSequence, n as InterimReleaseConfidenceInput, o as SequentialDecision, r as PairedEvalueOptions, s as evaluateInterimReleaseConfidence, t as InterimReleaseConfidence } from "./sequential-CYwq6Ff_.js";
5
+ import { a as rubricPredictiveValidity, i as RubricRanking, n as RubricPredictiveValidityInput, r as RubricPredictiveValidityReport, t as RubricOutcomePair } from "./rubric-predictive-validity-C1dCLcvb.js";
6
6
  export { type BootstrapOptions, type BootstrapResult, type GainDistributionBin, type GainDistributionFigureSpec, type GainDistributionOptions, type InterimReleaseConfidence, type InterimReleaseConfidenceInput, type JudgeReplayGateArgs, type PairedBootstrapOptions, type PairedBootstrapResult, type PairedEvalueOptions, type PairedEvalueSequence, type PairedEvalueStep, type ParetoFigureSpec, type ParetoPoint, RESEARCH_REPORT_HARD_PAIR_FLOOR, type ReleaseConfidenceAxis, type ReleaseConfidenceAxisName, type ReleaseConfidenceInput, type ReleaseConfidenceIssue, type ReleaseConfidenceMetrics, type ReleaseConfidenceScorecard, type ReleaseConfidenceStatus, type ReleaseConfidenceThresholds, type ReleaseTraceEvidence, type RenderReleaseReportOptions, type ResearchReport, type ResearchReportCandidate, type ResearchReportDecision, type ResearchReportMethodology, type ResearchReportOptions, type ResearchReportRecommendation, type RubricOutcomePair, type RubricPredictiveValidityInput, type RubricPredictiveValidityReport, type RubricRanking, type SequentialDecision, type SummaryTable, type SummaryTableOptions, type SummaryTableRow, type Verdict, assertReleaseConfidence, benjaminiHochberg, bootstrapCi, evaluateInterimReleaseConfidence, evaluateReleaseConfidence, gainHistogram, judgeReplayGate, pairedBootstrap, pairedEvalueSequence, paretoChart, renderReleaseReport, researchReport, rubricPredictiveValidity, summaryTable, wilcoxonSignedRank };
@@ -1,11 +1,11 @@
1
1
  import { i as AgentProfileCellInput, r as AgentProfileCell } from "./agent-profile-cell-CCm3l2v2.js";
2
- import { a as RunRecord, c as RunTaskFailure, n as RunCostProvenance, r as RunJudgeMetadata, s as RunSplitTag, t as JudgeScoresRecord, u as RunTokenUsage } from "./run-record-BJnYdTxO.js";
2
+ import { a as RunRecord, c as RunTaskFailure, n as RunCostProvenance, r as RunJudgeMetadata, s as RunSplitTag, t as JudgeScoresRecord, u as RunTokenUsage } from "./run-record-DcObtIGh.js";
3
3
  import { l as RawProviderSink } from "./raw-provider-sink-BU29Sh8h.js";
4
4
  import { s as TraceStore } from "./store-CT9YIIve.js";
5
5
  import { i as TraceEmitter, t as RunCompleteHook } from "./emitter-DGQGoLyj.js";
6
6
  import { a as RunIntegrityReport, n as RunIntegrityExpectations } from "./integrity-rmVhXWA7.js";
7
- import { o as LlmClientOptions, u as LlmRouteRequirements } from "./llm-client-B_nIBlYo.js";
8
- import { b as GateDecision, d as ResearchReportOptions, s as ResearchReport } from "./summary-report-CWwB_LiV.js";
7
+ import { o as LlmClientOptions, u as LlmRouteRequirements } from "./llm-client-BiK4HW0u.js";
8
+ import { b as GateDecision, d as ResearchReportOptions, s as ResearchReport } from "./summary-report-DnUcjVpV.js";
9
9
  //#region src/eval-campaign.d.ts
10
10
  interface CampaignVariant<V> {
11
11
  id: string;
@@ -312,4 +312,4 @@ declare class NoopResearcher implements Researcher {
312
312
  }
313
313
  //#endregion
314
314
  export { EvalCampaignResult as _, FailureMode as a, SteeringChange as c, CampaignRunContext as d, CampaignRunOutcome as f, EvalCampaignOptions as g, CampaignVariant as h, ExperimentResult as i, CampaignFactoryParams as l, CampaignScenario as m, CallbackResearcherOptions as n, NoopResearcher as o, CampaignRunner as p, ExperimentPlan as r, Researcher as s, CallbackResearcher as t, CampaignIntegrityPolicy as u, FailedRun as v, runEvalCampaign as y };
315
- //# sourceMappingURL=researcher-Q5rpPqZY.d.ts.map
315
+ //# sourceMappingURL=researcher-DMimgHtN.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"researcher-Q5rpPqZY.d.ts","names":[],"sources":["../src/eval-campaign.ts","../src/researcher.ts"],"mappings":";;;;;;;;;UAyEiB,gBAAgB;EAC/B;EACA,SAAS;;UAGM;EACf;;EAEA,OAAO;;UAGQ,mBAAmB;;EAElC;;EAEA;EACA,SAAS;EACT;EACA;EACA,cAAc;EACd;EACA,UAAU;;;;;;;EAOV,SAAS;EACT,OAAO;EACP,SAAS;;;;;;EAMT,SAAS;;UAGD;;EAER;;EAEA;;EAEA;;EAEA,gBAAgB;EAChB,YAAY;;EAEZ;;EAEA;;EAEA;;EAEA,MAAM;;EAEN,gBAAgB;;;;;;EAMhB,cAAc;;;;;;EAMd,eAAe,mBAAmB;;;KAIxB,qBAAqB,2BAA2B;KAEhD,eAAe,MAAM,KAAK,mBAAmB,OAAO,QAAQ;KAE5D;UAEK,oBAAoB;;;;;EAKnC;EACA,UAAU,gBAAgB;EAC1B,WAAW;;EAEX;;EAEA,WAAW;;EAEX;;;;;;EAMA,SAAS;;;;;;EAMT,oBAAoB;;;;;;EAMpB,eAAe,QAAQ,0BAA0B;;;;;;;EAOjD,kBAAkB,QAAQ,0BAA0B;;;;;EAKpD;;;;;EAKA,gBAAgB;;;;;;EAMhB,YAAY;;EAEZ,qBAAqB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;IAGE;;IAEA;;;;UAKa;EACf;;;;EAIA;;;EAGA;;EAEA;;;UAIe;EACf;EACA;EACA,SAAS;;;EAGT;;EAEA;IAAU;IAAkB;;;;UAIb;EACf,MAAM;EACN,MAAM;EACN,cAAc;;;;;;;;;;;;;;;;;;;UAoBC;EACf,gBAAgB,MAAM,cAAc,QAAQ;EAC5C,cAAc,UAAU,gBAAgB,QAAQ;EAChD,YAAY,SAAS,kBAAkB,UAAU,iBAAiB,QAAQ;EAC1E,eAAe,MAAM,iBAAiB,QAAQ;;UAG/B;EACf,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,gBAAgB;;;;;;cAOL,8BAA8B;mBACZ;EAA7B,YAA6B,WAAW;EAExC,gBAAgB,MAAM,cAAc,QAAQ;EAI5C,cAAc,UAAU,gBAAgB,QAAQ;EAIhD,YAAY,SAAS,kBAAkB,UAAU,iBAAiB,QAAQ;EAI1E,eAAe,MAAM,iBAAiB,QAAQ;;;;;;;;;cAYnC,0BAA0B;mBACpB;EAEjB,YAAY;EAIN,gBAAgB,OAAO,cAAc,QAAQ;EAI7C,cAAc,WAAW,gBAAgB,QAAQ;EAIjD,YACJ,UAAU,kBACV,WAAW,iBACV,QAAQ;EAIL,eAAe,OAAO,iBAAiB,QAAQ"}
@@ -1,5 +1,5 @@
1
1
  import { s as VerificationReport } from "./multi-layer-verifier-BHY1gWAc.js";
2
- import { a as RunRecord } from "./run-record-BJnYdTxO.js";
2
+ import { a as RunRecord } from "./run-record-DcObtIGh.js";
3
3
  //#region src/rl/verifiable-reward.d.ts
4
4
  type VerifiableRewardSource = 'compile' | 'test' | 'schema' | 'sandbox' | 'judge' | 'composite';
5
5
  interface VerifiableReward {
@@ -221,4 +221,4 @@ interface DetectRewardHackingInput {
221
221
  declare function detectRewardHacking(input: DetectRewardHackingInput): RewardHackingReport;
222
222
  //#endregion
223
223
  export { detectRewardHacking as a, VerifiableRewardSource as c, filterDeterministicallyRewarded as d, RewardHackingSignal as i, extractVerifiableReward as l, RewardHackingFinding as n, VerifiableReward as o, RewardHackingReport as r, VerifiableRewardExtractionOptions as s, DetectRewardHackingInput as t, extractVerifiableRewardsFromRecords as u };
224
- //# sourceMappingURL=reward-hacking-CW-3HN0n.d.ts.map
224
+ //# sourceMappingURL=reward-hacking-D-QqXvg-.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reward-hacking-CW-3HN0n.d.ts","names":[],"sources":["../src/rl/verifiable-reward.ts","../src/rl/reward-hacking.ts"],"mappings":";;;KAiCY;UAQK;;EAEf;;EAEA,QAAQ;;;;;;;;EAQR;;;;;;EAMA;;EAEA;;;;;;;EAOA,YAAY;;;;;;;;;;;EAWZ;;;;;;;;;;;;;;;;;;EAkBA;;UAGe;;;;;;;;EAQf;;;;EAIA,aAAa,sBAAsB;;;;;;;EAOnC;;;;;EAKA;;;;;;;;;;;;EAYA;;;;;;;;;;;;;;;iBA6Cc,wBACd,QAAQ,oBACR,OAAM,oCACL;;;;;;;;;;;;;;;;;;;;;;;iBAqGa,oCACd,MAAM,aACN,OAAM,oCACL;EAAQ;EAAe,QAAQ;;;;;;;;;;;iBA4GlB,gCACd,MAAM,aACN,OAAM,oCACL;EAAQ,KAAK;EAAW,QAAQ;;;;KChWvB;UAMK;EACf,QAAQ;;EAER;EACA;;EAEA,QAAQ;;UAGO;EACf,UAAU;;EAEV,kBAAkB;;;;;;EAMlB;;EAEA;;EAEA;;UAGe;;;;;EAKf,MAAM;;;;;EAKN,WAAW,KAAK;;;;;;EAMhB,WAAW,KAAK;;;;;;EAMhB,qBAAqB,KAAK;;;;;EAK1B;;;;;EAKA;IAAe;IAAkB;;;;;EAIjC,0BAA0B;;iBAgBZ,oBAAoB,OAAO,2BAA2B"}
1
+ {"version":3,"file":"reward-hacking-D-QqXvg-.d.ts","names":[],"sources":["../src/rl/verifiable-reward.ts","../src/rl/reward-hacking.ts"],"mappings":";;;KAiCY;UAQK;;EAEf;;EAEA,QAAQ;;;;;;;;EAQR;;;;;;EAMA;;EAEA;;;;;;;EAOA,YAAY;;;;;;;;;;;EAWZ;;;;;;;;;;;;;;;;;;EAkBA;;UAGe;;;;;;;;EAQf;;;;EAIA,aAAa,sBAAsB;;;;;;;EAOnC;;;;;EAKA;;;;;;;;;;;;EAYA;;;;;;;;;;;;;;;iBA6Cc,wBACd,QAAQ,oBACR,OAAM,oCACL;;;;;;;;;;;;;;;;;;;;;;;iBAqGa,oCACd,MAAM,aACN,OAAM,oCACL;EAAQ;EAAe,QAAQ;;;;;;;;;;;iBA4GlB,gCACd,MAAM,aACN,OAAM,oCACL;EAAQ,KAAK;EAAW,QAAQ;;;;KChWvB;UAMK;EACf,QAAQ;;EAER;EACA;;EAEA,QAAQ;;UAGO;EACf,UAAU;;EAEV,kBAAkB;;;;;;EAMlB;;EAEA;;EAEA;;UAGe;;;;;EAKf,MAAM;;;;;EAKN,WAAW,KAAK;;;;;;EAMhB,WAAW,KAAK;;;;;;EAMhB,qBAAqB,KAAK;;;;;EAK1B;;;;;EAKA;IAAe;IAAkB;;;;;EAIjC,0BAA0B;;iBAgBZ,oBAAoB,OAAO,2BAA2B"}
package/dist/rl.d.ts CHANGED
@@ -1,16 +1,15 @@
1
1
  import { s as VerificationReport } from "./multi-layer-verifier-BHY1gWAc.js";
2
2
  import { _ as Span } from "./schema-BtVldJ3T.js";
3
- import { a as RunRecord, s as RunSplitTag } from "./run-record-BJnYdTxO.js";
3
+ import { a as RunRecord, s as RunSplitTag } from "./run-record-DcObtIGh.js";
4
4
  import { s as TraceStore } from "./store-CT9YIIve.js";
5
+ import { a as CampaignResult } from "./types-BokuXvOG.js";
6
+ import { a as detectRewardHacking, c as VerifiableRewardSource, d as filterDeterministicallyRewarded, i as RewardHackingSignal, l as extractVerifiableReward, n as RewardHackingFinding, o as VerifiableReward, r as RewardHackingReport, s as VerifiableRewardExtractionOptions, t as DetectRewardHackingInput, u as extractVerifiableRewardsFromRecords } from "./reward-hacking-D-QqXvg-.js";
5
7
  import { i as InMemoryOutcomeStore, n as FileSystemOutcomeStore, o as OutcomeStore, r as FileSystemOutcomeStoreOptions, t as DeploymentOutcome } from "./outcome-store-BYHIuO0e.js";
6
- import { r as RubricPredictiveValidityReport } from "./rubric-predictive-validity-lXLmashy.js";
7
- import { a as doublyRobust, c as selfNormalizedImportanceWeighting, i as OffPolicyTrajectory, n as OffPolicyEstimate, o as inverseProbabilityWeighting, r as OffPolicyOptions, s as offPolicyEstimateAll, t as OffPolicyContributionCounts } from "./off-policy-mskQw8Mb.js";
8
- import { a as CampaignResult } from "./types-CsD5nTfV.js";
9
- import { a as detectRewardHacking, c as VerifiableRewardSource, d as filterDeterministicallyRewarded, i as RewardHackingSignal, l as extractVerifiableReward, n as RewardHackingFinding, o as VerifiableReward, r as RewardHackingReport, s as VerifiableRewardExtractionOptions, t as DetectRewardHackingInput, u as extractVerifiableRewardsFromRecords } from "./reward-hacking-CW-3HN0n.js";
10
8
  import { t as AdversarialMutation } from "./adversarial-smnADNFS.js";
11
9
  import { b as RolloutSplit, o as MintedRolloutLine } from "./schema-Cef2cFmb.js";
12
- import { _ as EvalCampaignResult, a as FailureMode, c as SteeringChange, g as EvalCampaignOptions, i as ExperimentResult, r as ExperimentPlan, s as Researcher, y as runEvalCampaign } from "./researcher-Q5rpPqZY.js";
10
+ import { _ as EvalCampaignResult, a as FailureMode, c as SteeringChange, g as EvalCampaignOptions, i as ExperimentResult, r as ExperimentPlan, s as Researcher, y as runEvalCampaign } from "./researcher-DMimgHtN.js";
13
11
  import { t as InterimReleaseConfidence } from "./sequential-CYwq6Ff_.js";
12
+ import { r as RubricPredictiveValidityReport } from "./rubric-predictive-validity-C1dCLcvb.js";
14
13
  //#region src/rl/active-curriculum.d.ts
15
14
  interface CellObservation {
16
15
  variantId: string;
@@ -1035,6 +1034,157 @@ interface HarvestOptions {
1035
1034
  */
1036
1035
  declare function buildDatasetFromCorpus(corpusPath: string, config: RlDatasetConfig, opts?: HarvestOptions): Promise<RlDatasetBundle>;
1037
1036
  //#endregion
1037
+ //#region src/rl/off-policy.d.ts
1038
+ /**
1039
+ * Off-policy evaluation primitives.
1040
+ *
1041
+ * Standard inverse-probability-weighted (IPS), self-normalized
1042
+ * importance-weighted (SNIPS), and doubly-robust (DR) estimators for the
1043
+ * value of a *target* policy given trajectories collected under a
1044
+ * *behavior* policy. This is the canonical RL eval task: "we have last
1045
+ * week's runs, we changed the policy — how would the new one do without
1046
+ * re-running?"
1047
+ *
1048
+ * The math here is textbook (Dudík, Langford, Li 2011 for DR; Swaminathan
1049
+ * & Joachims 2015 for SNIPS) but the *application* to LLM-agent
1050
+ * evaluation needs care:
1051
+ *
1052
+ * - The "policy" is the (prompt, tool config, model snapshot) triple.
1053
+ * Two policies have the same probability over an action *iff* their
1054
+ * LLM call would emit the same token with the same probability —
1055
+ * which is generally unknowable without the model log-probs.
1056
+ * - For LLM agents, propensity scores must be supplied by the caller
1057
+ * (logged in the trace, recovered from token log-probs, or estimated
1058
+ * via a learned propensity model). We do NOT estimate propensity here.
1059
+ * - Doubly-robust requires two outputs from a Q-function: its prediction
1060
+ * for the logged action and its expectation under the target policy.
1061
+ * Consumers compute these with a tabular estimate, regression fit, or
1062
+ * learned reward model before constructing the trajectories.
1063
+ *
1064
+ * Bias / variance tradeoffs:
1065
+ * - IPS: unbiased; high variance for small overlap, infinite variance
1066
+ * when target has support outside behavior.
1067
+ * - SNIPS: lower variance, slight bias; usually preferred in practice.
1068
+ * - DR: doubly-robust — unbiased if either propensity OR Q-function is
1069
+ * correct. Lowest practical variance when Q is decent. Use this.
1070
+ *
1071
+ * Caveat the panel will land: on the LLM-agent setting, propensity scores
1072
+ * recovered from token log-probs are noisy, the action space is enormous,
1073
+ * and overlap is often poor. These estimators are useful but not magic;
1074
+ * complement with `replayCampaign` (exact replay where the request hashes
1075
+ * match) for high-confidence answers and OPE for the gap.
1076
+ */
1077
+ interface OffPolicyTrajectory {
1078
+ /** Stable id, for traceability through the dataset. */
1079
+ runId: string;
1080
+ /** Reward observed under the behavior policy (the realized outcome). */
1081
+ reward: number;
1082
+ /**
1083
+ * Behavior-policy probability of the action that was taken. For LLM
1084
+ * agents this is typically `exp(sum(token_log_probs))` over the chosen
1085
+ * trajectory. Must be in (0, 1].
1086
+ */
1087
+ behaviorProb: number;
1088
+ /**
1089
+ * Target-policy probability of the same action. For replay-style
1090
+ * counterfactual evaluation this is what the *new* policy would have
1091
+ * assigned to the *old* trajectory. Must be in [0, 1].
1092
+ */
1093
+ targetProb: number;
1094
+ /**
1095
+ * Model-based reward prediction for the action selected by the behavior
1096
+ * policy: `Q_hat(context, loggedAction)`. Supply this together with
1097
+ * `vHatTarget` for contextual-bandit doubly-robust estimation.
1098
+ */
1099
+ qHatChosen?: number | null;
1100
+ /**
1101
+ * Expected model-based reward under the target policy:
1102
+ * `sum_action targetPolicy(action | context) * Q_hat(context, action)`.
1103
+ * Supply this together with `qHatChosen`. For an honest evaluation, both
1104
+ * values must come from a model cross-fitted or trained outside this row.
1105
+ */
1106
+ vHatTarget?: number | null;
1107
+ }
1108
+ interface OffPolicyContributionCounts {
1109
+ /** Contributions using the contextual-bandit doubly-robust formula. */
1110
+ dr: number;
1111
+ /** Contributions using exact IPS because no reward-model estimate was supplied. */
1112
+ ipsFallback: number;
1113
+ }
1114
+ interface OffPolicyEstimate {
1115
+ /** Estimated value of the target policy. */
1116
+ value: number;
1117
+ /** Standard error of the estimate. */
1118
+ standardError: number;
1119
+ /** Effective sample size (Kong 1992). Lower = more reliance on a few high-weight samples. */
1120
+ effectiveSampleSize: number;
1121
+ /** Number of trajectories used. */
1122
+ n: number;
1123
+ /**
1124
+ * Diagnostic: maximum importance weight observed. Large values (>>10x
1125
+ * mean) are a red flag — variance is dominated by a few outliers.
1126
+ */
1127
+ maxImportanceWeight: number;
1128
+ /** Populated by `doublyRobust` to expose which formula each row used. */
1129
+ contributionCounts?: OffPolicyContributionCounts;
1130
+ }
1131
+ interface OffPolicyOptions {
1132
+ /**
1133
+ * Cap importance weights at this value (Ionides 2008 truncated IS) to
1134
+ * trade unbiasedness for variance reduction. Default `Infinity` (no cap).
1135
+ * Set e.g. `10` for stable estimates when the policies are close.
1136
+ */
1137
+ weightCap?: number;
1138
+ /** Reward clipping range. Default `[0, 1]`. */
1139
+ rewardClip?: {
1140
+ low: number;
1141
+ high: number;
1142
+ };
1143
+ }
1144
+ /**
1145
+ * Inverse Probability Weighting (Horvitz-Thompson). Unbiased estimator
1146
+ * of E[reward under target policy]. Variance scales with the spread of
1147
+ * target/behavior ratios.
1148
+ */
1149
+ declare function inverseProbabilityWeighting(trajectories: OffPolicyTrajectory[], opts?: OffPolicyOptions): OffPolicyEstimate;
1150
+ /**
1151
+ * Self-Normalized Importance Sampling. Lower variance than vanilla IPS at
1152
+ * the cost of small bias (vanishing as N grows). The right default for
1153
+ * LLM-agent evaluation where overlap is often poor.
1154
+ */
1155
+ declare function selfNormalizedImportanceWeighting(trajectories: OffPolicyTrajectory[], opts?: OffPolicyOptions): OffPolicyEstimate;
1156
+ /**
1157
+ * Doubly-robust off-policy estimator (Dudík, Langford, Li 2011).
1158
+ *
1159
+ * V_DR = (1/N) * sum_i [ v_hat_target_i
1160
+ * + (target_prob_i / behavior_prob_i) * (r_i - q_hat_chosen_i) ]
1161
+ *
1162
+ * Unbiased if EITHER:
1163
+ * - the importance ratios are correct (IPS-style validity), OR
1164
+ * - the Q-hat function is correct (model-based validity).
1165
+ *
1166
+ * In practice both are imperfect, but the residual bias is the *product*
1167
+ * of both errors — much smaller than either alone. This is why DR is the
1168
+ * default in production OPE pipelines.
1169
+ *
1170
+ * `qHatChosen` and `vHatTarget` must be supplied together. Rows with neither
1171
+ * use the exact IPS contribution. `contributionCounts` makes the mix explicit
1172
+ * in the result.
1173
+ * Callers must cross-fit the Q-function or train it on independent rows;
1174
+ * fitting and evaluating Q on the same outcomes leaks the answer.
1175
+ */
1176
+ declare function doublyRobust(trajectories: OffPolicyTrajectory[], opts?: OffPolicyOptions): OffPolicyEstimate;
1177
+ /**
1178
+ * Convenience: run all three estimators and return them side-by-side.
1179
+ * The recommended diagnostic — agreement across estimators is a much
1180
+ * stronger signal than any single one.
1181
+ */
1182
+ declare function offPolicyEstimateAll(trajectories: OffPolicyTrajectory[], opts?: OffPolicyOptions): {
1183
+ ips: OffPolicyEstimate;
1184
+ snips: OffPolicyEstimate;
1185
+ dr: OffPolicyEstimate;
1186
+ };
1187
+ //#endregion
1038
1188
  //#region src/rl/predictive-validity-researcher.d.ts
1039
1189
  interface PredictiveValidityResearcherOptions {
1040
1190
  outcomes: OutcomeStore;
package/dist/rl.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"rl.d.ts","names":[],"sources":["../src/rl/active-curriculum.ts","../src/rl/adaptation-eval.ts","../src/rl/compute-curves.ts","../src/rl/contamination.ts","../src/rl/rollout-input.ts","../src/rl/preferences.ts","../src/rl/process-reward.ts","../src/rl/exporters.ts","../src/rl/dataset.ts","../src/rl/corpus.ts","../src/rl/predictive-validity-researcher.ts","../src/rl/rl-campaign.ts","../src/rl/run-record-adapters.ts","../src/rl/sim-fidelity.ts","../src/rl/tournament.ts"],"mappings":";;;;;;;;;;;;;;UAoCiB;EACf;EACA;;EAEA;;EAEA;;UAGe;EACf;EACA;;EAEA;;EAEA;;UAGe;;EAEf;;;;;;EAMA;;;;;EAKA;;;;;;;;;iBAUc,wBACd,cAAc,mBACd,gBAAgB;EAAQ;EAAmB;IAC3C,MAAM,4BACL;UAoDc;EACf;;;;;;EAMA;;EAEA;EACA;;EAEA;;;;;;;;;;;;;iBAcc,mBACd,cAAc,mBACd,gBAAgB;EAAQ;EAAmB;IAC3C,MAAM,4BACL;;iBAsDa,2BACd,MAAM,aACN;EAAQ;EAAwB;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UChMc,iBAAiB;;;;;;EAMhC,IAAI;IAAQ,UAAU;IAAG;IAAW;MAAgB;;UAGrC,0BAA0B;EACzC,WAAW;;EAEX;;EAEA;EACA,QAAQ,iBAAiB;;EAEzB;;UAGe;EACf;EACA;EACA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AY,aACZ,OAAM,kBACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UC/Xc;;EAEf;;EAEA;;;;;EAKA;;;;;;EAMA;;UAGe;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;EACf,SAAS;;EAET;;EAEA;EACA;;;;;;;;;;;iBAYc,gBACd,UAAU,mBACV;EAAQ;EAAoB;EAAwB;IACnD;;;;;;;;;UA+Gc;;EAEf;;EAEA;;iBAGc,eACd,SAAS,qBACT,SAAS,iBACT,OAAM;EACH;EAAqB;;;;;;;;UA2BT;EACf,MAAM;IACJ;;IAEA;IACA;;;;;;EAMF;;iBAGc,0BACd,OAAO,iCACN"}
1
+ {"version":3,"file":"rl.d.ts","names":[],"sources":["../src/rl/active-curriculum.ts","../src/rl/adaptation-eval.ts","../src/rl/compute-curves.ts","../src/rl/contamination.ts","../src/rl/rollout-input.ts","../src/rl/preferences.ts","../src/rl/process-reward.ts","../src/rl/exporters.ts","../src/rl/dataset.ts","../src/rl/corpus.ts","../src/rl/off-policy.ts","../src/rl/predictive-validity-researcher.ts","../src/rl/rl-campaign.ts","../src/rl/run-record-adapters.ts","../src/rl/sim-fidelity.ts","../src/rl/tournament.ts"],"mappings":";;;;;;;;;;;;;UAoCiB;EACf;EACA;;EAEA;;EAEA;;UAGe;EACf;EACA;;EAEA;;EAEA;;UAGe;;EAEf;;;;;;EAMA;;;;;EAKA;;;;;;;;;iBAUc,wBACd,cAAc,mBACd,gBAAgB;EAAQ;EAAmB;IAC3C,MAAM,4BACL;UAoDc;EACf;;;;;;EAMA;;EAEA;EACA;;EAEA;;;;;;;;;;;;;iBAcc,mBACd,cAAc,mBACd,gBAAgB;EAAQ;EAAmB;IAC3C,MAAM,4BACL;;iBAsDa,2BACd,MAAM,aACN;EAAQ;EAAwB;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UChMc,iBAAiB;;;;;;EAMhC,IAAI;IAAQ,UAAU;IAAG;IAAW;MAAgB;;UAGrC,0BAA0B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;EAAqB;GAC7C;EAAQ;IACP;;;;;;;KCnCS,oBAAoB,QAAQ,cAAc;;;;;cAMzC;;;cAIA;;;cAIA;;;;;cAMA;;;;;;;;;;;;;;;;;;;;;;cAyBA,yBAAyB;;;;;;;;;iBAmDtB,aAAa,GAAG,wBAAwB,GAAG;;;;;;;iBAqC3C,cAAc,kBAAkB;;;iBAsBhC,YAAY,eAAe;UAU1B;;EAEf;;;EAGA;;EAEA;;UAGe;EACf;;EAEA;;EAEA,WAAW;;EAEX;;EAEA;;KAGU;UAEK;EACf,cAAc;;;;EAId;;;EAGA;;;EAGA,SAAS;;UAGM;;EAEf,WAAW;;EAEX;;;;;;;;iBASc,kBACd,WAAW,aACX,YAAY,aACZ,OAAM,qBACL;UAuHc;;;EAGf;;;EAGA;;UAGe;EACf;EACA;;EAEA;;;EAGA;;;;;;;;;iBAUc,cACd,WAAW,aACX,YAAY,aACZ,OAAM,kBACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UC/Xc;;EAEf;;EAEA;;;;;EAKA;;;;;;EAMA;;UAGe;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;EACf,SAAS;;EAET;;EAEA;EACA;;;;;;;;;;;iBAYc,gBACd,UAAU,mBACV;EAAQ;EAAoB;EAAwB;IACnD;;;;;;;;;UA+Gc;;EAEf;;EAEA;;iBAGc,eACd,SAAS,qBACT,SAAS,iBACT,OAAM;EACH;EAAqB;;;;;;;;UA2BT;EACf,MAAM;IACJ;;IAEA;IACA;;;;;;EAMF;;iBAGc,0BACd,OAAO,iCACN"}
package/dist/rl.js CHANGED
@@ -7,11 +7,10 @@ import { t as isSplitEligible } from "./exporters-q9iL-2Jf.js";
7
7
  import { t as mintRolloutRows } from "./mint-D5_87M5L.js";
8
8
  import { a as InMemoryTraceStore } from "./integrity-BzRbCHzi.js";
9
9
  import { c as campaignCellToRunRecord, i as filterDeterministicallyRewarded, n as extractVerifiableReward, r as extractVerifiableRewardsFromRecords, t as detectRewardHacking } from "./reward-hacking-BEvjdUtD.js";
10
- import { t as runEvalCampaign } from "./eval-campaign-C2k-m4aY.js";
10
+ import { t as runEvalCampaign } from "./eval-campaign-CYkUME2T.js";
11
11
  import { t as evaluateInterimReleaseConfidence } from "./sequential-Br0mAPHA.js";
12
12
  import { t as rubricPredictiveValidity } from "./rubric-predictive-validity-B3xmbmS1.js";
13
13
  import { n as thompsonCurriculum, r as varianceBasedCurriculum, t as observationsFromRunRecords } from "./active-curriculum-C4mk67HP.js";
14
- import { i as selfNormalizedImportanceWeighting, n as inverseProbabilityWeighting, r as offPolicyEstimateAll, t as doublyRobust } from "./off-policy-DvgzvtIx.js";
15
14
  import { n as InMemoryOutcomeStore, t as FileSystemOutcomeStore } from "./outcome-store-ChBKlTd_.js";
16
15
  import { appendFileSync, existsSync, mkdirSync, readFileSync } from "node:fs";
17
16
  import { dirname } from "node:path";
@@ -1242,6 +1241,222 @@ async function buildDatasetFromCorpus(corpusPath, config, opts = {}) {
1242
1241
  return buildRlDataset(rows, lookups, config);
1243
1242
  }
1244
1243
  //#endregion
1244
+ //#region src/rl/off-policy.ts
1245
+ /**
1246
+ * Off-policy evaluation primitives.
1247
+ *
1248
+ * Standard inverse-probability-weighted (IPS), self-normalized
1249
+ * importance-weighted (SNIPS), and doubly-robust (DR) estimators for the
1250
+ * value of a *target* policy given trajectories collected under a
1251
+ * *behavior* policy. This is the canonical RL eval task: "we have last
1252
+ * week's runs, we changed the policy — how would the new one do without
1253
+ * re-running?"
1254
+ *
1255
+ * The math here is textbook (Dudík, Langford, Li 2011 for DR; Swaminathan
1256
+ * & Joachims 2015 for SNIPS) but the *application* to LLM-agent
1257
+ * evaluation needs care:
1258
+ *
1259
+ * - The "policy" is the (prompt, tool config, model snapshot) triple.
1260
+ * Two policies have the same probability over an action *iff* their
1261
+ * LLM call would emit the same token with the same probability —
1262
+ * which is generally unknowable without the model log-probs.
1263
+ * - For LLM agents, propensity scores must be supplied by the caller
1264
+ * (logged in the trace, recovered from token log-probs, or estimated
1265
+ * via a learned propensity model). We do NOT estimate propensity here.
1266
+ * - Doubly-robust requires two outputs from a Q-function: its prediction
1267
+ * for the logged action and its expectation under the target policy.
1268
+ * Consumers compute these with a tabular estimate, regression fit, or
1269
+ * learned reward model before constructing the trajectories.
1270
+ *
1271
+ * Bias / variance tradeoffs:
1272
+ * - IPS: unbiased; high variance for small overlap, infinite variance
1273
+ * when target has support outside behavior.
1274
+ * - SNIPS: lower variance, slight bias; usually preferred in practice.
1275
+ * - DR: doubly-robust — unbiased if either propensity OR Q-function is
1276
+ * correct. Lowest practical variance when Q is decent. Use this.
1277
+ *
1278
+ * Caveat the panel will land: on the LLM-agent setting, propensity scores
1279
+ * recovered from token log-probs are noisy, the action space is enormous,
1280
+ * and overlap is often poor. These estimators are useful but not magic;
1281
+ * complement with `replayCampaign` (exact replay where the request hashes
1282
+ * match) for high-confidence answers and OPE for the gap.
1283
+ */
1284
+ /**
1285
+ * Inverse Probability Weighting (Horvitz-Thompson). Unbiased estimator
1286
+ * of E[reward under target policy]. Variance scales with the spread of
1287
+ * target/behavior ratios.
1288
+ */
1289
+ function inverseProbabilityWeighting(trajectories, opts = {}) {
1290
+ const cap = opts.weightCap ?? Infinity;
1291
+ const clip = opts.rewardClip ?? {
1292
+ low: 0,
1293
+ high: 1
1294
+ };
1295
+ if (trajectories.length === 0) return zeroEstimate();
1296
+ const weights = [];
1297
+ const weightedRewards = [];
1298
+ let maxW = 0;
1299
+ for (const t of trajectories) {
1300
+ if (t.behaviorProb <= 0) throw new ValidationError(`inverseProbabilityWeighting: behaviorProb must be > 0 (runId=${t.runId})`);
1301
+ const w = Math.min(cap, t.targetProb / t.behaviorProb);
1302
+ const r = clamp(t.reward, clip.low, clip.high);
1303
+ weights.push(w);
1304
+ weightedRewards.push(w * r);
1305
+ if (w > maxW) maxW = w;
1306
+ }
1307
+ const n = weights.length;
1308
+ const value = weightedRewards.reduce((s, x) => s + x, 0) / n;
1309
+ const variance = weightedRewards.reduce((s, x) => s + (x - value) ** 2, 0) / Math.max(1, n - 1);
1310
+ const sumW = weights.reduce((s, w) => s + w, 0);
1311
+ const sumW2 = weights.reduce((s, w) => s + w * w, 0);
1312
+ const effN = sumW === 0 ? 0 : sumW * sumW / sumW2;
1313
+ return {
1314
+ value,
1315
+ standardError: Math.sqrt(variance / n),
1316
+ effectiveSampleSize: effN,
1317
+ n,
1318
+ maxImportanceWeight: maxW
1319
+ };
1320
+ }
1321
+ /**
1322
+ * Self-Normalized Importance Sampling. Lower variance than vanilla IPS at
1323
+ * the cost of small bias (vanishing as N grows). The right default for
1324
+ * LLM-agent evaluation where overlap is often poor.
1325
+ */
1326
+ function selfNormalizedImportanceWeighting(trajectories, opts = {}) {
1327
+ const cap = opts.weightCap ?? Infinity;
1328
+ const clip = opts.rewardClip ?? {
1329
+ low: 0,
1330
+ high: 1
1331
+ };
1332
+ if (trajectories.length === 0) return zeroEstimate();
1333
+ const weights = [];
1334
+ const rewards = [];
1335
+ let maxW = 0;
1336
+ for (const t of trajectories) {
1337
+ if (t.behaviorProb <= 0) throw new ValidationError(`selfNormalizedImportanceWeighting: behaviorProb must be > 0 (runId=${t.runId})`);
1338
+ const w = Math.min(cap, t.targetProb / t.behaviorProb);
1339
+ weights.push(w);
1340
+ rewards.push(clamp(t.reward, clip.low, clip.high));
1341
+ if (w > maxW) maxW = w;
1342
+ }
1343
+ const sumW = weights.reduce((s, w) => s + w, 0);
1344
+ const sumWR = weights.reduce((s, w, i) => s + w * rewards[i], 0);
1345
+ const value = sumW === 0 ? 0 : sumWR / sumW;
1346
+ const sumW2 = weights.reduce((s, w) => s + w * w, 0);
1347
+ const effN = sumW === 0 ? 0 : sumW * sumW / sumW2;
1348
+ const variance = weights.map((w, i) => w * (rewards[i] - value)).reduce((s, x) => s + x * x, 0) / Math.max(1, sumW * sumW);
1349
+ return {
1350
+ value,
1351
+ standardError: Math.sqrt(variance),
1352
+ effectiveSampleSize: effN,
1353
+ n: trajectories.length,
1354
+ maxImportanceWeight: maxW
1355
+ };
1356
+ }
1357
+ /**
1358
+ * Doubly-robust off-policy estimator (Dudík, Langford, Li 2011).
1359
+ *
1360
+ * V_DR = (1/N) * sum_i [ v_hat_target_i
1361
+ * + (target_prob_i / behavior_prob_i) * (r_i - q_hat_chosen_i) ]
1362
+ *
1363
+ * Unbiased if EITHER:
1364
+ * - the importance ratios are correct (IPS-style validity), OR
1365
+ * - the Q-hat function is correct (model-based validity).
1366
+ *
1367
+ * In practice both are imperfect, but the residual bias is the *product*
1368
+ * of both errors — much smaller than either alone. This is why DR is the
1369
+ * default in production OPE pipelines.
1370
+ *
1371
+ * `qHatChosen` and `vHatTarget` must be supplied together. Rows with neither
1372
+ * use the exact IPS contribution. `contributionCounts` makes the mix explicit
1373
+ * in the result.
1374
+ * Callers must cross-fit the Q-function or train it on independent rows;
1375
+ * fitting and evaluating Q on the same outcomes leaks the answer.
1376
+ */
1377
+ function doublyRobust(trajectories, opts = {}) {
1378
+ const cap = opts.weightCap ?? Infinity;
1379
+ const clip = opts.rewardClip ?? {
1380
+ low: 0,
1381
+ high: 1
1382
+ };
1383
+ if (trajectories.length === 0) return {
1384
+ ...zeroEstimate(),
1385
+ contributionCounts: {
1386
+ dr: 0,
1387
+ ipsFallback: 0
1388
+ }
1389
+ };
1390
+ const contributions = [];
1391
+ const contributionCounts = {
1392
+ dr: 0,
1393
+ ipsFallback: 0
1394
+ };
1395
+ let maxW = 0;
1396
+ let sumW = 0;
1397
+ let sumW2 = 0;
1398
+ for (const t of trajectories) {
1399
+ if (t.behaviorProb <= 0) throw new ValidationError(`doublyRobust: behaviorProb must be > 0 (runId=${t.runId})`);
1400
+ const w = Math.min(cap, t.targetProb / t.behaviorProb);
1401
+ const r = clamp(t.reward, clip.low, clip.high);
1402
+ const rawQHatChosen = t.qHatChosen;
1403
+ const rawVHatTarget = t.vHatTarget;
1404
+ const hasQHatChosen = rawQHatChosen !== null && rawQHatChosen !== void 0;
1405
+ const hasVHatTarget = rawVHatTarget !== null && rawVHatTarget !== void 0;
1406
+ if (hasQHatChosen !== hasVHatTarget) throw new ValidationError(`doublyRobust: qHatChosen and vHatTarget must be supplied together (runId=${t.runId})`);
1407
+ if (hasQHatChosen && hasVHatTarget) {
1408
+ if (!Number.isFinite(rawQHatChosen) || !Number.isFinite(rawVHatTarget)) throw new ValidationError(`doublyRobust: qHatChosen and vHatTarget must be finite (runId=${t.runId})`);
1409
+ const qHatChosen = clamp(rawQHatChosen, clip.low, clip.high);
1410
+ const vHatTarget = clamp(rawVHatTarget, clip.low, clip.high);
1411
+ contributions.push(vHatTarget + w * (r - qHatChosen));
1412
+ contributionCounts.dr += 1;
1413
+ } else {
1414
+ contributions.push(w * r);
1415
+ contributionCounts.ipsFallback += 1;
1416
+ }
1417
+ if (w > maxW) maxW = w;
1418
+ sumW += w;
1419
+ sumW2 += w * w;
1420
+ }
1421
+ const n = contributions.length;
1422
+ const value = contributions.reduce((s, x) => s + x, 0) / n;
1423
+ const variance = contributions.reduce((s, x) => s + (x - value) ** 2, 0) / Math.max(1, n - 1);
1424
+ const effN = sumW === 0 ? 0 : sumW * sumW / sumW2;
1425
+ return {
1426
+ value,
1427
+ standardError: Math.sqrt(variance / n),
1428
+ effectiveSampleSize: effN,
1429
+ n,
1430
+ maxImportanceWeight: maxW,
1431
+ contributionCounts
1432
+ };
1433
+ }
1434
+ /**
1435
+ * Convenience: run all three estimators and return them side-by-side.
1436
+ * The recommended diagnostic — agreement across estimators is a much
1437
+ * stronger signal than any single one.
1438
+ */
1439
+ function offPolicyEstimateAll(trajectories, opts = {}) {
1440
+ return {
1441
+ ips: inverseProbabilityWeighting(trajectories, opts),
1442
+ snips: selfNormalizedImportanceWeighting(trajectories, opts),
1443
+ dr: doublyRobust(trajectories, opts)
1444
+ };
1445
+ }
1446
+ function zeroEstimate() {
1447
+ return {
1448
+ value: 0,
1449
+ standardError: 0,
1450
+ effectiveSampleSize: 0,
1451
+ n: 0,
1452
+ maxImportanceWeight: 0
1453
+ };
1454
+ }
1455
+ function clamp(x, lo, hi) {
1456
+ if (!Number.isFinite(x)) return lo;
1457
+ return Math.max(lo, Math.min(hi, x));
1458
+ }
1459
+ //#endregion
1245
1460
  //#region src/rl/predictive-validity-researcher.ts
1246
1461
  /**
1247
1462
  * Concrete `Researcher` driven by `rubricPredictiveValidity`. The brain: