Evaluating LLM Security Alert Recall: Pooled Metrics and Cost Constraints

    This article explores the evaluation of Large Language Models (LLMs) in security alert analysis, emphasizing that single-pass recall is insufficient for production environments. It introduces essential metrics such as pooled recall, stable hits, consistency, and cost efficiency. By analyzing variance and cost implications, the article provides actionable engineering strategies, including multi-round sampling, layered routing, and budget control, to ensure reliable and cost-effective security operations.

    Background: Single-Pass Accuracy is Not Enough for Security Triage

    When using LLMs for cybersecurity alert triage, log analysis, and vulnerability identification, the most common evaluation mistake is relying solely on “single-pass correctness.” Security scenarios are characterized by long-tail samples, evolving attack techniques, and asymmetric costs of false positives and false negatives. Model performance can fluctuate significantly across different prompts, contexts, and sampling conditions. Relying only on single-pass recall often leads to overestimating model stability in real production environments.

    The original evaluation consumed tens of billions of tokens and reported single-pass recall, three-pass pooled recall, stable hits, and cost differences. The value of such an evaluation lies not in crowning a single winner, but in answering a more engineering-focused question: Does high pooled recall equate to high availability? Can a low-cost solution handle primary triage with acceptable consistency? This article addresses these questions by abstracting universal evaluation metrics and implementation methods.

    Metric Definitions: Single-Pass Recall, Pooled Recall, and Stable Hits

    In a security alert recall task, assume the test set contains N positive samples that should be identified, with each sample undergoing k independent inference rounds. Key metrics can be defined as:

    • Single-Pass Recall: The number of positive samples hit in a specific inference round divided by N. Example: 17/32 on the first pass.
    • Pooled Recall: The union of positive samples hit across k rounds divided by N. Example: 28/32 across three rounds. It measures the maximum capability given multiple attempts.
    • Stable Hits: The number of positive samples hit across all k rounds divided by N. Example: only 10/32 hit in all three rounds. It measures reliable consistency.
    • Consistency: Stable hits divided by pooled hits (or stable hit rate divided by pooled recall). It reflects model output variance.
    • Cost Efficiency: Total token consumption divided by valid hits, indicating the token cost per correct clue found.

    Pooled recall naturally exceeds single-pass recall because multi-round sampling offers multiple “lottery” chances. Reporting only pooled recall can disguise a high-variance model as a high-capability one. A rigorous report should simultaneously include first-pass recall, average recall, worst-pass recall, stable hits, pooled recall, and token cost.

    Pseudocode is as follows:

    1. function evaluate(cases, runs, model, prompt):
    2. hitsPerRun = []
    3. unionHits = emptySet()
    4. intersectionHits = allCaseSet
    5. totalTokens = 0
    6. for run in 1..runs:
    7. runHits = emptySet()
    8. for case in cases:
    9. result, tokens = model.infer(prompt, case)
    10. totalTokens += tokens
    11. if result.isCorrect:
    12. runHits.add(case.id)
    13. hitsPerRun.append(runHits.size)
    14. unionHits = unionHits ∪ runHits
    15. intersectionHits = intersectionHits ∩ runHits
    16. pooledRecall = unionHits.size / cases.size
    17. stableRecall = intersectionHits.size / cases.size
    18. consistency = intersectionHits.size / unionHits.size
    19. costPerHit = totalTokens / unionHits.size
    20. return hitsPerRun, pooledRecall, stableRecall, consistency, costPerHit

    Result Interpretation: Variance and Cost Behind High Pooled Recall

    The original evaluation revealed three noteworthy universal phenomena.

    First, the highest pooled recall does not mean the most stable single-pass performance. One approach achieved a three-pass pooled recall of 28/32, outperforming multiple alternative solutions; however, its first pass only found 17/32, with just 10/32 stable hits across all three rounds. This indicates a high ceiling under multi-round sampling but weak consistency for single calls. For production systems that cannot afford multi-round sampling costs, pooled recall conclusions cannot be directly applied.

    Second, cost differences alter solution rankings. Another approach achieved a formal version recall of 25/32, just one less than the highest pooled result, but at roughly 70% lower cost. For large-scale alert pipelines, single-pass costs are significantly amplified when multiplied by daily call volumes. If 25/32 already meets the business threshold, the low-cost solution is likely better suited as a first-layer filter, passing low-confidence samples to higher-cost multi-round reviews.

    Third, evaluation boundaries must be explicit. The evaluation did not cover higher-tier models, so conclusions only apply to the tested range and cannot be generalized as the optimal solution for all models. Security teams should fix sample sets, prompt templates, sampling parameters, and budget limits during model selection, while clearly reporting untested scopes.

    Engineering Implementation: Multi-Round Sampling, Layered Routing, and Budget Control

    To translate evaluation conclusions into a deployable system, a layered routing approach is recommended:

    1. Direct Handling of High-Confidence Samples: When model confidence is high and aligns with rule outputs, route to automated tickets or automated blocking processes, while still retaining audit logs.
    2. Multi-Round Sampling for Low-Confidence Samples: Execute 2 to 3 rounds of sampling for low-confidence, long-tail, or high-risk samples. Adopt a union-recall priority strategy before routing to a manual review queue.
    3. Budget Constraints and Early Stopping: Set per-sample token limits and batch total budgets. Stop early when multi-round results stably converge to avoid meaningless repetitive calls.
    4. Caching and Context Compression: Cache results for identical alert fingerprints and similar log fragments. Summarize, trim, and structurally extract long contexts to reduce invalid token consumption.
    5. Observability Construction: Log model identifiers, prompt versions, sampling rounds, token consumption, hit results, latency, and manual feedback to form a traceable evaluation loop.

    Pseudocode example:

    1. function routeAlert(alert, budget):
    2. first = infer(alert, promptVersion="v1")
    3. record(first)
    4. if first.confidence >= HIGH and first.risk == "critical":
    5. return autoHandle(first)
    6. if budget.remaining < MIN_ROUND_COST:
    7. return humanReview(first)
    8. rounds = []
    9. for i in 1..MAX_ROUNDS:
    10. if budget.remaining <= 0: break
    11. r = infer(alert, promptVersion="v1", temperature=samplingProfile[i])
    12. budget.consume(r.tokens)
    13. rounds.add(r)
    14. if stableConverged(rounds): break
    15. merged = mergeByUnion(rounds, first)
    16. if merged.hasCriticalHit:
    17. return humanReview(merged, priority="high")
    18. return autoTriage(merged)

    Evaluation Report Template Recommendations

    Security teams should include in their reports at minimum: test set size and positive/negative ratio, single-pass recall distribution, pooled recall, stable hit rate, consistency metrics, cost per hit, worst-round performance, prompt template version, sampling rounds and temperature strategy, and untested scope. Only by presenting both “ceiling capability” and “stable capability” simultaneously can the report support model selection and budget decisions.

    Conclusion

    Evaluations at the scale of tens of billions of tokens indicate that security model evaluation has evolved from “single-point accuracy” to a comprehensive stage of “stability, cost, and engineering operability.” Pooled recall is suitable for measuring capability ceilings, stable hits for production readiness, and cost efficiency for scale feasibility. In practice, teams should anchor on business risk thresholds, employing multi-round sampling aggregation, layered routing, budget early stopping, and an observability loop to avoid being misled by a single pooled metric.