CLINES: Clinical LLM-based Information Extraction and Structuring Agent

Zongxin Yang, Hongyi Yuan, Raheel Sayeed, Amelia Li Min Tan, Enci Cai, Michele Moro, Xiudi Li, Huaiyuan Ying, Nicholas Brown, Griffin M. Weber, Sheng Yu, Isaac S. Kohane, Tianxi CaimedRxiv 2025

Abstract

Clinical narratives in electronic health records (EHRs) contain essential diagnostic, therapeutic, and temporal information that is often missing from structured fields, leaving manual chart review as the de facto standard for high-quality labels. However, manual review is slow, costly, and variable, constraining accurate cohort construction. We developed CLINES, a modular agentic pipeline that extracts and structures clinical concepts through semantic chunking, extraction by reasoning-capable large language models (LLMs), assignment of attributes, normalization to the Unified Medical Language System (UMLS), and resolution of temporal data. Zero-shot evaluation across MIMIC-III, 4CE, and CORAL datasets demonstrated that CLINES significantly outperforms rule-based systems, transformer encoders, and single-prompt LLM baselines, maintaining stable performance even as note length increases.

Introduction

Electronic Health Records (EHRs) are a gold mine of patient data, but the most valuable insights—clinical reasoning, nuanced symptoms, and temporal sequences—are buried in unstructured narrative notes. Currently, the "gold standard" for extracting this information is manual chart review by clinicians, which is prohibitively slow and difficult to scale. Existing automated solutions typically fall into two camps: brittle rule-based systems (e.g., cTAKES) or standard Transformer models with limited context windows and poor attribute capture. CLINES addresses these gaps by using a modular, agentic approach to mimic the thoroughness of a human reviewer.

Methods: The CLINES Pipeline

CLINES (Clinical LLM-based Information Extraction and Structuring Agent) is a four-step modular pipeline designed to transform messy clinical narratives into structured, ontology-grounded data.

The four-step CLINES pipeline: Note Chunking, Clinical Entity Extraction, Entity Enhancement, and Aggregation & Schema Adaptation.
  1. Semantic Chunking: Long notes are broken into ~768-token fragments using SemChunk to preserve clinical meaning and semantic coherence.
  2. Clinical Entity Extraction: An LLM identifies mentions of diseases, medications, and lab tests in narrative order.
  3. Concept & Attribute Enrichment: This reasoning core performs term normalization (mapping to UMLS), date processing (resolving relative dates like "three days post-admission"), and attribute extraction (assertion status, numerical values, and dosages).
  4. Aggregation & Schema Adaptation: Findings are deduplicated across chunks and exported into standard formats like i2b2, JSON, or SQL.

Detailed Extraction and Enrichment

Unlike monolithic "one-shot" prompts, CLINES breaks the extraction task into specialized sub-tasks. This modularity prevents hallucinations and ensures that complex attributes—such as whether a medication was actually administered or merely discussed—are captured accurately.

Detailed view of the extraction and enhancement sub-steps, including LLM prompts for entity extraction, term normalization, date processing, and attribute extraction.

Results and Discussion

CLINES was evaluated in a zero-shot setting across diverse EHR corpora, including MIMIC-III (critical care), 4CE (COVID-19), and CORAL (oncology).

Key Performance Metrics

  • Entity Extraction: Achieved F1 scores ranging from 0.69 (MIMIC-III) to 0.87 (4CE).
  • Comparative Gains: CLINES showed an absolute F1 gain of +0.21 to +0.38 over the strongest single-prompt LLM baselines and outperformed specialized transformer encoders by +0.28 to +0.68 F1.
  • Temporal Accuracy: In oncology and COVID-19 datasets, it achieved F1 scores of 0.73 to 0.79 for joint start-end date correctness, a task where traditional baselines often fail entirely.

Stability and Reasoning

A critical advantage of CLINES is its stability across scale; performance remains consistent regardless of note length, whereas traditional transformer baselines see sharp drops in recall as notes lengthen. Furthermore, the system demonstrates sophisticated reasoning, such as inferring missing units (e.g., knowing "Glic 617" refers to glucose in mg/dL) and resolving complex temporal chains.

Conclusion

CLINES translates narrative EHR text into ontology-grounded, auditable, and schema-ready data, offering a practical route to scale chart-review-like extraction for cohort discovery and real-world evidence. While risks like prompt sensitivity and rare abbreviation hallucinations remain, the model-agnostic nature of CLINES allows for future refinement through domain-specific fine-tuning and human-in-the-loop feedback.

Summary updated

BibTeX
@misc{yang2025clines,
  author = {Zongxin Yang and Hongyi Yuan and Raheel Sayeed and Amelia Li Min Tan and Enci Cai and Michele Moro and Xiudi Li and Huaiyuan Ying and Nicholas Brown and Griffin M. Weber and Sheng Yu and Isaac S. Kohane and Tianxi Cai},
  title = {{CLINES: Clinical LLM-based Information Extraction and Structuring Agent}},
  year = {2025},
  doi = {10.64898/2025.12.01.25341355},
  howpublished = {medRxiv},
}

Loading related content...

Figure