GxP-Agent: Process-DAG Topology for Reliable Clinical Trial Programming with LLM Agents
| Source: arXiv AI
Tags: GxP-Agent, CDISC, clinical trials, multi-agent, DAG, pharmaverse, Claude Sonnet
A DAG-structured multi-agent system for clinical trial programming achieves 100% structural match on CDISC-Bench — a task where all 11 single-shot attempts by five frontier models, including flat multi-agent approaches, score 0%.
Details
Clinical trial programming under CDISC standards is a mandatory step before FDA regulatory submission, yet LLM-based code generation has consistently failed this task. GxP-Agent addresses this by encoding regulatory process ordering as a directed acyclic graph (DAG), decomposing dataset generation into 15 domain-specific nodes executed by specialized worker agents with pharmaverse skill context, validation gates, and conditional retry logic. On CDISC-Bench — built from the FDA pilot submission CDISCPilot01 (254 subjects, 49 ground-truth ADSL variables) — GxP-Agent with Claude Sonnet 4.6 achieves 100% structural match across three independent runs. The best retrieval-augmented baseline reaches 59.2%, while every single-agent and flat multi-agent approach scores 0%. The DAG topology also amplifies weaker models: GPT-4.1 reaches 59.2% under the same DAG, versus 0% under every other configuration. The system generalizes to ADAE (adverse events), a 9-node branching DAG with 55 variables and 1,191 records, achieving 100% structural match on the first attempt. The core insight is that encoding domain process knowledge as graph topology rather than relying on LLM reasoning alone is the key enabler for GxP-compliant programming. For AI teams in pharma or clinical research, this paper provides a concrete architectural pattern: regulatory compliance workflows may be tractable with current models if the process structure is explicitly encoded rather than assumed to emerge from prompting.