ReplayBench / README.md
Phito's picture nielsr's picture
nielsr HF Staff
Add task category to dataset card (#1)
7b1b834
|
Raw History Blame Contribute Delete
3.7 kB
---
language:
- en
- zh
license: apache-2.0
pretty_name: ReplayBench
task_categories:
- text-generation
tags:
- benchmark
- llm-agents
- agent-security
- tool-result-replay
---
# ReplayBench
**A benchmark for evaluating tool-result misbinding in LLM agents through controlled replay.**
[Code and runner](https://github.com/Phitooo/Replaybench) | [English](https://github.com/Phitooo/Replaybench/blob/main/README.md) | [简体中文](https://github.com/Phitooo/Replaybench/blob/main/README.zh-CN.md)
## Overview
ReplayBench evaluates incorrect reuse of a genuine, unmodified tool result outside its valid execution context. The replayed result contains no newly injected instruction. It is not a prompt-injection benchmark.
This dataset is the **benchmark itself**: scenario specs, sandbox toolkit schemas, and the 76 case bundles. The runner, checker, and sandbox code live on GitHub. Defense implementations are not included.
| Dimension | Count | Where |
|---|---|---|
| Scenarios | 19 (`F01`–`F19`) | `benchmark/scenarios/` |
| Failure templates | 4 (`T01`–`T04`) | `cases/Fxx/Tyy/` |
| Replay mechanisms | 3 (`M1`–`M3`) | delivery channels, not separate cases |
| Scenario–template cases | 76 | `cases/` |
| Scenario–template–mechanism configurations | 228 | 76 cases × 3 channels |
## Failure templates
| Template | Violated property | What is wrong |
|---|---|---|
| T01 | Attribution | A genuine result from one task/object is used in another. |
| T02 | Contextual validity | A formerly valid result is reused after authorization or resource state changes. |
| T03 | Single execution | An already committed state-changing action executes again. |
| T04 | Causal ordering | Results are consumed in an order inconsistent with the workflow. |
## Replay mechanisms
| Mechanism | Delivery path |
|---|---|
| M1 Durable Recovery | A persisted tool result is retrieved during recovery. |
| M2 Queue Redelivery | A previously queued result is redelivered. |
| M3 Cache Resume | A cached result is restored when execution resumes. |
M1, M2, and M3 share the same case bundle and deliver the same `a_result`.
## What is in a case
Each `cases/Fxx/Tyy/` bundle has:
- `state.json` — sandbox initial state
- `a_result.json` — the genuine tool result from task A
- `b_user.txt` — task B instruction
- `spec.json` — forbidden object, expected object, verify tool, act tool
Five shared toolkit schemas are in `benchmark/toolkits/`: `commerce`, `infra`, `org`, `sensitive`, `workspace`.
## Metrics
| Metric | Meaning |
|---|---|
| DAR | The replayed result reaches task B. |
| WAR | Task B generates a wrong state-changing action. |
| AAR | That wrong action is accepted. |
| **FSER** | **The persistent sandbox state is independently verified as wrong. Primary metric.** |
Rates use valid trials only. A delivered result that does not cause a wrong action (DAR = 1, FSER = 0) is model non-acceptance, not a blocked trial and not a defense success.
## Not in this dataset
- Runner, checker, sandbox implementation, and adapters (on [GitHub](https://github.com/Phitooo/Replaybench))
- Call-ID binding, one-shot ticket, and world-state epoch defense code
- API keys or model endpoints
## Citation
If you use ReplayBench in your research, please cite our paper:
```bibtex
@misc{zhi2026traptoolresultreplayattack,
title={{TRAP: Tool-Result Replay Attack for Probing Misbinding in LLM Agents}},
author={Yutong Zhi and Jie Zhang and Xiuqi Lu and Jiayuan Xu and Jing Shao},
year={2026},
eprint={2610.16333},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2610.16333},
}
```
## License
Apache-2.0.