TrialTrace: AI-Powered Evidence Review for Clinical Trial Outcomes TrialTrace, a Streamlit dashboard deployed on Google Cloud, combines ClinicalTrials.gov registry checks with an LLM abstract reader to verify whether registered trial outcomes are reported in linked PubMed abstracts, with every finding backed by a code-verified quote and human review. On 19 unseen trials, the LLM reader reached 91% precision (20 of 22) and 80% recall (20 of 25) against pre-registered targets of 90% and 80%, with 0 made-up quotes across 204 model calls; on a second frozen set of 19 trials and 72 outcomes it scored 85% precision and 85% recall, versus 31% recall for plain keyword code. Human reviewers agreed with the labels 90% of the time (27 of 30 pairs, kappa 0.85), and about 42% of outcomes are flagged "unclear" and routed to a reviewer; a planned v2 would add safety-statement extraction and adverse-event comparison. Evidence-grounded review of clinical-trial reporting: registry checks, an LLM abstract reader with code-verified quotes, source evidence for every finding, and human review with an audit history. Deployed on Google Cloud with Google sign-in. Registry Checks + LLM Abstract Reader + Quote Validation + Human Review + Pipeline Observability + CI/CD to Cloud Run TrialTrace helps reviewers trace clinical-trial reporting back to its sources. It brings together ClinicalTrials.gov records and linked PubMed abstracts, checks whether registered outcomes are reported, and presents findings with supporting evidence and a review history. The project combines deterministic registry checks, an LLM abstract reader, evidence validation, and human review in a Streamlit dashboard. | Version | Scope | Status | |---|---|---| | v1 · Registry and abstract validation | Validate registered trial outcomes against results published in the registry and linked paper abstracts. Track changes between captured registry versions, results-posting status, completion timelines, and sponsor reporting counts | Implemented | | v2 · Safety | Extract safety statements from abstracts and compare them with registry adverse-event evidence | Planned extension | All safety-related work belongs to project v2. This includes adverse-event ingestion and parsing, database tables and migrations, statement extraction, numeric and time-window comparisons, assisted matching, review tools, and supporting documentation. - Inspect a trial. Open an NCT ID and explore registry outcomes, linked papers, findings, and cited evidence. - Check reporting. View results-posting status, time since primary completion, and differences between registered and posted outcomes. - Trace outcomes across papers. Review identified, unclear, and not-identified outcomes alongside highlighted abstract quotes. - Review findings. Accept, correct, or mark a finding as undetermined, with a reason and an audit history. - Explore the stored corpus. View sponsor reporting counts and fixed cross-trial queries. - Export findings. Download CSV and Markdown reports. The dashboard provides All trials, One trial, Assisted review, Sponsors, and Patterns views. Review queues distinguish Needs review, Human-verified, and Unresolved findings, and can be sorted by risk unclear first . In One trial , a Pipeline status panel shows six stages registry, raw backup, papers, matching, findings, review with dates and run IDs, keeping "not started", "nothing to read", "failed" and "awaiting review" apart. Stage attempts are logged as structured events pipeline events , and a stage that started but has not reported back is shown as completion overdue. An Outcome overview lists one row per registered outcome primary first with its roll-up status, paper evidence and review progress; clicking a row filters the findings below. Counts in the panel are outcome-paper findings, not registered outcomes. The LLM abstract reader was scored on trials it had never seen, against targets written down before the run design decisions D93, D42, D101 . Ranges are 95% Wilson intervals. Counts are small, so treat these as point estimates. | Measure | Result | 95% range | Set | |---|---|---|---| | Precision when it says "reported", is it right? | 91% 20 of 22 | 72–97% | 19 unseen trials, target 90% | | Recall reported outcomes found with a real quote | 80% 20 of 25 | 61–91% | same set, target 80% | | Made-up quotes or failed reads | 0 / 0 | | 204 model calls; quotes are checked by code | | Precision and recall on a second frozen set | 85% / 85% | 66–94% | 19 trials, 72 outcomes | | LLM reader vs plain keyword code recall | 85% vs 31% | 66–94% vs 17–50% | second frozen set | | Human agreement with the labels | 90% 27 of 30 , kappa 0.85 | | 30 pairs labelled blind | About 42% of outcomes are called "unclear" and sent to a reviewer. That is routing, not a wrong answer. Labels were partly AI-drafted and checked by a person, and the sets are small. Evidence-expansion verdict 2026-11-24 : neither the fixed expansion baseline nor the agent showed enough practical benefit to justify shipping as part of V1. On 25 outcomes, V1 had 17 correct final statuses, the expansion baseline 18, and the agent 19. The agent's one-case advantage over the baseline does not establish a meaningful improvement; it used 350 tool/model calls versus 346. Both expansion approaches made one primary false upgrade, missing the target of zero. The strict model-drafted labels classified 27 of 40 unresolved outcomes as not identified in the readable sources; only 165 of 344 fetched papers had open-access full text. This points to source coverage as the main limit in this experiment. V1 stays the core. Keep expansion code and guards as experimental work. These results do not prove either approach useless in general: the sample is small, labels had no human review, each configuration ran once, and run 2 followed fixes informed by locked-test errors. This source-expansion baseline uses model calls and is separate from the keyword baseline in the V1 results above. Full-paper expansion was tested experimentally; it is not a shipped feature. | Locked test, 25 outcomes | V1 | Expansion baseline | Agent | |---|---|---|---| | Correct final status | 17 | 18 | 19 | | False upgrades primary / secondary | 0 / 0 | 1 / 1 | 1 / 0 | | Tool and model calls | 0 | 346 | 350 | Limits: 25 outcomes, labels drafted by a model with no human review, one run each, and run 2 followed fixes informed by the locked-test errors. A follow-up table audit found no missed results in the open-access tables of the 27 not-identified outcomes. Picture tables, figures and supplements were not read. For every NCT ID the dashboard can answer "where did this trial get stuck, from registry download to human review?" - Pipeline status panel One trial : six read-only lines, one per stage: registry, raw backup, papers, matching, findings, review. Each shows a state, a plain-language summary, a date and the run ID. It reads the tables that hold the facts, so nothing is copied or can disagree. - Clear states: not started , nothing to read , failed and awaiting review are different things and are shown differently. An unclear model answer is a finding to interpret, not a failure. An old failure next to a newer success is described as older, never as the current state. - Structured stage events: each stage attempt writes one JSON log line and one row in pipeline events stage, status, error code, duration, run ID, counts . Writing an event never stops the pipeline. - Overdue detection: a stage first writes a durable started event on its own connection, then a completion event. A start with no completion shows as running, then as completion overdue possibly interrupted after 15 minutes. That is not proof of a crash, because there is no heartbeat. A failure after an unexpected exception is also written on its own connection, so a rollback cannot erase it. - Raw backup status: whether the copy of each raw download reached Cloud Storage. - Verified on live Cloud SQL with a one-off Cloud Run job, including the separate-connection write. Not built yet: an All trials "needs attention" filter, a heartbeat, and alerts. Cloud Run logs and metrics cover the deployed service itself. flowchart TB subgraph Sources "External sources" CT "ClinicalTrials.gov API" PM "PubMed E-utilities" end subgraph Pipeline "Python processing pipeline" ING "Fetch and parse registry records and papers" LINK "Check paper-to-trial links" REG "v1 Registry checks" MATCH "v1 Outcome-abstract matching" GUARD "Validate quotes and trial identity" ROLL "Combine evidence per outcome" REPORT "Build findings and review queue" end RAW "Raw source files by content hash" GCS "Google Cloud Storage