Veridex: Multi-Agent Consensus & Contradiction Engine

Tagline: Studies contradict each other. AI usually hides that. Veridex doesn't.

Live demo: https://veridex-frontend.vercel.app API: https://veridex-consensus-engine.onrender.com


Introduction

Veridex is a multi-agent research system that takes a scientific research question, pulls real peer-reviewed literature on it from live sources, and instead of producing one smoothed-over summary, surfaces exactly where the evidence disagrees, and explains why, using only data actually present in the papers. Every number in the final output traces back to a real sentence in a real study or was computed deterministically in code, never invented by a model.


The Problem

Ask a real research question and the honest answer is rarely one paper. It's dozens of studies that often contradict each other (different doses, different populations, different methodologies). Three things fail to handle this today:

  1. A single paper read in isolation can be actively misleading. Low-dose metformin extends lifespan in mice; the same drug at high dose causes renal failure and shortens it. Read either study alone and you get a confidently wrong picture.
  2. Existing tools either dump papers on you or paper over the disagreement. A search engine gives you a list and leaves the reading to you. An LLM chatbot asked the same question often averages the disagreement into a smooth, confident-sounding answer, which is worse, because the contradiction becomes invisible and the false consensus now carries an AI's authority.
  3. Real systematic review doesn't scale. PRISMA-rigor literature synthesis is slow, expert-driven, manual work that can't keep pace with how fast research publishes.

Our Solution

A pipeline of specialized agents, each with a narrow, auditable job, instead of one model doing discovery, reading, judgment, and writing all at once:

Agent Job Guardrail
Librarian Normalizes a raw/colloquial question into a formal hypothesis + MeSH boolean search query Falls back to a deterministic regex normalizer if the LLM call fails, so discovery never silently breaks
Discovery Engine Searches PubMed, CrossRef, and Europe PMC in parallel, deduplicates results Refuses to proceed if fewer than 2 real peer-reviewed studies are found; will not fabricate literature
Extractor Reads each paper, generates a 1024-dim embedding, extracts structured claims (sample size, effect direction, p-value, risk of bias) Strict validation: rejects out-of-range values (p not in [0,1], sample size over 50M) to null rather than guessing; never invents a number not in the text
Arbiter Pairwise-compares studies that disagree on the same question, isolates the real methodological confounder Will only cite a confounder explicitly present in the structured data; marks genuinely unexplained conflicts IRRECONCILABLE rather than forcing a resolution
Synthesizer Writes the plain-language summary Structurally forbidden from introducing a number not already present in the pre-computed statistical aggregate

Key Features

  • Interactive Contradiction Graph: force-directed, real-time visualization of the agreement/disagreement network; click any node for the underlying study, hover any link for the isolated confounder
  • Evidence Matrix: sortable, filterable structured table of every extracted study
  • Vector similarity search: real cosine-similarity search over embeddings stored in CockroachDB, not keyword matching
  • PRISMA 2020 export: plus BibTeX, RIS, and JSON citation export, so the evidence trail leaves the app in a format researchers already trust
  • Compare mode: two independent research questions synthesized side by side
  • Live SSE progress streaming: real-time updates across all four pipeline phases as a synthesis job runs
  • Zero-hallucination guarantee: verified in testing, on a query with genuinely insufficient real literature, the system explicitly refuses to synthesize rather than manufacturing an answer
  • Job persistence: synthesis jobs survive a server restart, backed by a CockroachDB table rather than an in-memory store; orphaned jobs are marked failed on restart instead of hanging forever

Technical Architecture

User research question
        |
        v
  Librarian Agent (LLM, query normalization)
        |
        v
  Discovery Engine, parallel: PubMed + CrossRef + Europe PMC
        |
        v
  Extractor Agent (LLM + Bedrock Titan V2 embeddings, concurrency=3, bounded parallel)
        |
        v
  Arbiter Agent (LLM, pairwise adversarial comparison)
        |
        v
  Deterministic aggregation (pure code, no LLM in the math)
        |
        v
  Synthesizer Agent (LLM, narrates pre-computed numbers only)
        |
        v
  Evidence Matrix / Contradiction Graph / PRISMA Export

All four agent phases stream progress to the frontend over Server-Sent Events, backed by a persisted job record so an in-progress or completed synthesis survives a backend restart.


Tech Stack

Frontend: React 19, TypeScript, Vite, Tailwind CSS, deployed on Vercel

Backend: Node.js, Express, deployed on Render

Database: CockroachDB (distributed SQL), including a native VECTOR column type with a true ANN index (C-SPANN algorithm, CockroachDB 25.2+), not a bolt-on vector store

Embeddings: Amazon Bedrock Titan V2 (1024-dim), with a locally computed cosine-similarity fallback

LLM reasoning: Google Gemini, with per-agent model tiering (stronger tier for Extractor/Arbiter, cheaper tier for Synthesizer/Librarian) and a cascading fallback chain (Bedrock, then OpenAI, then a local deterministic engine) so the pipeline degrades gracefully instead of hard-failing

Literature sources: live calls to PubMed (NCBI E-Utilities), CrossRef, and Europe PMC, no cached or static corpus

Storage: AWS S3 for uploaded source PDFs

Testing: Vitest, 17 backend tests (including a full pipeline dry-run integration test) plus 14 frontend component tests with real behavioral assertions (sort order, filter state, empty states), not render-only smoke tests

CI: GitHub Actions, with lint, typecheck, smoke test, unit test, and build as separate jobs

Also included: an MCP server exposing the full pipeline as tools for other agents to call


Security & Reliability

  • Admin-key-gated write routes (/papers, /papers/upload-pdf, /seed)
  • CORS locked to an explicit origin allowlist (production frontend, local dev, Vercel preview branches), not wide open
  • Per-route rate limiting
  • Structured request logging with correlation IDs
  • Payload bloat stripped from API responses (no raw 1024-float embedding vectors sent to the client)

What Makes This Different

Most "AI plus papers" tools optimize for a confident-sounding answer. Veridex optimizes for an honest one: it treats disagreement between studies as the primary signal worth surfacing, not noise to average away, and it draws a hard architectural line between what a model is allowed to compute (nothing, that's deterministic code) and what it's allowed to narrate (only numbers that already exist). When the literature doesn't support a confident answer, Veridex says so instead of manufacturing one.


Roadmap

  • Deeper dose/timing-aware confounder detection in the Arbiter agent
  • Expand structured extraction to full-text PDFs (not just abstracts) for papers uploaded directly
  • Multi-language literature sources
  • Public API access tier for external research tools to query the consensus engine directly

Built With

Share this project:

Updates

Submission history