Trajectory-Derived Confidence for Reliable, Resource-Aware Clinical Text-to-SQL Agents
Abstract
LLM agents for clinical text-to-SQL applications reason autonomously over multiple steps but cannot assess whether their own reasoning or outputs can be trusted. In high leverage applications such as healthcare, this presents a critical risk where system mistakes can be costly. These reliability failures are also resource failures: an incorrect reasoning trajectory spends computation budget on outputs that must be discarded. We introduce Sentinel, a trajectory-derived, classifier-based confidence layer that analyzes an agent's reasoning, code and database outputs to decide at three points whether to stop: refusing unanswerable questions before the agent runs, halting doomed trajectories mid-run, and withholding untrustworthy answers at delivery. Here, utilizing Chow's rule, we optimize decisions under the EHRSQL shared task's Reliability Score, which penalizes incorrect answers given a utility weighting, and find on the benchmark EHRSQL that Sentinel raises this score from +0.08 to +0.24 when mistakes have a low utility weighting, well above the +0.03 earned by refusing every question, with delivered-answer accuracy rising from 54% to 69% as coverage falls from 84% to 55%. At higher stakes the agents we test rarely answer reliably enough to deliver, and Sentinel detects this on its own, abstaining to that same +0.03 where the unmonitored agent scores -3.02. The same stopping decisions cut computation: at low stakes, where the system still answers, Sentinel eliminates 13-28% of agent steps at little or no reliability cost.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.LG
- Comments
- Accepted at the NeurIPS 2026 Workshop on Resource-Aware Agentic AI (RAAAI). 19 pages, 7 figures
Related papers
Semantic-aware Decoding for Diverse Text-to-SQL under Schema Ambiguity
Shared title terminologycs.CLYuxuan Jiang, Anna Mitsopoulou, Apostolos Koukouvinis et al.
Beyond Correctness: Resolving Underspecification in Agentic Text-to-SQL
Shared title terminologycs.CLWen-Zhi Li, Yue Gong, Konstantinos Kanellis et al.
SecondChance: Benchmarking Reliable Error Recovery in AI Agents
Shared title terminologycs.CLAtahan Dokme, Adar Avsian, Larry Heck
When Does Continual Pre-Training Help? An Empirical Study of Decoupled Knowledge and Generation Trajectories in Clinical LLMs
Shared title terminologycs.CLNiclas Doll, Jasper Schulze Buschhoff, Shalaka Satheesh et al.
Lend Me Your Eyes: Instruction-Aware Text Embeddings via Attention Relay
Shared title terminologycs.CLYiyuan Luo, Vaggos Chatziafratis
AptMQL-Bench: From Text-to-SQL to Text-to-MQL via Access-Pattern Schema Design and Data-Preserving Migration
Shared title terminologycs.CLHy Nguyen, Nabi Rezvani, Robin Vujanic