Hallucination Controlled Accuracy (HCAcc@k%)
- The paper introduces HCAcc@k% as a metric that maximizes overall accuracy while enforcing a minimum conditional accuracy by setting a confidence threshold.
- HCAcc@k% evaluates the trade-off between utility and reliability in selective prediction, especially critical in clinical EHR applications.
- The metric relies on accurate confidence calibration and careful threshold selection to balance response rate and safe abstention against hallucinations.
Searching arXiv for the cited papers to ground the article. Hallucination Controlled Accuracy at (HCAcc@) is a selective prediction metric for settings in which a model may abstain rather than answer under uncertainty. In its original formulation for Electronic Health Record (EHR) clinical question answering, HCAcc@ quantifies the maximum overall accuracy attainable while enforcing a bound on hallucination rate through confidence-thresholded abstention (Song et al., 26 Aug 2025). A closely related but non-identical usage appears in later work on hallucination assessment, where the same notation is mapped to accuracy measured on the retained subset at a target coverage level read from a Rejection-Accuracy Curve (RAC) (Bhatnagar et al., 20 Jan 2026). Across both usages, the central concern is the same: evaluating whether an LLM system can increase reliability by rejecting low-confidence cases without collapsing utility.
1. Original definition in reliability-constrained selective answering
In the EHR setting, “hallucination” denotes an LLM-generated answer that is asserted with confidence but is factually incorrect or unsupported by the patient record/database (Song et al., 26 Aug 2025). Traditional accuracy is inadequate in this setting because it assumes the agent attempts every question, does not distinguish high-confidence correctness from high-confidence error, and does not reward abstention when uncertainty is high.
The original HCAcc@ formalism is defined over a set of questions . For a confidence threshold , the agent attempts only those questions whose confidence score satisfies . This induces the attempted set
The correctly attempted set is the subset of for which the answer is correct.
From these sets, the paper defines four quantities: 0
1
2
3
HCAcc@4 is then defined as
5
Because 6, the constraint can be written equivalently as 7. HCAcc@8 therefore selects the threshold 9 that maximizes overall accuracy subject to a minimum conditional accuracy requirement. In this formulation, 0 is a reliability constraint, not a coverage target. The paper states explicitly that HCAcc@1 recovers standard accuracy, namely 2 at 3 under no reliability constraint.
The associated abstention rule is threshold-based: 4 Tightening 5 reduces the response rate but can increase conditional accuracy by filtering out low-confidence cases.
2. Position within selective prediction and related evaluation frameworks
HCAcc@6 belongs to the family of reliability-aware selective answering metrics (Song et al., 26 Aug 2025). Its purpose is not merely to quantify how accurate a model is when it answers everything, but to characterize the utility–reliability frontier under abstention. This is particularly important in clinical deployment, where safe abstention is preferable to confident error.
The paper relates HCAcc@7 to several established notions. Conventional accuracy measures 8 at a fixed operating point with full coverage and therefore offers no direct handle on hallucinations. Selective prediction and coverage–risk curves instead analyze how error changes as coverage varies across thresholds. HCAcc@9 takes a constrained view of this trade-off: it maximizes utility, represented by 0, subject to a minimum reliability condition, represented by 1.
The distinction from selective accuracy is explicit. Selective accuracy, or conditional accuracy, is just 2, the proportion correct among attempted answers. HCAcc@3 does not directly optimize 4; it optimizes 5 under a lower bound on 6. This means that an operating point with perfect conditional accuracy but vanishing response rate may be inferior to one with slightly lower 7 but substantially higher 8, provided both satisfy the reliability constraint.
The paper also distinguishes HCAcc@9 from Precision@0. Precision@1 fixes the number of attempted items and reports conditional accuracy on that top-2 subset. HCAcc@3, by contrast, does not fix the number attempted. It enforces a reliability floor and then maximizes the total number of correct answers through 4.
Two further comparisons delimit its scope. First, HCAcc@5 benefits from better confidence calibration but does not assume perfect calibration. Second, it differs from conformal prediction, which provides coverage guarantees for prediction sets under exchangeability assumptions. HCAcc@6 is empirical and post-hoc threshold-based; it provides no formal coverage guarantees, but directly measures the practical accuracy–reliability trade-off.
A recurrent source of confusion is the role of 7. In the original definition, 8 denotes the required reliability level. The paper explicitly notes that a coverage-controlled alternative could be defined, but that such a metric would be different from the HCAcc@9 definition used there.
3. Computation, threshold selection, and dataset notation
For implementation, the original paper restates the setup in a standard dataset form 0, with model predictions 1 and confidence scores 2 (Song et al., 26 Aug 2025). For any threshold 3, it defines
4
5
6
7
The practical computation procedure is threshold scanning over the unique confidence values. For a given 8, one computes 9, 0, and 1 for each threshold, filters thresholds satisfying 2, and selects
3
among feasible thresholds. If no feasible threshold exists, HCAcc@4 is set to 5.
The paper recommends inclusive thresholding, 6, when confidences are discrete. If multiple thresholds yield the same 7, it recommends preferring the threshold with higher 8 or the lowest 9 for stability. It also notes that HCAcc can be plotted as a function of 0 by sweeping values such as 1, 2, 3, and 4, and that bootstrap confidence intervals may optionally be obtained by resampling items and recomputing HCAcc@5. For multiple-answer or partial-credit tasks, the binary correctness indicator can be replaced by graded correctness 6.
A worked numerical example in the paper illustrates the selection logic. With five items and correctness pattern 7 at confidences 8, the threshold 9 yields 0, 1, and 2. For 3, this threshold is feasible and attains the maximum 4, giving HCAcc@5=6. For 7, the optimal feasible threshold becomes 8, giving HCAcc@9=0.
4. TrustEHRAgent and the clinical instantiation of HCAcc@1
TrustEHRAgent is the system through which HCAcc@2 is introduced and empirically evaluated in EHR clinical question answering (Song et al., 26 Aug 2025). It is a confidence-aware agent built on a GPT-4.1-mini backbone with temperature 3, shared EHR metadata and tools, four-shot demonstrations, and maximum interaction steps 4.
Its confidence mechanism has two components. The first is step-wise confidence estimation: during multi-step reasoning involving code generation, SQL execution, and aggregation, the agent emits a verbalized confidence score on a 5–6 scale for each step via prompting. These signals are intended to capture uncertainty due to data quality, query complexity, and interpretation ambiguities. The second is a final confidence estimator that aggregates over 7 discrete levels 8. Using token log-probabilities, the probability for each level is
9
and the final confidence is a normalized expected level,
00
The paper states that this continuous scoring helps avoid the brittleness of a purely discrete scale and yields smoother threshold performance.
Evaluation uses QA derived from EHRSQL on MIMIC-III and eICU EHRs, with 01 real clinical questions per database, 02 in total, exact-match correctness, and questions spanning demographics, prescriptions, labs, diagnoses, and temporal logic. Baselines without confidence estimation include CoT, ReACT, Reflexion, DIN-SQL, SQLAgent, PythonAgent, and EHRAgent. Confidence-aware baselines are SQLAgent and PythonAgent enhanced with the same step-wise confidence prompting and final estimator.
The key reported HCAcc@03 results are as follows.
| Dataset | HCAcc@0 / 50 / 70 / 90 |
|---|---|
| MIMIC-III | 62.13 / 62.13 / 44.23 / 3.27 |
| eICU | 59.82 / 59.82 / 25.34 / 2.24 |
Under strict reliability constraints, TrustEHRAgent substantially outperforms confidence-aware baselines. At HCAcc@04, the reported improvements are 05 percentage points on MIMIC-III and 06 percentage points on eICU, while the confidence-aware baselines collapse to 07. EHRAgent’s standard accuracy, corresponding to HCAcc@08, is 09 on MIMIC-III and 10 on eICU, so TrustEHRAgent also improves base QA performance.
The paper attributes baseline collapse at high reliability to unusable confidence ranking: if confidence scores cannot maintain 11, the threshold 12 must be raised so high that 13, implying 14. TrustEHRAgent’s step-wise signals combined with probability-based final scoring preserve a viable response rate at feasible thresholds while meeting the conditional accuracy constraint. It also reports that removing step-wise confidence signals degrades performance at higher 15, and that binary-classification or discrete-scoring alternatives yield poorer reliability curves than the probability-weighted estimator.
5. Coverage-based interpretation in HALT and the associated terminological ambiguity
A later paper, HALT, does not introduce the name HCAcc@16, but explicitly maps closely related selective prediction quantities onto it (Bhatnagar et al., 20 Jan 2026). HALT uses the Rejection-Accuracy Curve and “accuracy against coverage,” defining the RAC as a plot of accuracy against coverage after ranking samples by confidence. It also uses the phrase “Accuracy after Hallucination Removed” for selective prediction by rejecting low-confidence or high-risk queries before generation and measuring accuracy on the retained subset.
In HALT’s notation, each query has a detector output 17, interpreted as the probability that the model can correctly answer the query, and a corresponding hallucination risk
18
For a risk threshold 19, empirical coverage is
20
For a target coverage 21, one selects the 22 lowest-risk examples, or equivalently chooses 23 by risk quantiles so that 24. HCAcc@25 is then defined as accuracy on the retained subset: 26
This is not the same definition as the original clinical HCAcc@27. In the original paper, 28 is a reliability constraint and the metric reports the best overall accuracy subject to that constraint. In HALT’s mapping, 29 is a coverage level and the metric reports retained-subset accuracy at that coverage. The papers therefore use the same notation for two different operating semantics. The overlap is conceptual rather than definitional: both assess whether confidence ranking can isolate low-hallucination cases.
HALT further links accuracy-at-coverage to the integral summary
30
with discrete trapezoidal approximation over a coverage grid. In this usage, 31 at coverage 32 is exactly HCAcc@33.
For Qwen-2.5-7B on TriviaQA in the question-only setting, HALT reports the following RAC points.
| Coverage | Accuracy |
|---|---|
| 100% | 85.7% |
| 80% | 91.6% |
| 60% | 95.6% |
| 40% | 97.7% |
The reported AURAC for this curve is 34. HALT argues that internal residual probes on intermediate layers provide stronger confidence ranking than many output-based methods, enabling steep RAC behavior and useful routing of low-risk queries to immediate answers while delegating high-risk cases to stronger verification pipelines.
6. Assumptions, failure modes, and deployment considerations
HCAcc-style evaluation depends fundamentally on the quality of the confidence or risk signal (Song et al., 26 Aug 2025). The original paper states the core assumption directly: confidence scores should correlate with correctness so that tightening the threshold increases conditional accuracy and reduces hallucination rate. Perfect monotonicity is not guaranteed, and empirical threshold scanning is therefore recommended.
Several failure modes follow from this dependence. Miscalibration can produce overconfident errors, which either violate the 35 constraint or force thresholds so high that the response rate collapses and 36. Domain shift, such as EHR schema differences or hospital-specific abbreviations, can lower conditional accuracy or make confidence systematically too high or too low. Low-data regimes and a small number of unique confidence values can make HCAcc@37 sensitive to threshold choice. The paper also notes fairness concerns: subpopulations may exhibit different confidence–accuracy characteristics, so stratified HCAcc analysis is advisable.
Deployment recommendations are explicitly tied to the choice of 38. For routine decision support, the paper suggests 39–40 to balance coverage and utility. For high-stakes decisions, it suggests 41, while acknowledging that 42 will be low unless calibration and QA accuracy are very strong. It recommends using reliability diagrams and ablations, such as step-wise versus non-step-wise confidence, to select 43 for the clinical context.
HALT introduces parallel caveats for the coverage-based setting (Bhatnagar et al., 20 Jan 2026). It notes that tie-breaking at the boundary coverage should be deterministic or randomly sampled with a fixed policy for reproducibility, that task format and label imbalance can affect detector training signal, and that thresholding under dataset shift should be validated on a held-out split from the target domain. This suggests that both reliability-constrained and coverage-constrained variants of HCAcc are best interpreted as operational metrics whose usefulness depends on stable ranking quality rather than on formal guarantees.
Taken together, these limitations clarify what HCAcc@44 does and does not measure. It does not certify truthfulness, calibration, or robustness by itself. It measures whether a system can convert uncertainty estimates into safer behavior by abstaining on risky cases while retaining as much useful accuracy as possible. In applications such as clinical QA, that operationalization directly targets the distinction between harmless uncertainty and harmful confident hallucination.