---
title: "Black-Box Test Case Selection for Agent Evaluations"
term: "Black-Box Test Case Selection"
description: "Select zero-history agent eval subsets for one objective: Category Partition or Adaptive Random for pass-rate estimates, LLM-as-judge for early failures."
tags:
  - testing-verification
  - evals
  - cost-performance
  - benchmarks
  - tool-agnostic
  - arxiv
aliases:
  - "history-free test case selection"
  - "black-box agent benchmark selection"
last_reviewed: 2026-11-28
maturity: emerging
---

# Black-Box Test Case Selection for Agent Evaluations

> Black-box test selection splits zero-history agent evaluations by objective: representative subsets estimate pass rates, while difficulty-ranked subsets expose failures early.

Black-box test case selection chooses agent benchmark tasks from pre-execution inputs alone, without running the target agent or reading prior outcomes ([Asgari et al., 2026, §1 and §3.1](https://arxiv.org/abs/2611.34617v1)). Pick one evaluation objective first. Across ten public benchmarks (45 to 607 tasks, 12 to 101 agent configurations each, 298 benchmark-agent blocks) at 10%, 20%, and 50% task budgets, no strategy leads on both Success Rate estimation and early failure detection ([Asgari et al., 2026, Abstract, §4.1, and §4.3](https://arxiv.org/abs/2611.34617v1)). No single strategy performs best across all benchmarks, and task budget and monetary execution cost are not equivalent because difficulty-ranked subsets pick more expensive tasks ([Asgari et al., 2026, §5.1 and §6](https://arxiv.org/abs/2611.34617v1)).

## Choosing a selector by objective

At the 20% budget on SWE-bench Verified (median across 13 agents, $225 full-suite cost), the two families diverge cleanly ([Asgari et al., 2026, Tables 3, 4, and 5](https://arxiv.org/abs/2611.34617v1)):

| Strategy | Median SccErr | Median failures found | Execution cost | Best fit |
|---|---|---|---|---|
| Category Partition | 1.8 pp (0.018) | 29.0 | $47 | Pass-rate estimation with rich metadata |
| Adaptive Random | 2.1 pp (0.021) | 27.4 | $46 | Pass-rate estimation with flat metadata |
| Random | 3.3 pp (0.033) | 27.4 | $45 | Unbiased baseline on any suite |
| Factor-Based LLM-as-Judge | 25.8 pp (0.258) | 53.0 | $80 | Early failure detection only |

For full-suite Success Rate estimation, adapted black-box regression strategies had the lowest median error (`SccErr`) on nine of ten benchmarks at 20% budget: Category Partition on five, Adaptive Random on two, and Boundary Value on two ([Asgari et al., 2026, §5.1](https://arxiv.org/abs/2611.34617v1)). Category Partition groups tasks by pre-execution variables (repository, domain, or task type, plus traceback presence, exception mentions, and length quartile). It sorts each partition by decreasing length and cycles across partitions ([Asgari et al., 2026, §3.1.2](https://arxiv.org/abs/2611.34617v1)). Across all 298 blocks in the regression comparison, it achieved the best mean rank and beat Random (Friedman p < 10^-35, Nemenyi CD = 0.70; [Asgari et al., 2026, §5.1](https://arxiv.org/abs/2611.34617v1)).

When benchmark metadata is weak, fall back to Adaptive Random. It embeds task text with CodeT5+ (`Salesforce/codet5p-110m-embedding`), reduces vectors to 10 dimensions with UMAP, and picks the task farthest from selected ones ([Asgari et al., 2026, §3.1.2](https://arxiv.org/abs/2611.34617v1)). At 20% budget, Adaptive Random beat Random on 13 of 13 agents on SWE-bench Verified and 11 of 13 on SWE-bench Multilingual, against 10 and 8 for Category Partition ([Asgari et al., 2026, §5.1](https://arxiv.org/abs/2611.34617v1)).

For early failure detection, use Factor-Based LLM-as-Judge. An independent judge scores each task 1 to 4 on five task-type factors (for coding: localization hardness, expected change size, reasoning hardness, validation complexity, and reproducibility hardness). It standardizes factor scores with z-scores and sums them to rank hardest tasks first ([Asgari et al., 2026, §3.1.3 and §4.3](https://arxiv.org/abs/2611.34617v1)). Across all 298 blocks at 20% budget, all six difficulty strategies beat Random and Historical Mid-Range (Friedman p < 10^-190, Nemenyi CD = 0.61), led by Factor-Based LLM-as-Judge and its diversity variant ([Asgari et al., 2026, §5.2](https://arxiv.org/abs/2611.34617v1)).

Each task is judged once and reused across agents. Judging all ten benchmarks cost about $45.50 with Claude Sonnet 5 and about $0.93 with GPT-4o mini. With the cheaper judge, the overall pattern remained similar, with Task-Side Difficulty Estimation strategies still ranking above Random and Historical Mid-Range for failure detection ([Asgari et al., 2026, §6 and Table 6](https://arxiv.org/abs/2611.34617v1)).

## Why it works

This split applies separation of concerns to evaluation sampling: pass-rate estimation and failure concentration pull the subset distribution in opposite directions ([Asgari et al., 2026, §6](https://arxiv.org/abs/2611.34617v1)). Estimating a full-suite pass rate needs a subset whose easy-to-hard mix mirrors the whole benchmark. Cycling across multi-variable partitions covers different task types, domains, textual patterns, and length ranges, while spreading picks in embedding space covers different regions of the learned task representation without prioritizing tasks by estimated difficulty ([Asgari et al., 2026, §3.1.2 and §6](https://arxiv.org/abs/2611.34617v1)).

Early failure detection needs the reverse: placing high-risk tasks at the front of the queue ([Asgari et al., 2026, §6](https://arxiv.org/abs/2611.34617v1)). That skew nearly doubles failures found on SWE-bench Verified while ruining pass-rate representativeness. The same split explains why Historical Mid-Range (picking tasks nearest 50% leave-one-agent-out pass rate) failed at both single-agent goals. At the 20% budget, tasks tuned to separate agents on a leaderboard produced 0.126 median `SccErr` on SWE-bench Verified and 0.311 on CORE-Bench Hard, and ranked last for failure detection in the regression comparison ([Asgari et al., 2026, §4.2, §5.1, and §5.2](https://arxiv.org/abs/2611.34617v1)).

## When this backfires

- Reading a difficulty-ranked subset's pass rate as a benchmark score: at the 20% budget, Random beat all six difficulty methods on `SccErr` across benchmarks (Friedman p < 10^-77), and Factor-Based LLM-as-Judge had a median error of 25.8 percentage points on SWE-bench Verified, or 23.8 with diversity ([Asgari et al., 2026, §5.1](https://arxiv.org/abs/2611.34617v1)).
- Assuming Category Partition beats Random on every suite: Category Partition trailed Random on three of ten benchmarks at 20% budget, namely USACO (13.8 against 4.2 percentage points), TAU-bench Airline (13.0 against 10.8), and SWE-Bench Pro (3.6 against 3.0; [Asgari et al., 2026, Table 3](https://arxiv.org/abs/2611.34617v1)). On SWE-bench Verified, repository-only stratification improves on uniform random by less than 2% in the Multi-agent setting at a 30% subset size, and Ayyad et al. conclude that "Repository metadata is not a meaningful predictor of instance difficulty" ([Ayyad et al., 2026, §6.1](https://arxiv.org/abs/2609.24928v1)).
- Budgeting by task count instead of API spend: the tasks judge strategies select are more difficult and tend to be more expensive to run, so on the costed SWE-bench Verified and Multilingual suites at 20% budget, judge strategies saved about 68% to 73% of execution cost against 80% to 83% for Category Partition, TF-IDF, and Adaptive Random ([Asgari et al., 2026, §6](https://arxiv.org/abs/2611.34617v1)).
- Runtime-driven failures: pre-execution difficulty assumptions "may not hold when difficulty depends mainly on tool behavior or execution conditions", and about one third of TerminalBench 2.0 task-agent results mixed pass and fail trials before binarization at over 50% ([Asgari et al., 2026, §7](https://arxiv.org/abs/2611.34617v1)). Coarse metrics can also flatter weak predictors: "Predicting a single constant difficulty for every task still yields an AUC of 0.715" across pooled agentic benchmarks ([Krsteski and Meyer, 2026, §4.2](https://arxiv.org/abs/2608.05797v1)).
- Small suites: on the three 45-to-50-task suites (CORE-Bench Hard, TAU-bench Airline, and SWE-bench Mini), a 20% slice is 9 to 10 tasks and Random's median error stays at 9.3 to 10.8 percentage points ([Asgari et al., 2026, Tables 2 and 3](https://arxiv.org/abs/2611.34617v1)).
- Benchmark overlap and leakage limits: SWE-bench Mini draws 50 tasks from SWE-bench Verified and is not independent of it, and GPT-4o mini's October 2023 cutoff reduces without ruling out training-data exposure ([Asgari et al., 2026, §4.1 and §7](https://arxiv.org/abs/2611.34617v1)).
- Ignoring calibrated random draws or run history: uniform random stays unbiased at the evaluation frontier where model-similarity predictors fail ([arXiv:2506.07673v2, Abstract](https://arxiv.org/abs/2506.07673v2)). MINCE finds that at calibrated sizes, "random sampling performs comparably to stratified and embedding-clustered sampling" without specialized selectors ([Das et al., 2026, §2](https://arxiv.org/abs/2606.22826v1)). Once you have two or three full runs, switch to [trajectory-aware benchmark subset selection](trajectory-aware-benchmark-subset-selection.md) or [adaptive validation task selection](adaptive-validation-task-selection.md).

## Example

Applying the technique to SWE-bench Verified (500 tasks, $225 full-suite cost) for GPT 5.2 Codex at a 20% budget (100 tasks) shows how inputs, selector choice, and outputs split by objective ([Asgari et al., 2026, Abstract, §5.2, and §8](https://arxiv.org/abs/2611.34617v1)):

- Pass-rate estimation: feed pre-execution repository, traceback, exception, and length-quartile fields into Category Partition and take the first 100 cycled tasks. For GPT 5.2 Codex, cost drops from $225 to $47 (a 79% cut) with 0.8 percentage points of absolute Success Rate estimation error. Applying the same method to DeepSeek V3.2 on SWE-bench Multilingual (60 of 296 tasks) cuts cost by about 82% from $114 to $20 with 0.8 percentage points of error ([Asgari et al., 2026, §1 and §8](https://arxiv.org/abs/2611.34617v1)).
- Early failure detection: score each task 1 to 4 on the five coding difficulty factors with an independent LLM judge, z-score and sum, and run the top 100 tasks. For GPT 5.2 Codex, this finds 53.0 of its 136 full-suite failures (about 39% of all failures in 20% of tasks), against 27.4 for Random and 40.2 for Round Robin ([Asgari et al., 2026, §5.2](https://arxiv.org/abs/2611.34617v1)). Across all 13 SWE-bench Verified agents, that slice costs a median of $80 instead of Category Partition's $47 ([Asgari et al., 2026, Table 5](https://arxiv.org/abs/2611.34617v1)).

Inspecting Category Partition's buckets also exposes benchmark skew before running an agent. On SWE-bench Verified it creates 89 partitions: 30 hold one task, while the five largest hold 35.4% of the benchmark. For Claude 4.5 Sonnet, Django tasks without traceback or exception names failed at 15.3% in the shortest length group (9 of 59 tasks) against 50.0% in the longest group (7 of 14), compared with a 28.6% full-benchmark failure rate ([Asgari et al., 2026, §6](https://arxiv.org/abs/2611.34617v1)).

## Key Takeaways

- Declare one objective before cutting a zero-history subset, and never report a pass rate computed on a difficulty-ranked slice.
- Use Category Partition for pass-rate estimates only when tasks carry multi-variable structural and textual metadata. Fall back to Adaptive Random or uniform Random when metadata is flat.
- Score tasks once with a low-cost judge such as GPT-4o mini for early failure detection, then reuse that ordering across candidate agents.
- Budget difficulty-selected runs in expected API dollars rather than task count, because harder tasks tend to be more expensive to run.
- Retire black-box selection after two or three full runs on a stable suite and switch to outcome-based subsetting.

## Related

- [Trajectory-Aware Benchmark Subset Selection for Agents](trajectory-aware-benchmark-subset-selection.md) — pass-count stratification with trajectory-embedding centroids once two or three full runs exist
- [Adaptive Validation Task Selection](adaptive-validation-task-selection.md) — variance-weighted task resampling across harness-tuning rounds when per-task outcome history is available
- [Static Difficulty Estimation for Agent Issue Triage](static-difficulty-estimation-issue-triage.md) — what pre-execution structural features predict and why constant-difficulty AUC baselines mislead
- [Pre-Generation Complexity Scoring for Code Reliability](pre-generation-complexity-scoring.md) — fixed-rubric prompt scoring before execution and its limits against keyword baselines
- [Purpose-Built Eval Suites for Model and Harness Swaps](purpose-built-eval-suites.md) — sizing a custom evaluation suite when no public benchmark matches your workload
