Add the fair test of the composition: 8 cases judged against SEVERAL real trials
(agreeing or conflicting) so MultiVerS/PyMARE/STORM actually fire — including
aggregate reversals (niacin HPS2-THRIVE/AIM-HIGH, intensive BP in diabetics
SPRINT-excluded vs ACCORD, HRT observational vs WHI, beta-carotene ATBC/CARET)
and an over-generalized SGLT2 class claim (EMPA-REG vs DECLARE).
Honest result: Mixture of Agents and Claude-alone BOTH score 8/8 (100%). The MoA
does not beat a strong frontier model here. Documented plainly: across both
benchmarks the MoA's value is NOT a raw-accuracy edge — it is reproducibility,
decomposable per-agent/per-source provenance, and deterministic effect-size math
(the auditability moat), which a leaderboard number doesn't capture. Caveat noted
that 8 NEI-free cases is too small to claim any accuracy separation either way.
New: scripts/benchmark/multisource.ts (MoA vs Claude-alone over the fixture).
Add lib/moa/agents/magnitude.ts — a deterministic verifier that recomputes the
claim's asserted effect magnitude against each source's HR/RR/OR + CI (via
lib/effectSize.reconcile) and votes refutes on overstatement / dropped caveat.
This brings PaperTrail's flagship SINGLE-source distortion catch into the
mixture (PyMARE only pools >=2 sources), consuming quant-extractor's effect_sizes
for grounding. No LLM in the numeric path.
Wire a "Mixture of Agents" system into scripts/benchmark/run.ts (opt-in via
MOA_ENABLED=true), mapping the deterministic aggregate verdict to the
SUPPORT/CONTRADICT/NEI benchmark labels, to quantify the composition vs
Claude-alone and the single-engine reconcile path.
Turn the MoA smoke into a 2-scenario regression:
- A (2nd source = different drug): STORM correctly ABSTAINS; MultiVerS still
aggregates MiniCheck's labels -> supports.
- B (contested same-intervention pair): STORM FIRES (mixed), MultiVerS mixed,
Valsci produces contested — the deliberation arm engages.
Confirms the earlier "STORM didn't fire" was correct behavior (off-topic 2nd
source), not a bug. No engine change needed.
Replace the flat "run 17 adapters in parallel and sum" design with a
collaborative, layered blackboard MoA where the backend engines compose:
agents declare produces/consumes typed artifacts, a scheduler topologically
orders them into layers, and each layer commits its artifacts to a shared
blackboard before the next runs — so downstream agents genuinely build on
upstream findings.
Composition core (lib/moa):
- types.ts: MoaAgent contract (produces/consumes/gate/run(ctx,bb)) + typed
artifact taxonomy (source_labels, effect_sizes, quality, relevance,
contested, entities, mechanisms, design_priors, sufficiency, debate,
research_brief)
- blackboard.ts: typed single-producer-per-kind shared memory
- scheduler.ts: dependency-DAG layering; parallel within a layer, artifacts
committed between layers
- router.ts + planner.ts: deterministic gate + advisory Claude planner
(boosts never revive a 0 gate)
- aggregate.ts: deterministic vote mix -> verdict + trust (no LLM; the moat)
- synthesize.ts: grounded Claude narrative (explains, never decides)
- 21 composing agents under lib/moa/agents/*
Real composition edges proven live: MiniCheck produces source_labels ->
MultiVerS aggregates them + Valsci produces contested -> STORM debates;
quant-extractor produces effect_sizes -> PyMARE pools them; paper-qa quality
+ Loki relevance feed MiniCheck. Sample (EMPA-REG vs DECLARE) yields a
calibrated "supported, trust 73/100" with an honest heterogeneity caveat.
New production engines from vendored research repos (MVP -> production),
wired as Layer-3 deliberation agents with papertrail_*.py + PAPERTRAIL.md:
- autoreview (eimenhmdt/autoresearcher): citation-grounded literature review
- autogather (lucereal/AutoResearcher): query-gen + coverage-gap analysis
- autoloop (karpathy/autoresearch pattern): bounded evidence-refinement loop
Platform robustness: callClaudeForJson now tolerates prose-wrapped JSON
(balanced-value extraction) with one stricter retry — fixes model
editorializing that previously broke MiniCheck and any strict-JSON engine.
API /api/moa/orchestrate + console page /console/orchestrator visualizing the
layered DAG, artifact provenance, and per-agent produce/consume.
Add docs/engine-architecture.md: a Mermaid data-flow diagram for each of the 17
vendored OSS engines (grouped verification / retrieval-research / bio-kg-nlp /
sources-screening-meta), each marking exactly where the Claude API runs vs. where
the path is deterministic, plus a Claude-usage map (engine -> route -> Claude step
-> feature). Reinforces the moat: no LLM in any numeric/verdict/scoring path.
Enable the Loki/OpenFactVerification reranker's grounded Claude relevance pass by
default on /api/retrieval/rerank (llm defaults true; pass llm:false for the pure
deterministic ranking). The numeric frame-overlap rank stays deterministic; Claude
only tags on/off-topic and every tag must ground to a verbatim source span.
Add scripts/smoke/rerank-claude.ts: a live smoke proving the Claude relevance pass
actually fires (on-topic source grounded, off-topic source rejected).
- tests/fixtures/clinical-efficacy.json: 12 self-consistent claim/source/gold triples on real trials
(SPRINT/DAPA-HF/PARADIGM-HF/JUPITER/EMPA-REG) — PaperTrail's design task
- scripts/benchmark/run.ts: --clinical flag, writes to docs/benchmark-clinical.md (separate from SciFact)
- Result: PaperTrail 100% on the home task (vs 58.3% on mismatched SciFact). Honest: Claude-alone also
100% on this clear-cut set — shows fitness-for-task, not a margin; subtler cases are future work
- /console/meta-advanced: Bayesian posterior/predictive + leave-one-out sensitivity console page (nav wired)
- README + docs updated with the fair-task framing (no over-claim)
tsc + build green.
Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a
deterministic verification core: clinical-trial claims checked against
ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI
recomputed in code, oracle-tested), code-enforced exact-span grounding, and
multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing
at scale (unpdf + Docling), agentic workflows, Claude Science connector,
compliance/audit, billing, public API, and more.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>