LLM Security Evaluation: Why Recall Rate Doesn't Equal Real-World Performance

    This article examines the gap between benchmark recall metrics and practical usability when evaluating large language models for security tasks. Drawing on a public test that consumed roughly 11.7 billion tokens across 32 security topics, it explains three distinct recall measures—pooled recall, single-run recall, and stable hit consistency—and why a model that leads on pooled recall can perform far worse in a single run. It also translates cost advantages into engineering terms, proposes composite metrics and a weighted scoring approach, and provides an evaluation design checklist plus deployment recommendations for building repeatable, auditable LLM security pipelines.

    1. Where the Problem Starts: A High-Cost Security Model Test

    In cybersecurity, large language models are expected to handle tasks such as discovering vulnerability clues, attributing log anomalies, and triaging alerts. In a recent public test, a security-focused model consumed roughly 11.7 billion tokens in total, while multiple general-purpose and specialized models were repeatedly evaluated across 32 predefined security topics. The results were revealing: measured by “pooled recall over three runs,” a general-purpose reasoning model led with 28/32, ahead of several frontier models (mostly in the 25–26/32 range). Yet in a single run, it hit only 17 items on the first attempt, and just 10 items were hit consistently across all three runs. Meanwhile, the official release of an open-weight model family reached 25/32, close to the top, at roughly 69.8% lower cost.

    What truly matters here is not who ranked first, but the crack this data exposes between evaluation methodology and engineering usability.

    2. Clarifying the Metrics: Three Kinds of Recall, Three Different Questions

    1. Pooled Recall

    Pooled recall takes the union of multiple runs as the result set, measuring “the maximum that could theoretically be found.” It answers the question of the capability ceiling and is suitable for a capability baseline, but it systematically overestimates real performance, because engineering systems usually get only one chance.

    2. Single-Run Recall

    Single-run recall is the number of hits in each independent run, corresponding directly to real invocation scenarios. The gap between 17/32 and 28/32 shows that the ceiling and the median level can differ by more than ten percentage points.

    3. Stable Hit Rate and Consistency

    The number of items hit in all three runs (10/32) captures repeatability. Security operations emphasize reproducibility and auditability, and a model that is “sometimes good, sometimes bad” significantly raises the cost of manual review. A simple consistency coefficient can approximate this:

    1. def consistency(hits_per_run, total):
    2. # hits_per_run: a list of sets of topic IDs hit in each run
    3. from functools import reduce
    4. stable = reduce(lambda a, b: a & b, hits_per_run)
    5. union = reduce(lambda a, b: a | b, hits_per_run)
    6. return len(stable) / total, len(union) / total, len(stable) / max(len(union), 1)

    The third value in the formula above (stable hits / pooled hits) being closer to 1 indicates a more “solid” capability; if it is clearly low, then the pooled recall is mainly stacked up from occasional hits.

    3. Why Pooled Recall Is High but Single-Run Performance Is Weak

    • Sampling randomness: decoding temperature and the order in which context is organized can change the reasoning path, causing similar questions to take different branches in different rounds.
    • Long-context dilution: security material is often lengthy, key clues get drowned out by irrelevant content, and attention allocation becomes unstable.
    • Prompt sensitivity: subtle changes in instruction wording and output format constraints can cause the hit set to drift.
    • Evaluation set leakage and memory effects: some hits may come from corpus memorization rather than real reasoning, inflating performance during repeated tests.
    • Ambiguous judgment criteria: if the determination of a “hit” relies on subjective human scoring, variance is amplified further.

    4. The Cost Dimension: Translating “70% Cheaper” into Engineering Language

    The significance of a cost advantage must be viewed in terms of cost per unit of effective output. Three composite metrics are recommended:

    • Cost per effective hit = total spend / number of stable hits;
    • Review cost = the manual labor hours triggered by misses and false positives;
    • Scaling elasticity cost = the marginal overhead when concurrency increases and context grows longer.

    A cheap but weakly consistent model may offset its price advantage through extensive review; conversely, a slightly more expensive model with stable hits is often more cost-effective in a pipeline. In engineering, a weighted score can be used for initial screening:

    1. score = 0.4 * single_run_recall + 0.3 * consistency \
    2. + 0.2 * (1 / cost_per_stable_hit) + 0.1 * low_false_positive

    The weights need to be adjusted according to business risk level: high-risk scenarios should raise the weights for consistency and false positives.

    5. Evaluation Design Checklist: Making Conclusions Trustworthy

    1. Define the metric clearly: state upfront whether it is pooled or single-run, and prohibit mixing them.
    2. Run multiple independent trials: at least three, reporting the mean, variance, and stable hits.
    3. Fixed and perturbation dual-track: one group with fixed parameters to measure the baseline, and one group with prompt and order perturbations to test robustness.
    4. Blind evaluation and dual annotation: define judgment criteria in advance, and keep records of arbitration for divergent samples.
    5. Layered datasets: stratify by asset type, threat category, and difficulty to avoid overall averages masking weaknesses.
    6. Record full-pipeline overhead: log tokens, latency, context length, and retry counts together.

    6. Engineering Implementation Recommendations

    • Dual-model routing: use a high-consistency model as the primary engine and a high-ceiling model for supplementary review, using a voting mechanism to improve stable hits.
    • Result caching and deduplication: reuse conclusions for similar alerts to reduce token consumption.
    • Structured output constraints: enforce JSON fields and confidence scores to facilitate automated judgment and statistics.
    • Human-in-the-loop closed loop: feed review conclusions back as evaluation samples to continuously calibrate metrics.
    • Observability: track hit rate, latency, and cost drift through logging services and monitoring alerts; model services can run on a container platform for elastic scaling and canary releases; training and evaluation data can be stored in object storage, and message queues can be used for peak shaving and task decoupling.

    7. Conclusion

    The “11.7 billion tokens” is a reminder that the scale of investment does not equal the quality of output. When selecting a model, single-run recall and consistency should be the primary metrics, pooled recall should serve as a reference ceiling, and cost should be converted into “cost per stable hit.” In security scenarios, being repeatable, auditable, and explainable is the real threshold for a model to enter the production pipeline. If an organization wants to build such an evaluation and operations system on Baidu AI Cloud, it can directly use the general metric framework and engineering practices above, without being tied to any specific model brand.