Text Generation
PEFT
Safetensors
English
lora
qwen3.5
agents
multi-agent
failure-attribution
agent-debugging
llm-as-a-judge
lm-judge
evaluation
agent-evaluation
llm-evaluation
root-cause-analysis
debugging
trajectory
tau-bench
Eval Results (legacy)
Run this model with HF Jobs
Run ianlyoo/Culprit-9B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ianlyoo/Culprit-9B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ianlyoo/Culprit-9B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/ianlyoo/Culprit-9B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/ianlyoo/Culprit-9B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use ianlyoo/Culprit-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ianlyoo/Culprit-9B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B") model = PeftModel.from_pretrained(base_model, "ianlyoo/Culprit-9B") - Notebooks
- Google Colab
- Kaggle
Add Culprit-9B adapter, model card, chart, LICENSE and NOTICE
Browse filesFiles changed (6)
- LICENSEAdded+201
- NOTICEAdded+28
- README.md+333
- adapter_config.jsonAdded+57
- adapter_model.safetensorsAdded+3
- assets/step_accuracy.pngAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.12345678910111213141516171819202122232425262728CulpritCopyright 2026 Culprit authors
The code and the LoRA adapter in this repository are licensed under the Apache License, Version 2.0 (LICENSE).The real-failure evaluation set (data/eval/tau2_real_failures.jsonl) is licensed under CC BY 4.0, see data/eval/DATASHEET.md.
This work builds on the following third-party material.
Base model Qwen/Qwen3.5-9B (revision c202236235762e1c871ad0ccb60c8ee5ba337b9a), Apache License 2.0, Qwen Team, Alibaba. The adapter is a derivative of these weights; merged weights stay under the Apache License 2.0.
Models used to generate and label training and evaluation data Qwen/Qwen3.5-9B, Apache License 2.0. Qwen/Qwen3.6-35B-A3B-FP8 (revision c653bba46dfa06e9658dcc0b0dc87fe4685f14a2), Apache License 2.0.
Task sources for generated training traces GSM8K (openai/gsm8k), MIT License. AQuA-RAT (deepmind/aqua_rat), Apache License 2.0. CommonsenseQA (tau/commonsense_qa), MIT License. FinQA (czyssrs/FinQA), MIT License. MBPP (google-research-datasets/mbpp), CC BY 4.0. Austin et al., "Program Synthesis with Large Language Models", 2021. tau2-bench (sierra-research/tau2-bench, commit eb922f20204e3ed2e639699c87c6844f294d48e2), MIT License, Copyright (c) 2025 Sierra Technologies. Train-split tasks for training; test-split tasks for the real-failure set.
Evaluation only (not used for training or checkpoint selection) Who&When Pro (Leoxx/whowhen_pro), CC BY 4.0. The error-type codes follow its taxonomy; the descriptions in culprit/render.py are our own wording.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336---license: apache-2.0base_model: Qwen/Qwen3.5-9Bbase_model_relation: adapterlibrary_name: peftpipeline_tag: text-generationlanguage:- entags:- lora- qwen3.5- agents- multi-agent- failure-attribution- agent-debugging- llm-as-a-judge- lm-judge- evaluation- agent-evaluation- llm-evaluation- root-cause-analysis- debugging- trajectory- tau-benchdatasets:- openai/gsm8k- deepmind/aqua_rat- tau/commonsense_qa- google-research-datasets/mbppmetrics:- accuracy- f1model-index:- name: Culprit-9B results: - task: type: text-generation name: Failure attribution dataset: name: Who&When Pro, text split, 400-trace subset balanced by length type: Leoxx/whowhen_pro split: text revision: 0bd196c metrics: - type: accuracy name: Decisive-step accuracy value: 81.2 - type: accuracy name: Agent accuracy (multi-agent logs) value: 79.3 - type: f1 name: Error-type macro-F1 value: 27.9 - type: accuracy name: Joint accuracy (agent, step and error type) value: 35.0 source: name: Culprit evaluation results url: https://github.com/ianlyoo/culprit/tree/main/eval/results - task: type: text-generation name: Failure attribution dataset: name: Who&When Pro, text split, all 6,253 traces type: Leoxx/whowhen_pro split: text revision: 0bd196c metrics: - type: accuracy name: Decisive-step accuracy value: 88.1 source: name: Culprit evaluation results url: https://github.com/ianlyoo/culprit/tree/main/eval/results - task: type: text-generation name: Failure attribution dataset: name: τ²-bench real failures, replay-labelled (50 conversations) type: tau2-bench-real-failures metrics: - type: accuracy name: Decisive-step accuracy value: 18.0 source: name: Culprit evaluation results url: https://github.com/ianlyoo/culprit/tree/main/eval/results---
# Culprit-9B: open-weight model for agent failure attribution
**Which agent broke the run, and at which step?**
Culprit-9B is an open-weight model for automated failure attribution in LLM agent systems: given the log of a failed single- or multi-agent run, it identifies the agent and the step responsible for the failure, plus the error type, as JSON. It is a LoRA adapter (PEFT) for [Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B) under Apache-2.0, for developers and researchers who build, debug or evaluate agents. On held-out Who&When Pro ([arXiv:2607.09996](https://arxiv.org/abs/2607.09996)), in a 400-run subset balanced by length, it finds the decisive step in 81.2% of runs (95% CI 77.5–85.0), against 75.2% for Gemini 4 Neon, 57.0% for GPT-6.2 Sol and 56.0% for Claude Opus 5.5; on logs over 12k tokens it scores 74.0%, against 64.0% for Gemini 4 Neon and 36.0% for the other two. On 50 real τ²-bench failures labelled by replay, every model, Culprit included, scores 12–18%, within noise of each other.
**Code, evaluation and every prediction file:** [github.com/ianlyoo/culprit](https://github.com/ianlyoo/culprit). File paths on this card are relative to that repository.

```json{"agent": "coder", "step": 7, "error_type": "R.3"}```
`R.3` is the Who&When Pro code for a numerical error; [`culprit/render.py`](https://github.com/ianlyoo/culprit/blob/main/culprit/render.py) lists all 17 codes.
## Quick start
**Command line** (vLLM by default, `--backend hf` for transformers):
```bashgit clone https://github.com/ianlyoo/culprit && cd culpritpip install -r requirements.txthf download ianlyoo/Culprit-9B --local-dir culprit-9bpython attribute.py --traces runs.jsonl --out answers.jsonl --adapter culprit-9b```
Each line of `runs.jsonl` is one failed run: `{"id": ..., "task": "...", "steps": [{"agent": "...", "text": "..."}, ...], "final": "..."}`. Steps are numbered from 1 in the order given.
**Python with transformers and PEFT**, run inside the cloned repository so that `culprit.render` builds the prompt Culprit was trained on. This is what `attribute.py --backend hf` does; `to_prompt` takes the numbered record that `attribute.py` builds from a `runs.jsonl` line (`task_text`, and `steps` with `i` from 1):
```pythonimport torchfrom peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom culprit.render import parse_answer, to_prompt
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-9B")model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B", dtype=torch.bfloat16, device_map="auto")model = PeftModel.from_pretrained(model, "ianlyoo/Culprit-9B")
run = {"task_text": "Compute 17 * 23 and report the result.", "steps": [{"i": 1, "agent": "planner", "text": "Ask the calculator to multiply 17 by 23."}, {"i": 2, "agent": "calculator", "text": "17 * 23 = 381"}, {"i": 3, "agent": "reporter", "text": "The answer is 381."}], "final": "381"}text = tok.apply_chat_template(to_prompt(run), tokenize=False, add_generation_prompt=True, enable_thinking=False)ids = tok(text, return_tensors="pt", add_special_tokens=False)["input_ids"].to(model.device)out = model.generate(ids, max_new_tokens=200, do_sample=False)print(parse_answer(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)))# prints a dict: {'agent': <agent name>, 'step': <step number>, 'error_type': <code>}```
Culprit answers without a thinking phase, in a few dozen output tokens. Prompts of up to 32k tokens are supported; very long step texts are shortened in the middle. [`merge_to_bf16.py`](https://github.com/ianlyoo/culprit/blob/main/merge_to_bf16.py) folds the adapter into the base weights.
## Results
All models get the same prompt. The scores:
- **Step accuracy**: the predicted step is the decisive one.- **Agent accuracy**: the predicted agent is right (counted on multi-agent logs only).- **Error-type macro-F1**: F1 over the error-type codes, averaged across codes.- **Joint**: agent, step and error type are all right.
Brackets are 95% bootstrap intervals over traces (2,000 resamples, seed 0). Lengths count the rendered prompt in Qwen3.5 tokens. "Always the last step" and "Always the first step" are fixed answers that show how much of a score a position guess alone gets: on short Who&When Pro logs the decisive step is often the last one.
### Who&When Pro, 400-trace subset
| Model | n | Step acc. | Agent acc. | Error-type macro-F1 | Joint ||---|---|---|---|---|---|| Culprit-9B (ours) | 400 | 81.2 [77.5, 85.0] | 79.3 [73.5, 84.5] | 27.9 [22.5, 34.9] | 35.0 [30.5, 39.5] || Qwen3.5-9B | 400 | 57.2 [52.5, 62.0] | 66.0 [59.6, 72.3] | 13.1 [10.5, 17.0] | 18.8 [15.0, 22.5] || Claude Opus 5.5 | 400 | 56.0 [51.2, 60.8] | 59.1 [52.2, 65.5] | 22.7 [19.0, 28.5] | 27.5 [23.2, 32.0] || GPT-6.2 Sol | 400 | 57.0 [52.2, 61.8] | 63.5 [56.9, 69.9] | 19.8 [16.5, 25.1] | 24.5 [20.5, 28.7] || Gemini 4 Neon | 400 | 75.2 [71.0, 79.5] | 75.9 [69.9, 81.7] | 35.5 [30.8, 43.4] | 41.0 [36.2, 45.8] || Always the last step | 400 | 30.2 [25.8, 34.8] | 49.3 [42.5, 56.1] | 2.7 [2.3, 3.4] | 2.5 [1.0, 4.0] || Always the first step | 400 | 13.5 [10.2, 17.0] | 40.4 [33.7, 47.2] | 2.7 [2.3, 3.4] | 4.8 [2.8, 6.8] |
Step accuracy by trace length (tokens):
| Model | <3k | 3k-6k | 6k-12k | >12k ||---|---|---|---|---|| Culprit-9B (ours) | 97.0 [93.1, 100.0] (n=101) | 78.8 [70.7, 86.9] (n=99) | 75.0 [66.0, 83.0] (n=100) | 74.0 [66.0, 82.0] (n=100) || Qwen3.5-9B | 84.2 [76.2, 91.1] (n=101) | 54.5 [44.4, 63.6] (n=99) | 54.0 [44.0, 63.0] (n=100) | 36.0 [26.0, 46.0] (n=100) || Claude Opus 5.5 | 85.1 [78.2, 92.1] (n=101) | 56.6 [46.5, 66.7] (n=99) | 46.0 [36.0, 56.0] (n=100) | 36.0 [27.0, 46.0] (n=100) || GPT-6.2 Sol | 87.1 [80.2, 93.1] (n=101) | 54.5 [44.4, 64.6] (n=99) | 50.0 [40.0, 60.0] (n=100) | 36.0 [27.0, 46.0] (n=100) || Gemini 4 Neon | 92.1 [86.1, 97.0] (n=101) | 75.8 [67.7, 83.8] (n=99) | 69.0 [60.0, 78.0] (n=100) | 64.0 [54.0, 74.0] (n=100) || Always the last step | 64.4 [54.5, 73.3] (n=101) | 29.3 [20.2, 38.4] (n=99) | 22.0 [14.0, 30.0] (n=100) | 5.0 [1.0, 10.0] (n=100) || Always the first step | 3.0 [0.0, 6.9] (n=101) | 17.2 [10.1, 24.2] (n=99) | 14.0 [8.0, 21.0] (n=100) | 20.0 [13.0, 28.0] (n=100) |
**Paired differences** on the same traces (Culprit minus each model, percentage points, 95% paired bootstrap):
| Culprit minus | Step, all 400 | Joint, all 400 | Step, >12k (n=100) ||---|---|---|---|| Qwen3.5-9B | +24.0 [+19.2, +28.5] | +16.2 [+11.8, +20.8] | +38.0 [+29.0, +48.0] || Claude Opus 5.5 | +25.2 [+20.0, +30.5] | +7.5 [+2.8, +12.2] | +38.0 [+26.0, +49.0] || GPT-6.2 Sol | +24.2 [+19.0, +29.5] | +10.5 [+5.8, +15.2] | +38.0 [+26.0, +50.0] || Gemini 4 Neon | +6.0 [+1.0, +11.2] | -6.0 [-11.0, -0.8] | +10.0 [-1.0, +21.0] || Always the last step | +51.0 [+45.2, +56.5] | +32.5 [+28.0, +37.5] | +69.0 [+60.0, +78.0] || Always the first step | +67.8 [+62.0, +73.5] | +30.2 [+25.2, +35.5] | +54.0 [+42.0, +66.0] |
### Who&When Pro, all text traces
| Model | n | Step acc. | Agent acc. | Error-type macro-F1 | Joint ||---|---|---|---|---|---|| Culprit-9B (ours) | 6253 | 88.1 [87.3, 88.9] | 88.4 [87.2, 89.6] | 25.8 [24.3, 27.2] | 30.5 [29.4, 31.6] || Qwen3.5-9B | 6253 | 72.6 [71.5, 73.7] | 76.2 [74.5, 77.8] | 17.1 [15.8, 18.3] | 21.8 [20.8, 22.9] || Always the last step | 6253 | 50.1 [48.9, 51.4] | 73.6 [71.9, 75.3] | 2.2 [2.1, 2.3] | 4.2 [3.7, 4.7] || Always the first step | 6253 | 7.5 [6.9, 8.1] | 40.3 [38.5, 42.1] | 2.2 [2.1, 2.3] | 3.0 [2.6, 3.5] |
Step accuracy by trace length (tokens):
| Model | <3k | 3k-6k | 6k-12k | >12k ||---|---|---|---|---|| Culprit-9B (ours) | 93.0 [92.3, 93.8] (n=4159) | 79.1 [76.7, 81.4] (n=1165) | 78.6 [75.7, 81.6] (n=765) | 70.7 [64.0, 77.4] (n=164) || Qwen3.5-9B | 83.5 [82.4, 84.6] (n=4159) | 54.0 [51.2, 56.8] (n=1165) | 49.8 [46.1, 53.3] (n=765) | 33.5 [26.2, 40.2] (n=164) || Always the last step | 61.5 [60.0, 63.0] (n=4159) | 32.2 [29.5, 34.8] (n=1165) | 25.6 [22.6, 28.8] (n=765) | 4.9 [1.8, 8.5] (n=164) || Always the first step | 3.6 [3.0, 4.1] (n=4159) | 16.4 [14.3, 18.5] (n=1165) | 13.5 [11.0, 15.9] (n=765) | 17.7 [12.2, 23.8] (n=164) |
### τ²-bench real failures
| Model | n | Step acc. | Agent acc. | Error-type macro-F1 | Joint ||---|---|---|---|---|---|| Culprit-9B (ours) | 50 | 18.0 [8.0, 28.0] | 64.0 [50.0, 76.0] | 6.1 [2.6, 11.4] | 10.0 [2.0, 20.0] || Qwen3.5-9B | 50 | 18.0 [8.0, 30.0] | 80.0 [68.0, 90.0] | 6.5 [1.1, 12.9] | 4.0 [0.0, 10.0] || Claude Opus 5.5 | 50 | 18.0 [8.0, 30.0] | 52.0 [38.0, 66.0] | 13.1 [5.9, 21.1] | 6.0 [0.0, 14.0] || GPT-6.2 Sol | 50 | 14.0 [6.0, 26.0] | 64.0 [50.0, 78.0] | 8.4 [3.3, 15.1] | 4.0 [0.0, 10.0] || Gemini 4 Neon | 50 | 12.0 [4.0, 22.0] | 62.0 [48.0, 74.0] | 5.9 [0.0, 11.7] | 2.0 [0.0, 6.0] || Always the last step | 50 | 0.0 [0.0, 0.0] | 20.0 [10.0, 32.0] | 1.5 [0.4, 3.1] | 0.0 [0.0, 0.0] || Always the first step | 50 | 0.0 [0.0, 0.0] | 80.0 [68.0, 90.0] | 1.5 [0.4, 3.1] | 0.0 [0.0, 0.0] |
Step accuracy by trace length (tokens):
| Model | 3k-6k | 6k-12k | >12k ||---|---|---|---|| Culprit-9B (ours) | 9.1 [0.0, 27.3] (n=11) | 21.9 [9.4, 37.5] (n=32) | 14.3 [0.0, 42.9] (n=7) || Qwen3.5-9B | 27.3 [0.0, 54.5] (n=11) | 15.6 [3.1, 28.1] (n=32) | 14.3 [0.0, 42.9] (n=7) || Claude Opus 5.5 | 9.1 [0.0, 27.3] (n=11) | 25.0 [9.4, 40.6] (n=32) | 0.0 [0.0, 0.0] (n=7) || GPT-6.2 Sol | 0.0 [0.0, 0.0] (n=11) | 21.9 [9.4, 37.5] (n=32) | 0.0 [0.0, 0.0] (n=7) || Gemini 4 Neon | 0.0 [0.0, 0.0] (n=11) | 18.8 [6.2, 34.4] (n=32) | 0.0 [0.0, 0.0] (n=7) || Always the last step | 0.0 [0.0, 0.0] (n=11) | 0.0 [0.0, 0.0] (n=32) | 0.0 [0.0, 0.0] (n=7) || Always the first step | 0.0 [0.0, 0.0] (n=11) | 0.0 [0.0, 0.0] (n=32) | 0.0 [0.0, 0.0] (n=7) |
On the real failures, agent accuracy says little: the support agent made 40 of the 50 decisive mistakes, so naming the support agent every time already scores 80%.
## What the results mean
- **Long logs are where a small tuned model helps most.** The base model's step accuracy falls from 83.5% on logs under 3k tokens to 33.5% over 12k. Culprit's falls from 93.0% to 70.7%, measured on all 6,253 Who&When Pro traces.- **Culprit never saw Who&When Pro.** Its training errors were injected into other agent systems and benchmarks. It still learned the shape of the task: one decisive step, named exactly.- **Injected errors are an easier test than real failures.** Who&When Pro, like Culprit's training data, plants one error into a run that would otherwise succeed. In the τ²-bench conversations, agents failed by themselves, and the decisive turn is often a quiet policy slip that only replay reveals. No model we tested, small or frontier, finds those turns reliably.
## Training
**Data.** The training traces come from systems we ran ourselves:
1. Five small agent systems: a single code agent, a two-agent math chat, a three-agent debate, an orchestrator–coder–checker team, and an author–critic–rewriter chain. They solve tasks from GSM8K, AQuA-RAT, CommonsenseQA, FinQA, MBPP and generated table questions.2. Customer-service conversations from the τ²-bench *train* split (airline, retail, telecom).
The agents are `Qwen/Qwen3.5-9B` and `Qwen/Qwen3.6-35B-A3B-FP8`. A trace is made as follows:
1. Start from a run that **succeeded**.2. Rewrite one step so that it holds one mistake of a chosen type.3. Let the system continue from that step.4. Keep the trace only if the run **then fails**.
The rewritten step is the label. This gave 913 training traces (745 from the five systems, 168 from τ²-bench) and 60 dev traces.
**Splits and leakage.** Train and dev are split by task. The receipt in [`receipts/dedupe_receipt.json`](https://github.com/ianlyoo/culprit/blob/main/receipts/dedupe_receipt.json) compares every training trace with both test sets three ways: SHA-256 of the task id, of the normalised task text, and of the normalised trace. All overlaps are 0. [`receipts/hashes.csv`](https://github.com/ianlyoo/culprit/blob/main/receipts/hashes.csv) lists every hash.
**Recipe.** LoRA rank 32, alpha 64, dropout 0.05, on every linear projection of the language model: attention (`q_proj`, `k_proj`, `v_proj`, `o_proj`), linear attention (`in_proj_qkv`, `in_proj_z`, `in_proj_a`, `in_proj_b`, `out_proj`) and MLP (`gate_proj`, `up_proj`, `down_proj`). 1,087 training examples (913 traces; those whose decisive step is 5 or later appear twice, because most generated failures happen early; 2 over 32,768 tokens skipped). 3 epochs, 204 optimizer steps of 16 examples, AdamW at learning rate 0.0001 with 3% warmup and cosine decay, bf16, loss on the answer tokens only, seed 0. One 96 GB GPU, 63 minutes. Checkpoints were saved every 40 steps and at each epoch; the one used (epoch 2) had the best step accuracy on our own dev split (95.0%, base model 80.0%). Who&When Pro played no part in choosing it.
## Evaluation sets
- **Who&When Pro, text split** ([Leoxx/whowhen_pro](https://huggingface.co/datasets/Leoxx/whowhen_pro), CC BY 4.0, revision `0bd196c`): 6,253 failed runs from 8 agent frameworks on 16 benchmarks, with injected errors. All of it is held out. The frontier models answered a 400-trace subset: 100 traces drawn from each length bucket, stratified by framework, with a fixed seed ([`eval/subsets/wwp_frontier400.txt`](https://github.com/ianlyoo/culprit/blob/main/eval/subsets/wwp_frontier400.txt), [`tools/make_subset.py`](https://github.com/ianlyoo/culprit/blob/main/tools/make_subset.py)). The draw counted lengths with a system prompt 3 tokens longer than the released one, so one trace of 2,999 tokens is scored as under 3k, and the length tables show 101 and 99 traces in the first two buckets.- **τ²-bench real failures** ([`data/eval/tau2_real_failures.jsonl`](https://github.com/ianlyoo/culprit/blob/main/data/eval/tau2_real_failures.jsonl), CC BY 4.0, new): 50 conversations where an open-weight agent failed by itself, with nothing injected. Each is labelled by counterfactual replay: the label is the earliest turn whose corrected version makes the conversation succeed in at least 75% of replays, while letting the same speaker write that turn again, with no fix, does not. See [`data/eval/DATASHEET.md`](https://github.com/ianlyoo/culprit/blob/main/data/eval/DATASHEET.md).
**Settings.** Qwen models run in vLLM 0.34 with greedy decoding. Culprit and the base model answer without thinking. The base model was not run with thinking on. Each frontier model received the same prompt text for every trace and answered once with the same JSON, with no retries:
| Model | Setting | Who&When Pro subset | Real failures ||---|---|---|---|| Claude Opus 5.5 (`claude-opus-5-5`) | extended thinking, high | 2026-12-02 | 2026-12-03 || GPT-6.2 Sol (`gpt-6.2-sol`) | reasoning effort xhigh | 2026-12-02 | 2026-12-03 || Gemini 4 Neon (`gemini-4-neon`) | thinking, high | 2026-12-02 | 2026-12-03 |
**Reproduce every table.** `python3 tools/build_wwp.py` renders Who&When Pro at the pinned revision. `bash tools/eval_tables.sh` then scores every saved prediction file in [`eval/preds/`](https://github.com/ianlyoo/culprit/tree/main/eval/preds/) (one command per table) and redraws the chart. [`vm/run_train_eval.sh`](https://github.com/ianlyoo/culprit/blob/main/vm/run_train_eval.sh) regenerates the predictions of the Qwen models.
## Limits
- **Small real-failure set.** 50 conversations from two τ²-bench domains (retail 41, airline 9), so its intervals are wide.- **Model-assigned error types on the real failures.** The decisive step is established by replay, but its error type was assigned by `Qwen/Qwen3.6-35B-A3B-FP8` and not checked by a person.- **Error types are the weak part.** On the 400-trace subset Culprit's error-type F1 is 27.9%: above the base model (13.1%), Claude Opus 5.5 (22.7%) and GPT-6.2 Sol (19.8%), but below Gemini 4 Neon (35.5%).- **Narrow training sources, English only.** The training logs come from five generated systems and τ²-bench. Logs from other frameworks, from GUI agents or in other languages may behave differently.- **A decisive step is one definition of blame.** Culprit names the earliest step whose fix would have saved the run. A run with several independent faults has no single answer.
## FAQ
**Which agent caused my multi-agent run to fail, and at which step?**Write the run as one line of `runs.jsonl` (the task, then each step with its agent name and text) and run [`attribute.py`](https://github.com/ianlyoo/culprit/blob/main/attribute.py). Culprit returns the agent, the step number and an error-type code for the decisive step: the earliest step whose fix would have let the run succeed.
**What is automated failure attribution for LLM agents?**It is identifying the agent and the step responsible for the failure of an LLM agent run, from its log. Who&When (Zhang et al., ICML 2025) introduced the task for multi-agent systems; Who&When Pro and TraceElephant are later benchmarks for it.
**How accurate is Culprit-9B compared with GPT, Claude and Gemini used as judges?**On the Who&When Pro subset (n=400), Culprit finds the decisive step in 81.2% of failed runs, against 75.2% for Gemini 4 Neon, 57.0% for GPT-6.2 Sol and 56.0% for Claude Opus 5.5, each given the same prompt. Gemini 4 Neon is better at naming the error type (macro-F1 35.5 against 27.9).
**Does it work on real agent failures, or only on injected errors?**Real failures are much harder, for every model. On 50 τ²-bench conversations where agents failed on their own, labelled by replay, every model scores 12–18% step accuracy and no difference between models is statistically clear.
**What log format does it take? Does it work with LangGraph, AutoGen or CrewAI traces?**Culprit reads a plain ordered list of steps, each with an agent name and its text, plus the task and, optionally, the final output. A trace from any framework works once written in that form; exports from specific frameworks or tracing tools have not been tested. Training logs came from five small agent systems and τ²-bench; Who&When Pro, used for evaluation, spans 8 agent frameworks.
**Was it trained on Who&When or Who&When Pro?**No. All of Who&When Pro was held out, and the checkpoint was chosen on a separate 60-trace dev split. [`receipts/dedupe_receipt.json`](https://github.com/ianlyoo/culprit/blob/main/receipts/dedupe_receipt.json) in the GitHub repository shows zero overlap with both test sets.
**Can I run it locally, and on what GPU?**Yes, on anything that serves Qwen3.5-9B, with vLLM (the default in [`attribute.py`](https://github.com/ianlyoo/culprit/blob/main/attribute.py)) or transformers with PEFT. The adapter file is 346 MB, and answers take a few dozen tokens with no thinking phase.
**How is it different from AgenTracer, an LLM judge, or tracing tools like LangSmith and Langfuse?**AgenTracer also trains a failure tracer (8B), but its weights are not released. A frontier LLM prompted as a judge is what the results table compares against. Tracing tools record and display runs; Culprit reads a recorded run and names the decisive step.
**Can I use it commercially?**The adapter and code are Apache-2.0, like the Qwen3.5-9B base model. The real-failure set is CC BY 4.0. Third-party sources and their licences are listed in [`NOTICE`](https://github.com/ianlyoo/culprit/blob/main/NOTICE) and [`data/SOURCES.md`](https://github.com/ianlyoo/culprit/blob/main/data/SOURCES.md).
## Citation
```bibtex@misc{culprit2026, title = {Culprit-9B: Open-Weight Failure Attribution for LLM Multi-Agent Systems}, author = {{Culprit authors}}, year = {2026}, howpublished = {\url{https://github.com/ianlyoo/culprit}}, note = {Model: \url{https://huggingface.co/ianlyoo/Culprit-9B}}}```
## Licence
The adapter and code are released under Apache-2.0. The real-failure set is released under CC BY 4.0. Third-party sources and their licences are listed in [`NOTICE`](https://github.com/ianlyoo/culprit/blob/main/NOTICE) and [`data/SOURCES.md`](https://github.com/ianlyoo/culprit/blob/main/data/SOURCES.md).
## Related work
- Who&When Pro ([arXiv:2607.09996](https://arxiv.org/abs/2607.09996)), the benchmark used here for evaluation, and its error taxonomy.- Who&When (Zhang et al., ICML 2025, [arXiv:2505.00212](https://arxiv.org/abs/2505.00212)), which introduced automated failure attribution for multi-agent systems.- Causal Agent Replay (Shah, [arXiv:2606.08275](https://arxiv.org/abs/2606.08275)), the fix-versus-resample replay that labels the real-failure set.- AgenTracer (ICLR 2026), which trains an 8B failure tracer with counterfactual replay; its weights are not released.- TraceElephant (ACL 2026, [github.com/TraceElephant/TraceElephant](https://github.com/TraceElephant/TraceElephant)), a benchmark for failure attribution in LLM-based multi-agent systems.- τ²-bench (Sierra Research, [github.com/sierra-research/tau2-bench](https://github.com/sierra-research/tau2-bench)), whose tasks and evaluator produce the real failures.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657{ "alora_invocation_tokens": null, "alpha_pattern": {}, "arrow_config": null, "astra_config": null, "auto_mapping": null, "base_model_name_or_path": "Qwen/Qwen3.5-9B", "bias": "none", "corda_config": null, "ensure_weight_tying": false, "eva_config": null, "exclude_modules": null, "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "kasa_config": null, "layer_replication": null, "layers_pattern": null, "layers_to_transform": null, "loftq_config": {}, "lora_alpha": 64, "lora_bias": false, "lora_dropout": 0.05, "lora_ga_config": null, "megatron_config": null, "megatron_core": "megatron.core", "modules_to_save": null, "monteclora_config": null, "peft_type": "LORA", "peft_version": "0.22.0", "qalora_group_size": 16, "r": 32, "rank_pattern": {}, "revision": null, "target_modules": [ "gate_proj", "down_proj", "q_proj", "in_proj_qkv", "in_proj_a", "k_proj", "up_proj", "v_proj", "in_proj_z", "o_proj", "out_proj", "in_proj_b" ], "target_parameters": null, "task_type": "CAUSAL_LM", "trainable_token_indices": null, "use_bdlora": null, "use_dora": false, "use_qalora": false, "use_rslora": false, "velora_config": null}123version https://git-lfs.github.com/spec/v1oid sha256:c420497c92ca1a4e133da253cb87cd8d7f9d0d9f101924f19a76d401fa345388size 346294736LICENSEAdded+201
NOTICEAdded+28
README.md+333
adapter_config.jsonAdded+57
adapter_model.safetensorsAdded+3
assets/step_accuracy.pngAdded
