Papers
Topics
Authors
Recent
Search
2000 character limit reached

Hallucination Controlled Accuracy (HCAcc@k%)

Updated 9 July 2026
  • 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 k%k\% (HCAcc@k%k\%) 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@k%k\% 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@k%k\% formalism is defined over a set of questions QQ. For a confidence threshold τ\tau, the agent attempts only those questions whose confidence score satisfies c(q)τc(q) \ge \tau. This induces the attempted set

Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.

The correctly attempted set is the subset of QτQ_\tau for which the answer a(q)a(q) is correct.

From these sets, the paper defines four quantities: k%k\%0

k%k\%1

k%k\%2

k%k\%3

HCAcc@k%k\%4 is then defined as

k%k\%5

Because k%k\%6, the constraint can be written equivalently as k%k\%7. HCAcc@k%k\%8 therefore selects the threshold k%k\%9 that maximizes overall accuracy subject to a minimum conditional accuracy requirement. In this formulation, k%k\%0 is a reliability constraint, not a coverage target. The paper states explicitly that HCAcc@k%k\%1 recovers standard accuracy, namely k%k\%2 at k%k\%3 under no reliability constraint.

The associated abstention rule is threshold-based: k%k\%4 Tightening k%k\%5 reduces the response rate but can increase conditional accuracy by filtering out low-confidence cases.

HCAcc@k%k\%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@k%k\%7 to several established notions. Conventional accuracy measures k%k\%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@k%k\%9 takes a constrained view of this trade-off: it maximizes utility, represented by k%k\%0, subject to a minimum reliability condition, represented by k%k\%1.

The distinction from selective accuracy is explicit. Selective accuracy, or conditional accuracy, is just k%k\%2, the proportion correct among attempted answers. HCAcc@k%k\%3 does not directly optimize k%k\%4; it optimizes k%k\%5 under a lower bound on k%k\%6. This means that an operating point with perfect conditional accuracy but vanishing response rate may be inferior to one with slightly lower k%k\%7 but substantially higher k%k\%8, provided both satisfy the reliability constraint.

The paper also distinguishes HCAcc@k%k\%9 from Precision@QQ0. Precision@QQ1 fixes the number of attempted items and reports conditional accuracy on that top-QQ2 subset. HCAcc@QQ3, by contrast, does not fix the number attempted. It enforces a reliability floor and then maximizes the total number of correct answers through QQ4.

Two further comparisons delimit its scope. First, HCAcc@QQ5 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@QQ6 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 QQ7. In the original definition, QQ8 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@QQ9 definition used there.

3. Computation, threshold selection, and dataset notation

For implementation, the original paper restates the setup in a standard dataset form τ\tau0, with model predictions τ\tau1 and confidence scores τ\tau2 (Song et al., 26 Aug 2025). For any threshold τ\tau3, it defines

τ\tau4

τ\tau5

τ\tau6

τ\tau7

The practical computation procedure is threshold scanning over the unique confidence values. For a given τ\tau8, one computes τ\tau9, c(q)τc(q) \ge \tau0, and c(q)τc(q) \ge \tau1 for each threshold, filters thresholds satisfying c(q)τc(q) \ge \tau2, and selects

c(q)τc(q) \ge \tau3

among feasible thresholds. If no feasible threshold exists, HCAcc@c(q)τc(q) \ge \tau4 is set to c(q)τc(q) \ge \tau5.

The paper recommends inclusive thresholding, c(q)τc(q) \ge \tau6, when confidences are discrete. If multiple thresholds yield the same c(q)τc(q) \ge \tau7, it recommends preferring the threshold with higher c(q)τc(q) \ge \tau8 or the lowest c(q)τc(q) \ge \tau9 for stability. It also notes that HCAcc can be plotted as a function of Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.0 by sweeping values such as Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.1, Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.2, Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.3, and Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.4, and that bootstrap confidence intervals may optionally be obtained by resampling items and recomputing HCAcc@Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.5. For multiple-answer or partial-credit tasks, the binary correctness indicator can be replaced by graded correctness Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.6.

A worked numerical example in the paper illustrates the selection logic. With five items and correctness pattern Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.7 at confidences Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.8, the threshold Qτ={qQc(q)τ}.Q_\tau = \{ q \in Q \mid c(q) \ge \tau \}.9 yields QτQ_\tau0, QτQ_\tau1, and QτQ_\tau2. For QτQ_\tau3, this threshold is feasible and attains the maximum QτQ_\tau4, giving HCAcc@QτQ_\tau5=QτQ_\tau6. For QτQ_\tau7, the optimal feasible threshold becomes QτQ_\tau8, giving HCAcc@QτQ_\tau9=a(q)a(q)0.

4. TrustEHRAgent and the clinical instantiation of HCAcc@a(q)a(q)1

TrustEHRAgent is the system through which HCAcc@a(q)a(q)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 a(q)a(q)3, shared EHR metadata and tools, four-shot demonstrations, and maximum interaction steps a(q)a(q)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 a(q)a(q)5–a(q)a(q)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 a(q)a(q)7 discrete levels a(q)a(q)8. Using token log-probabilities, the probability for each level is

a(q)a(q)9

and the final confidence is a normalized expected level,

k%k\%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 k%k\%01 real clinical questions per database, k%k\%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@k%k\%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@k%k\%04, the reported improvements are k%k\%05 percentage points on MIMIC-III and k%k\%06 percentage points on eICU, while the confidence-aware baselines collapse to k%k\%07. EHRAgent’s standard accuracy, corresponding to HCAcc@k%k\%08, is k%k\%09 on MIMIC-III and k%k\%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 k%k\%11, the threshold k%k\%12 must be raised so high that k%k\%13, implying k%k\%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 k%k\%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@k%k\%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 k%k\%17, interpreted as the probability that the model can correctly answer the query, and a corresponding hallucination risk

k%k\%18

For a risk threshold k%k\%19, empirical coverage is

k%k\%20

For a target coverage k%k\%21, one selects the k%k\%22 lowest-risk examples, or equivalently chooses k%k\%23 by risk quantiles so that k%k\%24. HCAcc@k%k\%25 is then defined as accuracy on the retained subset: k%k\%26

This is not the same definition as the original clinical HCAcc@k%k\%27. In the original paper, k%k\%28 is a reliability constraint and the metric reports the best overall accuracy subject to that constraint. In HALT’s mapping, k%k\%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

k%k\%30

with discrete trapezoidal approximation over a coverage grid. In this usage, k%k\%31 at coverage k%k\%32 is exactly HCAcc@k%k\%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 k%k\%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 k%k\%35 constraint or force thresholds so high that the response rate collapses and k%k\%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@k%k\%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 k%k\%38. For routine decision support, the paper suggests k%k\%39–k%k\%40 to balance coverage and utility. For high-stakes decisions, it suggests k%k\%41, while acknowledging that k%k\%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 k%k\%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@k%k\%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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Hallucination Controlled Accuracy at k% (HCAcc@k%).