Teaching AI to Clean Messy Scientific Data Without Breaking It
Original paper: Agents Propose, Code Verifies, Humans Decide: Verified Agentic Ingestion of Heterogeneous Scientific Tables into Relational Databases
"A master watchmaker's apprentice proposes gear layouts that a mechanical stress-testing machine evaluates for structural integrity before the master craftsman authorizes final assembly. Just as this physical stress-test prevents faulty gears from ruining a clock, the automated verification loops test every proposed database schema against hard evidence."
Scientists waste countless hours manually aligning messy, incompatible data files before they can make breakthrough discoveries. By automating this data ingestion safely and cheaply for under fifty cents a dataset, this pipeline unlocks massive public biological datasets for rapid analysis and accelerates medical research.
- AI agents propose database structures while strict code rules verify them.
- Humans retain final approval to guarantee absolute data integrity.
- Over 45 million values were loaded with zero errors.
📑 Original arXiv Technical Abstract
Public scientific datasets rarely arrive analysis-ready. They arrive as messy folders of wide matrices, long tables, spreadsheets, and per-cohort files whose keys and encodings differ, and every reanalysis must reconnect them first. A coding agent can automate this, but its mistakes can look plausible, and without an audit trail, a mistake that corrupts data can go uncaught. We present an AI-assisted ingestion pipeline built on one rule: LLM agents propose, deterministic code verifies, and humans decide. Narrow agents see compact, citable evidence about the files, never the data, and return typed proposals. A verifier with 39 check types tests each proposal against that evidence in two loops, one for the schema's structure and one for its meaning, and a human reviewer approves the schema and the load. Code compiles PostgreSQL DDL, reshapes the data, quarantines rows it cannot place, records provenance, and reconciles every staged row against the database. On four public biomedical datasets, one held out from development, 9 of 20 first proposals failed a check and every failure was caught: the loops repaired eight, and a one-line reviewer edit fixed the ninth. All 45.1 million values loaded with zero reconciliation gap. Discovering a dataset's structure took 4-7 LLM calls and preparing its data at most one more, costing under 0.50 per dataset. In a separate test, each of nine planted data errors was quarantined with a reason or recorded in an audit log.
✍️ Are you an author of this paper? Add code/demo links or a note
Help readers explore your work — share your official GitHub repo, Hugging Face weights, affiliation, or a clarification note for our editorial review queue.