The Last Mile of Coding Agents for Long-Document Tasks: An Empirical Study on Clinical Trial Protocol Digitization
cs.CL
Submitted: 2026-10-13
Updated: 2026-10-13
Project page: https://linjc16.github.io/trialpd-bench/Abstract
License: http://creativecommons.org/licenses/by/4.0/
The gist: Clinical trial protocols serve as the source of truth for study design, but are mostly written and used as unstructured PDF documents.
Abstract
Clinical trial protocols serve as the source of truth for study design, but are mostly written and used as unstructured PDF documents. Digitizing protocols turns static content into structured, machine-readable data that clinical software can analyze, validate, and execute. Coding agents, which select tools, execute code, and revise their approach as they work, are increasingly applied to such long-document tasks, yet it remains unclear how reliably they turn complete documents into accurate structured outputs. We study this question using protocol digitization as a testbed. We introduce TrialPD-Bench, an expert-annotated benchmark of 150 publicly available protocol PDFs spanning four task categories. Beyond final-answer performance, our evaluation measures evidence recall from agent traces, agent behavior, and cost. Across nine proprietary and open-weight models in five coding-agent harnesses, even the strongest agents do not fully solve protocol digitization. Our analysis further shows that agents usually locate the required evidence but fail in the last mile of transcribing and structuring it. We further develop TrialScribe, a domain-specific harness that equips coding agents with task skills and a verification loop. TrialScribe improves a locally served open-weight model by 6.2-59.4 points across eight metrics, enabling it to match or surpass proprietary models such as GPT-5.6-Sol.
Sources
- Qwen3-VL Technical Report
- PaddleOCR-VL: Boosting Multilingual Document Parsing via a 0.9B Ultra-Compact Vision-Language Model
- PaddleOCR 3.0 Technical Report
- SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks
- MLS-Bench: A Holistic and Rigorous Assessment of AI Systems on Building Better AI
- Code as Agent Harness
- olmOCR 2: Unit Test Rewards for Document OCR
- TaskWeaver: A Code-First Agent Framework
- LightOnOCR: A 1B End-to-End Multilingual Vision-Language Model for State-of-the-Art OCR
- PPTBench: Can Coding Agents Reconstruct the Visual World through Structured, Editable Slides
- NatureBench: Can Coding Agents Match the Published SOTA of Nature-Family Papers?
- ExtractBench: A Benchmark for Schema-Guided Enterprise Document Extraction
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering