Vasudev Awatramani at #SMM4H-HeaRD 2026: A Two-Pass LLM Pipeline with Deterministic Rule Derivation for Interpretable Insomnia Detection in Clinical Notes

· Source: Paper Index on ACL Anthology · Field: Science & Research — Artificial Intelligence & Machine Learning, Health & Medical Research, Natural Language Processing · Depth: Expert, quick

Summary

Vasudev Awatramani's system for the #SMM4H-HeaRD 2026 Shared Task 2 addresses insomnia detection within MIMIC-III clinical notes using a two-pass large language model pipeline. The first pass employs a Gemini 2.5 Flash LLM, prompted via BAML, to extract structured evidence like sleep difficulties, daytime impairment, and hypnotic medications, complete with verbatim character-level citations. Subsequently, a small Python rule engine deterministically applies published Insomnia rules—Definition 1, Definition 2, and Rules B and C—to generate binary patient-level labels, rule-component labels, and their corresponding evidence spans. The zero-shot variant of this system achieved an F1 score of 0.8108 on Subtask 1 (binary classification) and a micro-F1 of 0.7126 with partial-match span F1 of 0.6621 on Subtask 2, both surpassing the across-team mean. A retrieval-augmented few-shot variant improved Subtask 1 precision but not overall F1.

Key takeaway

For NLP Engineers developing clinical decision support systems, if you are prioritizing interpretability and auditability in sensitive health applications, consider a two-pass LLM architecture. Instead of directly asking the LLM for a diagnosis, use it to extract structured evidence from notes, then apply a deterministic rule engine. This approach, demonstrated with Gemini 2.5 Flash, yields strong, auditable results for tasks like insomnia detection, offering greater transparency than end-to-end LLM label prediction.

Key insights

Combining LLM evidence extraction with deterministic rule application provides interpretable clinical label prediction.

Principles

Method

A two-pass pipeline where a Gemini 2.5 Flash LLM extracts structured evidence from clinical notes via BAML prompts, followed by a Python rule engine applying predefined insomnia rules to derive labels and evidence spans.

In practice

Topics

Best for: AI Scientist, NLP Engineer, Research Scientist

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.