cs.CLOct 2, 2026

Trajectory-Derived Confidence for Reliable, Resource-Aware Clinical Text-to-SQL Agents

Authors: Mincheol Daniel Song, Joshua Ward, Jake Jung, Guang Cheng

Organizations: University of California, Los Angeles

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.

Figures & tables

Appendix figures & tables11 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Confidence Reasoning Graphs: Structured Confidence Estimation for LLM Agents

    Oct 6, 2026Brendan King, Farima Fatahi Bayat, Jean-Flavien Bussotti +2Probability CalibrationConfidence Estimation in Language Models

  2. SAFETY SENTRY: Context-Aware Human Intervention via EXECUTE-ASK-REFUSE Routing

    Jul 15, 2026Tianyu Chen, Chujia Hu, Wenjie WangLanguage Model Safety EvaluationLLM Guardrails