# Human Eval Cost Eval

> This evaluation probes the accuracy-cost tradeoff of AI coding agents by measuring how often generated solutions pass test cases relative to the actual inference cost required. It highlights whether complex agent architectures provide genuine performance gains over simple retry baselines when compute expenses are accounted for. Use when the user wants to benchmark on HumanEval, or asks about evaluating this task. Reports accuracy.

- Skill: `qhjqhj00/human-eval-cost-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/human-eval-cost-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/human-eval-cost-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/human-eval-cost-eval

---


# human-eval-cost-eval

> AI Agents That Matter — Kapoor et al. (2024) (arXiv:2407.01502, 2024)

## What this evaluates

This evaluation probes the accuracy-cost tradeoff of AI coding agents by measuring how often generated solutions pass test cases relative to the actual inference cost required. It highlights whether complex agent architectures provide genuine performance gains over simple retry baselines when compute expenses are accounted for.

## Datasets

- **HumanEval** — total 164; splits: test (164)

## Metrics

- `accuracy` **(primary)** — range: [0, 1]
  - Fraction of problems where at least one generated solution passes all provided test cases.
- `cost` — range: other
  - Total dollar expenditure for all model API calls and inference steps across all retries and problems.

## Input / output format

**Input**: Problem description and example test cases from the modified HumanEval benchmark.

**Output**: Generated Python code solution for the problem.

## Scoring recipe

```python
total_cost = 0
correct_count = 0
for problem in problems:
    for attempt in range(max_retries):
        code = model.generate(problem)
        total_cost += get_api_cost(code)
        if run_tests(code, problem.test_cases):
            correct_count += 1
            break
accuracy = correct_count / len(problems)
```

## Common pitfalls

- Ignoring inference cost when comparing agent architectures, leading to false claims of SOTA performance.
- Using compute proxies (e.g., token count) instead of actual dollar costs for cost reporting.
- Failing to test against simple retry baselines that can match complex agent accuracy at a fraction of the cost.

## Evidence (verbatim from paper)

> We run each agent five times and report the mean accuracy and the mean total cost on the 164 HumanEval problems.

## Citation

```bibtex
@misc{kapoor2024aiagents,
  title={AI Agents That Matter},
  author={Kapoor et al. (2024)},
  year={2024},
  note={arXiv:2407.01502}
}
```

- arXiv: 2407.01502

