Repository navigation
research: define and pilot compute-matched agent decision evaluation #206
Description
Objective
Based on Qiming Bao's protocol v0, test whether multi-agent discussion improves decisions relative to single-agent alternatives under comparable inference budgets. Characterize intervention sensitivity without claiming causal attribution.
Complements #177, which evaluates the full adaptive evolution campaign.
Four experimental arms
Same model and frozen input information:
- A: Single-pass baseline.
- B: Multiple sampling plus aggregation.
- C: Self-reflection and revision.
- D: Multi-agent discussion and revision.
A is a lower-budget reference. Match B/C/D using a preregistered input-plus-output token budget. Record actual usage, calls, retries, cost and latency, including reasoning-token usage where available. Select parameters on separate development cases; freeze them before formal evaluation. Reserve a final-answer budget and define invalid/truncated-output handling.
Prepared materials
Development package: https://drive.google.com/file/d/10hwNT5FKbCQ2vkNe2zNvwbzJfO5z0h7q/view?usp=drivesdk
Access is restricted to the maintainer and Qiming; the files are not publicly downloadable.
Contents:
- Research output field inventory, instrumentation gaps and model information.
- Stored market-data coverage for 49 venue/symbol/timeframe groups.
- 41 TSLA daily OHLCV rows from May–June 2026 for adapter development.
Inventory limitations:
- Production research_memory is empty; complete debate persistence elsewhere has not been established.
- Response schemas expose analyst briefs, debate turns and synthesis, but do not prove historical persistence.
- Per-call usage capture needs instrumentation.
- The sample lacks aligned benchmark data, point-in-time evidence bundles and evaluation labels.
- Research service configuration is deepseek-chat; immutable version and training cutoff remain unverified.
- Stored bar timestamps do not establish when complete bars became available.
These materials are development inputs, not the formal evaluation dataset.
Protocol decisions
- Select asset/calendar, decision time, entry timing, horizon, benchmark and transaction costs.
- Define long/neutral/short labels and probability semantics for Brier score.
- Freeze evidence bundles using only information available at each decision.
- Separate development cases from formal evaluation.
- Preregister primary metrics, paired comparisons and block bootstrap accounting for overlapping outcome windows.
- Finalize blinded process scoring: factual errors, constraint violations, omitted key evidence; annotate evidence before seeing outcomes; human-review sample and agreement reporting.
- Record model/version and contamination limitations; anonymization alone does not eliminate training contamination.
The proposed formal scale is 150–300 decision points, subject to data readiness and agreed model budget.
Interventions
- Remove an agent contribution; compare deletion and length-matched unrelated replacement.
- Keep evidence fixed and flip one agent's stated conclusion.
- Remove claimed key evidence with an explicit replay boundary, preventing re-entry through retained messages.
Freeze intervention selection rules. Report paired decision-flip rates and confidence changes, initially as sensitivity measures.
First milestone: reproducible development pilot
- Confirm inputs and identify minimal missing fields.
- Run all four arms over identical frozen development cases.
- Capture prompts, evidence references, configuration, outputs and per-call usage.
- Retain failures, truncations and invalid outputs.
- Smoke-test the three interventions.
- Produce a paired report of outputs, actual budgets and limitations.
The pilot validates the machinery, not multi-agent superiority.
Proposed collaboration
Qiming has offered to lead protocol refinement, runners, intervention scripts and analysis. Invite him to begin by checking the prepared input/logging inventory and proposing the minimal gaps.
The maintainer supports missing data/access, clarifies existing interfaces and agrees on model resources before paid runs. Do not assume production access or an unlimited provider budget.
Acceptance criteria
- Versioned protocol and scoring rules frozen before formal evaluation.
- Four arms run on the same development cases.
- Budget enforcement and incomplete-run handling verified.
- Evidence, outputs and usage traceable per run.
- Explicit replay semantics for all three interventions.
- Development and formal samples separated.
- Positive, negative and inconclusive outcomes retained.
- Data and model-version limitations documented.
Non-goals
Changing E2 search/graduation rules; automatic promotion or order execution; claiming stable Alpha; a broad causal-attribution framework.
Material contract and readiness linkage (2026-10-10)
#208 / merged PR #213 provide the versioned manifest, call-linked artifacts, frozen evidence and offline validation contract in docs/usage/README.md. Readiness evidence is in docs/validation/unified-usage-production-2026-10-10.md (follow-up PR).
Before real-data interpretation, agree asset/calendar, benchmark, decision and entry timing, horizon, costs, probabilities/thresholds, scoring and call budget; supply aligned cases, deterministic labels and blinded annotations with provenance. Immutable model revision/training cutoff remain unknown. Tooling is delivered; these protocol choices are not frozen by this linkage. The proposed price-only TSLA/SPY development pilot still awaits maintainer selection.
Development implementation update (2026-10-12)
Draft PR #226 implements the aligned-material preparation and four-arm run/replay/report chain with the unified ledger. The real TSLA/SPY package contains 542 aligned daily sessions and ten frozen development cases with separate committed outcome labels.
With the maintainer-approved total US$5 cap, real DeepSeek calls completed 40/40 base runs and six replay runs. One uncited-evidence placebo was explicitly skipped because every evidence block was cited. Calibration plus campaign used 310 calls, 279,813 input and 63,497 output tokens, for US$0.1601403 estimated cost (not an invoice). All 296 main call IDs exactly match the ledger; no pending/unknown usage remains. Every completed run passed artifact validation.
Calibrated B/C/D settings are 11 samples / 6 revisions / 2 rounds. Actual token medians are 9,348 / 9,383 / 9,324 (within 10%); the 24,000 cap is a guard, not an achieved formal target. Calibration reused dev-001, and all ten cases remain development-only. Brier means A/B/C/D: .81066 / .77360 / .68910 / .72692; no superiority claim. Evidence-removal output misattributed benchmark returns to the asset; this factual error is retained. Substring-based re-entry flags require inspection and are now named separately from exact citations.
Research suite previously passed 214 tests; all three formerly skipped dedicated-Postgres tests subsequently passed. Updated pilot regressions: 18 passed. Independent review found one label-validation P2, fixed and re-reviewed. GitHub automated review produced no publishable review and is not counted as effective CR. See docs/validation/research-pilot-readiness-2026-10-12.json and docs/usage/four-arm-pilot.md.
Exact provider-tokenizer intervention controls, blinded human process review, formal protocol freeze and disjoint formal cases remain open. Immutable model revision/training cutoff remain unknown. The development machinery now runs end-to-end; this is not formal evaluation readiness and does not close this issue.
Activity
mirror29 commentedon Oct 10, 2026
Supporting data and recording gaps are now tracked in #208, coordinated by the maintainer. This does not block starting protocol/schema design, the four-arm runner, usage instrumentation or intervention scaffolding with development fixtures.
We will agree the minimal pilot input/logging format together. Benchmark-aligned labels and frozen point-in-time evidence are required before interpreting the real-data pilot, and the readiness checks in #208 must be resolved before formal evaluation. No additional ownership is assumed for Qiming beyond the contribution scope already discussed.
14H034160212 commentedon Oct 10, 2026
Protocol v0.1 — clarifications (decision semantics, budget exhaustion, intervention 3)
Proposed for the price-only TSLA/SPY development pilot; all values frozen before formal evaluation and open to revision until then.
1. Decision, probability and scoring semantics
Timing
t= after the close of sessiont; only bars whose session has completed are model-visible.t+1, exit at the open oft+1+H. PrimaryH = 5sessions (secondaryH = 20in formal evaluation only).Outcome
r = R_TSLA − R_SPYover the same open-to-open window (simple excess, no beta adjustment; limitation noted).Labels
UPifr > +τ,DOWNifr < −τ,FLATotherwise.τ = 0.5 × σ(5-day excess return), estimated on a window strictly before the first development case. Freeze it; never re-estimate on evaluation data.Model output
(p_up, p_flat, p_down)summing to 1, plus actions ∈ {+1, 0, −1}and cited evidence IDs.Metrics
Σ_k (p_k − y_k)².P&L and costs
s · r − c · |s|, withc= 20 bp round trip (10 bp per side).−r; borrow cost is ignored in the pilot (documented limitation).Inference
2. Budget enforcement and incomplete runs
Budget accounting
B= input + output tokens, including reasoning tokens where reported.Final-answer reserve
B_final = 0.15·Bis reserved for the final aggregation/synthesis call.B − B_final.Pre-call guard
tokenized_input + max_tokens. If this exceeds the remaining working budget, skip the call and go to the final stage.max_tokensis set from the remaining budget, no call can overrun by construction.Early stop per arm
Final-call failure
INVALIDwith a reason code.Statistics
INVALID= action 0 and probabilities (1/3, 1/3, 1/3).Parameter selection
k,r,N × Rare chosen on development cases so that median usage ≈B(tolerance ±10%), then frozen.A's actual usage defines the 1× reference.3. Interventions — replay semantics
Evidence IDs
Intervention 3 — remove claimed key evidence
NO_CITED_EVIDENCE.Interventions 1 and 2 — explicit boundary
a's message at roundj.aandjis fixed in advance: the analyst whose stance the final decision most resembles, last discussion round.Noise baseline (all interventions)
Reporting
Logging requirements for #208
Per call:
Per case:
14H034160212 commentedon Oct 10, 2026
Follow-up after reviewing the 2026-10-10 materials package
Thanks for the inventory — clear about what exists versus what is only in the schema. Three items affect the v0.1 protocol; none changes its structure.
1. Benchmark data is the first blocking gap
2. Arm D must be adapted from the production research flow
briefs[].confidenceand the finalconfidenceare self-reported scalars, not class probabilities. In the experiment, the synthesis step must emit(p_up, p_flat, p_down), an action and cited evidence IDs (v0.1 §1). Analyst briefs keep their native fields for logging.debate_trigger/debate_stop_reasoncan skip or shorten discussion in production. For the experiment, D runs a fixedN × Rwith these switches disabled, so the arm definition does not vary per case.complete_jsondrops usage, I will add a wrapper in the experimental runner that records per-call usage, latency, attempt and status (feat(usage): unify LLM accounting and prepare research pilot evidence #208 item 2). Production code does not need to change for the pilot.3. Contamination handling for the price-only pilot
Development sample
Using the full stored TSLA series for lookback, the 41-row sample yields roughly 30 decision points at H = 5, enough for the 10–20-case machinery pilot. These dates will be excluded from the formal evaluation set.
Question
Hourly BTC/ETH data runs to 2026-10-10 and is the only stored series that could plausibly fall after a model cutoff. Would a crypto replication arm be useful later as a contamination check? It would use a bar-count horizon (e.g. 24 × 1h bars) in place of trading days. I would not add it to the first pilot.
mirror29 commentedon Oct 12, 2026
Hi Qiming,
Thank you for the v0.1 clarifications and the follow-up after reviewing the materials. I have now prepared the missing benchmark data and a downloadable development snapshot:
TSLA/SPY development materials
Read-only access is enabled for your existing contact account. The packet includes:
This is the snapshot used for the reference runner's development acceptance. It replaces the earlier 41-case packet for that runner; the two packages have different provisional thresholds and are not interchangeable. The current tau is approximately 3.79538%. The estimation-window choice remains open for agreement, and the returns exclude SPY dividend cashflows.
Following up on your implementation points
PR #226 is now merged into main. It provides a reference four-arm adapter with three-class probabilities, evidence IDs, configured discussion rounds, budget-stop recording and per-call unified usage capture. I hope this gives us a useful starting point and saves some integration work.
Your relative-feature-only approach is also reflected in the model-input projection. Dates, tickers and absolute prices remain outside that projection. Historical publication timing is still a stated development assumption, not verified archival availability, and anonymization does not establish absence of training contamination.
The development acceptance used deepseek-flash to exercise the implementation. This is not a decision about the model for our formal protocol; immutable revision and training cutoff remain unknown.
On BTC/ETH, I agree with leaving it out of the first pilot. It could be useful for later cross-market replication, although without verified cutoff evidence I would not describe it as a confirmed post-cutoff contamination control.
Open points for discussion
The current implementation still uses conservative token estimates rather than an exact provider tokenizer, and intervention length controls are not yet precisely token-matched. Human process review and independent formal cases also remain open. The ten-case run is development validation, not evidence of multi-agent superiority.
Implementation guide
I would be interested in your view on where this baseline matches v0.1 and where it should change, particularly around budget handling, intervention controls and scoring. Your protocol perspective would be valuable here; the implementation choices are not intended to pre-empt that discussion.
I will continue coordinating the supporting data and materials under #208. No new paid run is assumed by this handoff; we can agree the run budget separately.
14H034160212 commentedon Oct 15, 2026
Review of the #226 baseline against v0.1
Thanks — the runner, ledger reconciliation and fail-closed accounting are more careful than v0.1 specified. I reviewed
pilot/experiment.py,campaign.py,report.py,materials.py,four-arm-pilot.mdand the 2026-10-12 readiness receipt; I have not re-run any model calls. Proposals below are ordered by how much they could change conclusions.0. Threshold and benchmark (your two open questions)
I reproduced the packet's τ = 3.79538% exactly from Yahoo data with
materials.pylogic, so we are on the same series.τ window.
The 491 pre-development windows span a volatility regime shift:
With 3.80%, FLAT is 49% of calibration windows.
Proposal for formal:
The development τ can stay as is for machinery testing.
SPY dividends.
actions=True.Proposal: add the cash dividend to the benchmark return when the ex-date falls in (entry, exit]. TSLA has no dividends or splits in range.
1. Scoring
1a. Add reference forecasts.
On the ten development cases:
(1/3, 1/3, 1/3)scores 0.667 and beats every arm (A .811, B .774, C .689, D .727).Without references, "D beats A" could mean "D is less overconfident".
Proposal:
1b. The v0.1 ITT fallback rewards failure — my error, should be changed.
The uniform fallback (0.667) beats every arm's actual mean, so an invalid run currently scores better than a valid one.
Proposal:
Invalid count was 0 in development, so no current result changes.
1c. B aggregation.
v0.1 described B as vote/averaging; #226 uses an LLM aggregation call. Both are reasonable, but they are different arms.
Proposal:
B-mean: the arithmetic mean of the completed sample probability vectors, action = argmax. This uses the same calls and costs nothing extra.B-mean ≈ B, the aggregation call adds nothing.2. Sampling and budget
2a. Temperature.
All calls use 0.2. Self-consistency relies on sample diversity, so 11 near-identical samples understate B.
Proposal:
2b. Per-case matching.
Medians match within 10%, but the 24k cap never binds, so per-case usage can still differ systematically by arm.
Proposal:
arm_tokens = 1.1 × targetso the cap binds and report the truncation rate per arm.I lean to fixed units plus reported dispersion, because a binding cap makes the number of discussion rounds vary across cases.
3. Intervention controls
3a. Flip conclusion currently also changes the evidence argument and announces itself.
The rationale is replaced with
"Intervention: the analyst's stated conclusion is reversed.". Downstream turns therefore see the word "Intervention" and lose the original argument.Proposal:
p_up/p_downandaction.This is the "evidence fixed, conclusion flipped" condition. The resulting rationale/conclusion inconsistency is part of the stimulus and should be noted as such.
3b. Deletion marker.
{"removed": true}tells later turns that something was taken out.Proposal: omit the entry entirely as the primary deletion. Optionally keep the marker as a secondary variant.
3c. Replacement control.
Repeated
"A fictional room has plain walls."is trivially recognizable as filler.Proposal: use natural, topic-unrelated prose from a fixed, versioned corpus, matched by provider-reported prompt tokens. Measure this with one counting call per candidate, or with the DeepSeek tokenizer if it is available offline.
3d. Coverage.
--intervention-casesdefaults to 1. Formally, preregister either all cases or a seeded random subset, and report the per-intervention skip rate. For example, the evidence placebo is skipped whenever every block is cited; NO_UNCITED_EVIDENCE has already occurred once.The zero flips across 6 replays are consistent with real robustness, with low temperature, or with the controls above. We can't distinguish these yet.
4. Formal sample
The ten development cases are consecutive with H = 5, so they span roughly two independent outcome windows. With TSLA alone, a stride of 5 sessions after the 252-session lookback gives about 55 non-overlapping cases, short of the 150–300 target.
Proposal:
Ticker choice can be made by a rule frozen in advance, for example the largest by average dollar volume at the start of the window.
Proposed next step
If you agree with 0–3, I can open a PR against
pilot/with:B-mean;No paid calls; the re-run would happen after you approve a budget. Section 4 can be settled in this thread before the formal freeze.
docs(research): state strict ITT as primary and record uncovered revi…
14H034160212 commentedon Oct 17, 2026
Protocol revision v0.2 (proposal for item-by-item confirmation)
Follows the #248 review. Each item gives the proposed rule; please confirm, amend or reject per item. Nothing here is frozen until we agree.
--benchmark-dividends). Price-only is kept as a sensitivity check.Data requirement this creates (#208)
Item 7 needs feature lookback (252 sessions), τ calibration (252 windows) and the formal period itself. The current packet starts 2024-05-07, which leaves essentially no room for formal decisions before the development window.
Request: extend all formal tickers and SPY back to about 2023-05, under the same vendor and adjustment conventions. With formal decisions then spanning roughly 2025-05 to 2026-04, a stride of 5 gives about 46 dates × 6 tickers ≈ 275 cases, inside the 150–300 target.
Rough cost (for the budget decision, not an authorization)
A short development re-run validating item 5 and the new intervention stimuli would come first, at a separately agreed budget.
Still open (unchanged)
Once items 1–8 are agreed, I'll implement the §2b and §3d reporting, plus a rescoring command for existing outputs that writes a separate report and leaves originals untouched, as offline follow-ups with regression tests.
feat(research): apply #206 review to the four-arm pilot (#248)
mirror29 commentedon Oct 20, 2026
Hi Qiming,
Thanks for the v0.2 proposal and the documentation follow-up. I have merged #248 after all 13 CI checks passed. This delivers the development improvements; it does not freeze the formal protocol or authorize new paid runs.
I agree in principle with climatology-referenced scoring, strict ITT, frozen per-ticker calibration, and B sampling at 0.8 with other calls at 0.2. Before freezing v0.2, please refine these points:
Budget design. A cap of 1.1 × T can truncate fixed-unit runs, especially with the current conservative input reservation. Please distinguish the matching target from the safety cap, and report budget stops, completed units and invalid rates. We should preregister how to handle missed matching thresholds without dropping cases or retuning after inspecting formal results.
Data coverage and sample isolation. The feature lookback and calibration windows can overlap in the current implementation, so they do not automatically require two consecutive years of warm-up. Please derive the required dates and final case count explicitly. Parts of the proposed formal period were also used in development threshold/base-rate analysis; we should document that exposure and agree whether to use a retrospective held-out evaluation or select a stricter independent period.
Multi-ticker conventions. Use S&P 500 membership known at the formal start, with explicit share-class and missing-data rules. Apply consistent dividend and corporate-action treatment to both stocks and SPY. The formal adapter will also need per-ticker climatology, a defined pooled BSS calculation, and date-block resampling that keeps same-date tickers together. Please specify the primary contrast direction, bootstrap block length and treatment of the three primary comparisons.
Intervention accounting. Sampling 40 cases from valid D base runs is reasonable, provided conclusions are explicitly conditional on D validity. Please report the full pool, valid D pool, selected cases, inapplicable skips, failed/invalid replays, and valid intervention–noise pairs. Also define what happens if fewer than 40 cases qualify.
Please continue the offline work in parallel; you do not need to wait for #208 to be completed. The protocol revision, budget/intervention reporting, separate rescoring command, and multi-ticker scaffolding can proceed with existing development materials or synthetic fixtures and regression tests. Rescoring should preserve the original outputs.
I will continue coordinating supporting data and provenance under #208. If a specific step needs additional inputs, please identify the minimal fields and coverage required so I can supply them alongside your implementation.
A small development re-run can use the existing materials once we agree its configuration and separate budget. Formal evaluation will require the relevant data-readiness gates and protocol freeze. The formal cost estimate should be updated once case counts, replay/control counts and retry allowances are fixed.
Exact token matching, blinded human process review, and model revision/training-cutoff limitations remain open, but they need not block the offline steps above.
Thanks again for moving this forward carefully.
Best,
Miro