URJC-Team at #SMM4H-HeaRD 2026: TNM Stage Extraction with a Regex-LLM Workflow
Summary
The URJC-Team participated in Task 6 of the #SMM4H-HeaRD 2026 Shared Tasks, focusing on automated TNM cancer staging extraction from unstructured pathology reports. TNM staging is crucial for tumor characterization and clinical decision-making, yet its automated extraction is challenging due to the heterogeneous nature of free-text data. The team's proposed workflow integrates hand-crafted regular expressions with a Large Language Model (LLM). Initially, explicit TNM mentions are extracted using rule-based patterns. Subsequently, any staging information not captured by these rules is inferred by an LLM. This combined approach yielded competitive results across all official shared-task phases, demonstrating an effective method for addressing the complexities of medical text analysis.
Key takeaway
For NLP Engineers developing clinical text analysis solutions, this workflow offers a robust strategy for extracting complex medical information like TNM staging. You should consider integrating a two-stage approach, utilizing precise regular expressions for explicit data points and then employing a Large Language Model to infer less structured or implicit details. This hybrid method can significantly improve accuracy and completeness in challenging, heterogeneous datasets, enhancing the reliability of automated clinical decision support systems.
Key insights
A hybrid regex-LLM workflow effectively extracts TNM cancer staging from complex, unstructured pathology reports.
Principles
- Combine rule-based extraction with LLM inference.
- Address data heterogeneity with multi-stage processing.
Method
Explicit TNM mentions are first extracted using hand-crafted regular expressions, followed by an LLM inferring any remaining stages not captured by the initial rules.
In practice
- Implement regex for explicit pattern matching.
- Use LLMs for inferring implicit medical data.
Topics
- TNM Cancer Staging
- Pathology Reports
- Large Language Models
- Regular Expressions
- Clinical Text Analysis
- Medical NLP
Best for: AI Scientist, NLP Engineer, Research Scientist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.