[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-sierra-research--tau-bench":3,"similar-sierra-research--tau-bench":60},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":8,"readme_en":9,"readme_zh":10,"quickstart_zh":11,"use_case_zh":12,"hero_image_url":13,"owner_login":14,"owner_name":15,"owner_avatar_url":16,"owner_bio":17,"owner_company":18,"owner_location":18,"owner_email":18,"owner_twitter":19,"owner_website":20,"owner_url":21,"languages":22,"stars":27,"forks":28,"last_commit_at":29,"license":30,"difficulty_score":31,"env_os":32,"env_gpu":32,"env_ram":32,"env_deps":33,"category_tags":41,"github_topics":18,"view_count":44,"oss_zip_url":18,"oss_zip_packed_at":18,"status":45,"created_at":46,"updated_at":47,"faqs":48,"releases":59},3066,"sierra-research\u002Ftau-bench","tau-bench","Code and Data for Tau-Bench","tau-bench 是一个专注于评估 AI 智能体在真实场景中工具使用能力的基准测试平台。它通过模拟用户（由大语言模型扮演）与具备特定领域 API 工具及策略指南的智能体之间的动态对话，来检验智能体处理复杂任务的表现。目前主要涵盖航空和零售两大领域，旨在解决现有评测难以还原真实世界多轮交互、规则约束及工具调用挑战的问题。\n\n该工具特别适合 AI 研究人员和开发者使用，帮助他们量化不同模型（如 GPT-4o、Claude 系列等）在“工具调用”策略下的实际效能，并通过详细的排行榜对比各类算法（如 ReAct、Act）的优劣。其独特亮点在于构建了高仿真的交互环境，不仅要求智能体正确调用工具，还需严格遵守业务政策指南，从而更准确地反映落地应用中的可靠性。\n\n需要注意的是，当前仓库版本包含的任务数据已不再更新，官方建议有最新评测需求的用户转向其升级版 τ³-bench，后者新增了银行领域、语音评估模态，并修复了原有任务的问题。对于希望深入探索智能体在垂直行业落地能力的团队，tau-bench 系列提供了严谨的实验框架和丰富的数据支持。","# τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains\n\n**⚠️ WARNING: The tasks in this repo are not updated.** This repository contains outdated versions of the airline and retail tasks. Please use [τ³-bench](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench) for the latest fixed tasks and new domains.\n\n**❗News**: The [τ²-bench](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench) repository has been updated to [τ³-bench](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench), which includes a new `banking` domain, a `voice` evaluation modality, as well as fixes to the `airline` and `retail` domain tasks. Please navigate to the [τ³-bench repository](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench) to use the latest version of this benchmark.\n\n---\n\nWe propose $\\tau$-bench, a benchmark emulating dynamic conversations between a user (simulated by language models) and a language agent provided with domain-specific API tools and policy guidelines.\n\n## Leaderboard\n\n### Airline\n\n| Strategy       | Pass^1 | Pass^2 | Pass^3 | Pass^4 |\n| -------------- | ------ | ------ | ------ | ------ |\n| [TC (claude-3-5-sonnet-20241022)](https:\u002F\u002Fwww.anthropic.com\u002Fnews\u002F3-5-models-and-computer-use)      | **0.460**     | **0.326**     | **0.263**     | **0.225**     |\n| [TC (gpt-4o)](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)     | 0.420     | 0.273     | 0.220     | 0.200     |\n| [TC (claude-3-5-sonnet-20240620)](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fbuild-with-claude\u002Ftool-use)      | 0.360     | 0.224     | 0.169     | 0.139     |\n| [TC (mistral-large-2407)](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Ffunction_calling\u002F)     | ??     | ??     | ??     | ??     |\n| [TC (gpt-4o-mini)](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)     | 0.225     | 0.140     | 0.110     | 0.100     |\n| [Act](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629) (gpt-4o)     | 0.365 | 0.217 | 0.160 | 0.140     |\n| [ReAct](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629) (gpt-4o)     | 0.325 | 0.233 | 0.185 | 0.160     |\n\n### Retail\n\n| Strategy       | Pass^1 | Pass^2 | Pass^3 | Pass^4 |\n| -------------- | ------ | ------ | ------ | ------ |\n| [TC (claude-3-5-sonnet-20241022)](https:\u002F\u002Fwww.anthropic.com\u002Fnews\u002F3-5-models-and-computer-use)      | **0.692**     | **0.576**     | **0.509**     | **0.462**     |\n| [TC (gpt-4o)](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)     | 0.604     | 0.491     | 0.430     | 0.383     |\n| [TC (claude-3-5-sonnet-20240620)](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fbuild-with-claude\u002Ftool-use)      | 0.626     | 0.506     | 0.435     | 0.387     |\n| [TC (mistral-large-2407)](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Ffunction_calling\u002F)     | ??     | ??     | ??     | ??     |\n| [TC (gpt-4o-mini)](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)     | ??     | ??     | ??     | ??     |\n| [Act](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629) (gpt-4o)     | ??     | ??     | ??     | ??     |\n| [ReAct](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629) (gpt-4o)     | ??     | ??     | ??     | ??     |\n\n*TC = `tool-calling` strategy (the function-calling strategy reported in the paper)\n\n## Setup\n\n1. Clone this repository:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau-bench && cd .\u002Ftau-bench\n```\n\n2. Install from source (which also installs required packages):\n\n```bash\npip install -e .\n```\n\n3. Set up your OpenAI \u002F Anthropic \u002F Google \u002F Mistral \u002F AnyScale API keys as environment variables.\n\n```bash\nOPENAI_API_KEY=...\nANTHROPIC_API_KEY=...\nGOOGLE_API_KEY=...\nMISTRAL_API_KEY=...\n```\n\n## Run\n\nRun a tool-calling agent on the τ-retail environment:\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --user-model gpt-4o --user-model-provider openai --user-strategy llm --max-concurrency 10\n```\n\nSet max concurrency according to your API limit(s).\n\nTo run specific tasks, use the `--task-ids` flag. For example:\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --user-model gpt-4o --user-model-provider openai --user-strategy llm --max-concurrency 10 --task-ids 2 4 6\n```\n\nThis command will run only the tasks with IDs 2, 4, and 6.\n\n## User simulators\n\nBy default, we use `gpt-4o` as the user simulator with strategy `llm`. You can use other models by setting the `--user-model` flag, or other strategies by setting the `--user-strategy` flag. For example, run a tool-calling agent with a claude user simulator:\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --max-concurrency 10 --user-model claude-3-5-sonnet-20240620 --user-model-provider anthropic --user-strategy llm\n```\n\nOther strategies:\n\nTo run `react` user simulator:\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --max-concurrency 10 --user-model gpt-4o --user-model-provider openai --user-strategy react\n```\n\nExample of a `react` user response:\n\n```md\nThought:\nI should provide my name and zip code as I wasn't given an email address to use.\n\nUser Response:\nSure, my name is Yusuf Rossi, and my zip code is 19122.\n```\n\nTo run `verify` user simulator:\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --max-concurrency 10 --user-model gpt-4o --user-model-provider openai --user-strategy verify\n```\n\nThis strategy uses a subsequent LLM verification step to check if the user simulator's response is satisfactory. If not, the user simulator will be prompted to generate a new response.\n\nTo run `reflection` user simulator:\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --max-concurrency 10 --user-model gpt-4o --user-model-provider openai --user-strategy reflection\n```\n\nThis strategy uses a subsequent LLM verification step to check if the user simulator's response is satisfactory. If not, the user simulator will be prompted to reflect on its response and generate a new response.\n\n## Auto error identification\n\nOften times, it is difficult and time consuming to manually identify specific error locations in trajectories as they can be long and the constraints can be complex. We have provided an auto error identification tool that can do the following:\n\n1. Fault assignment: determine the entity that is responsible for the fault (user, agent, environment)\n2. Fault type classification: classify the type of fault (goal_partially_completed, used_wrong_tool, used_wrong_tool_argument, took_unintended_action)\n\nBoth of the labels are accompanied with a description.\n\nTo run the auto error identification, run:\n\n```bash\npython auto_error_identification.py --env \u003Cairline\u002Fretail> --platform openai --results-path \u003Cthe path to your results file here> --max-concurrency 16 --output-path test-auto-error-identification --max-num-failed-results 10\n```\n\nPlease note that this feature utilizes an LLM, which may lead to inaccurate error identifications.\n\n*Notice: If an error is raised due to the structure of your results file, you may have to rerun the benchmark to produce a new results file. We have recently [rewritten](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau-bench\u002Fcommit\u002F043b544371757ebb3762b3d02a6675dfe0c41798) the benchmark to be more type-safe and extensible.\n\n## Historical trajectories\n\nτ-bench might be expensive to run. We have provided a set of historical trajectories for the airline and retail environments in `.\u002Fhistorical_trajectories`.\n\nIf you would like to contribute your historical trajectories to this benchmark, please submit a PR!\n\n## License\n\nSee `.\u002FLICENSE`.\n\n## Contact\n\nPlease submit issues or pull requests if you find problems with the benchmark.\n\n## Citation\n\n```bibtex\n@misc{yao2024tau,\n      title={$\\tau$-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains}, \n      author={Shunyu Yao and Noah Shinn and Pedram Razavi and Karthik Narasimhan},\n      year={2024},\n      eprint={2406.12045},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2406.12045}, \n}\n@misc{barres2025tau2,\n      title={$\\tau^2$-Bench: Evaluating Conversational Agents in a Dual-Control Environment}, \n      author={Victor Barres and Honghua Dong and Soham Ray and Xujie Si and Karthik Narasimhan},\n      year={2025},\n      eprint={2506.07982},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2506.07982}, \n}\n```\n","# τ-bench：面向真实世界领域的工具-智能体-用户交互基准测试\n\n**⚠️ 注意：本仓库中的任务未更新。** 该仓库包含过时的航空和零售任务版本。请使用 [τ³-bench](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench) 获取最新修复的任务及新增领域。\n\n**❗新闻**：[τ²-bench](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench) 仓库已更新为 [τ³-bench](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench)，其中新增了 `banking` 领域、`voice` 评估模态，并对 `airline` 和 `retail` 领域的任务进行了修复。请前往 [τ³-bench 仓库](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench) 使用该基准测试的最新版本。\n\n---\n\n我们提出了 τ-bench，这是一个模拟由语言模型模拟的用户与配备领域特定 API 工具和策略指南的语言智能体之间动态对话的基准测试。\n\n## 排行榜\n\n### 航空\n\n| 策略       | Pass^1 | Pass^2 | Pass^3 | Pass^4 |\n| -------------- | ------ | ------ | ------ | ------ |\n| [TC (claude-3-5-sonnet-20241022)](https:\u002F\u002Fwww.anthropic.com\u002Fnews\u002F3-5-models-and-computer-use)      | **0.460**     | **0.326**     | **0.263**     | **0.225**     |\n| [TC (gpt-4o)](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)     | 0.420     | 0.273     | 0.220     | 0.200     |\n| [TC (claude-3-5-sonnet-20240620)](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fbuild-with-claude\u002Ftool-use)      | 0.360     | 0.224     | 0.169     | 0.139     |\n| [TC (mistral-large-2407)](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Ffunction_calling\u002F)     | ??     | ??     | ??     | ??     |\n| [TC (gpt-4o-mini)](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)     | 0.225     | 0.140     | 0.110     | 0.100     |\n| [Act](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629) (gpt-4o)     | 0.365 | 0.217 | 0.160 | 0.140     |\n| [ReAct](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629) (gpt-4o)     | 0.325 | 0.233 | 0.185 | 0.160     |\n\n### 零售\n\n| 策略       | Pass^1 | Pass^2 | Pass^3 | Pass^4 |\n| -------------- | ------ | ------ | ------ | ------ |\n| [TC (claude-3-5-sonnet-20241022)](https:\u002F\u002Fwww.anthropic.com\u002Fnews\u002F3-5-models-and-computer-use)      | **0.692**     | **0.576**     | **0.509**     | **0.462**     |\n| [TC (gpt-4o)](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)     | 0.604     | 0.491     | 0.430     | 0.383     |\n| [TC (claude-3-5-sonnet-20240620)](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fbuild-with-claude\u002Ftool-use)      | 0.626     | 0.506     | 0.435     | 0.387     |\n| [TC (mistral-large-2407)](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Ffunction_calling\u002F)     | ??     | ??     | ??     | ??     |\n| [TC (gpt-4o-mini)](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ffunction-calling)     | ??     | ??     | ??     | ??     |\n| [Act](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629) (gpt-4o)     | ??     | ??     | ??     | ??     |\n| [ReAct](https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629) (gpt-4o)     | ??     | ??     | ??     | ??     |\n\n*TC = `tool-calling` 策略（论文中报告的功能调用策略）\n\n## 设置\n\n1. 克隆此仓库：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau-bench && cd .\u002Ftau-bench\n```\n\n2. 从源代码安装（同时安装所需依赖）：\n\n```bash\npip install -e .\n```\n\n3. 将您的 OpenAI \u002F Anthropic \u002F Google \u002F Mistral \u002F AnyScale API 密钥设置为环境变量。\n\n```bash\nOPENAI_API_KEY=...\nANTHROPIC_API_KEY=...\nGOOGLE_API_KEY=...\nMISTRAL_API_KEY=...\n```\n\n## 运行\n\n在 τ-retail 环境上运行一个工具调用智能体：\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --user-model gpt-4o --user-model-provider openai --user-strategy llm --max-concurrency 10\n```\n\n请根据您的 API 限制设置最大并发数。\n\n要运行特定任务，可以使用 `--task-ids` 标志。例如：\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --user-model gpt-4o --user-model-provider openai --user-strategy llm --max-concurrency 10 --task-ids 2 4 6\n```\n\n此命令将仅运行 ID 为 2、4 和 6 的任务。\n\n## 用户模拟器\n\n默认情况下，我们使用 `gpt-4o` 作为用户模拟器，策略为 `llm`。您可以通过设置 `--user-model` 标志来使用其他模型，或通过设置 `--user-strategy` 标志来使用其他策略。例如，使用 claude 用户模拟器运行工具调用智能体：\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --max-concurrency 10 --user-model claude-3-5-sonnet-20240620 --user-model-provider anthropic --user-strategy llm\n```\n\n其他策略：\n\n要运行 `react` 用户模拟器：\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --max-concurrency 10 --user-model gpt-4o --user-model-provider openai --user-strategy react\n```\n\n`react` 用户响应示例：\n\n```md\nThought:\n我应该提供我的姓名和邮政编码，因为我没有被给予电子邮件地址。\n\nUser Response:\n当然，我叫尤素夫·罗西，我的邮政编码是 19122。\n```\n\n要运行 `verify` 用户模拟器：\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --max-concurrency 10 --user-model gpt-4o --user-model-provider openai --user-strategy verify\n```\n\n该策略会使用后续的 LLM 验证步骤来检查用户模拟器的响应是否令人满意。如果不满意，用户模拟器将被提示生成新的响应。\n\n要运行 `reflection` 用户模拟器：\n\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --max-concurrency 10 --user-model gpt-4o --user-model-provider openai --user-strategy reflection\n```\n\n该策略会使用后续的 LLM 验证步骤来检查用户模拟器的响应是否令人满意。如果不满意，用户模拟器将被提示反思其响应并生成新的响应。\n\n## 自动错误识别\n\n通常情况下，手动识别轨迹中的具体错误位置既困难又耗时，因为轨迹可能很长，约束条件也可能非常复杂。为此，我们提供了一个自动错误识别工具，它可以完成以下任务：\n\n1. 故障归属：确定导致故障的责任方（用户、智能体、环境）。\n2. 故障类型分类：对故障类型进行分类（目标部分完成、使用了错误工具、使用了错误工具参数、执行了非预期动作）。\n\n这两个标签均附有描述。\n\n要运行自动错误识别，请执行以下命令：\n\n```bash\npython auto_error_identification.py --env \u003Cairline\u002Fretail> --platform openai --results-path \u003C此处填写您的结果文件路径> --max-concurrency 16 --output-path test-auto-error-identification --max-num-failed-results 10\n```\n\n请注意，此功能依赖于大语言模型，因此可能会出现不准确的错误识别结果。\n\n*注意：如果由于结果文件的结构问题引发错误，您可能需要重新运行基准测试以生成新的结果文件。我们最近对基准测试进行了[重写](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau-bench\u002Fcommit\u002F043b544371757ebb3762b3d02a6675dfe0c41798)，使其更具类型安全性并易于扩展。\n\n## 历史轨迹\n\n运行 τ-bench 可能成本较高。为此，我们在 `.\u002Fhistorical_trajectories` 中提供了航空和零售环境的历史轨迹集。\n\n如果您希望为本基准测试贡献自己的历史轨迹，请提交一个 Pull Request！\n\n## 许可证\n\n请参阅 `.\u002FLICENSE` 文件。\n\n## 联系方式\n\n如果您在使用基准测试时遇到任何问题，请提交 Issue 或 Pull Request。\n\n## 引用\n\n```bibtex\n@misc{yao2024tau,\n      title={$\\tau$-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains}, \n      author={Shunyu Yao and Noah Shinn and Pedram Razavi and Karthik Narasimhan},\n      year={2024},\n      eprint={2406.12045},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2406.12045}, \n}\n@misc{barres2025tau2,\n      title={$\\tau^2$-Bench: Evaluating Conversational Agents in a Dual-Control Environment}, \n      author={Victor Barres and Honghua Dong and Soham Ray and Xujie Si and Karthik Narasimhan},\n      year={2025},\n      eprint={2506.07982},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2506.07982}, \n}\n```","# τ-bench 快速上手指南\n\n> **⚠️ 重要提示**：本仓库（tau-bench）中的任务版本已过时。官方推荐使用更新后的 **[τ³-bench](https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau2-bench)**，该版本包含新的“银行”领域、“语音”评估模式，并修复了“航空”和“零售”领域的任务。以下指南仅针对当前仓库的历史版本进行说明，新开发请务必前往 τ³-bench 仓库。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n- **操作系统**：Linux 或 macOS（Windows 用户建议使用 WSL2）\n- **Python 版本**：Python 3.8 或更高版本\n- **API 密钥**：您需要拥有以下至少一个服务提供商的 API 密钥：\n  - OpenAI (`OPENAI_API_KEY`)\n  - Anthropic (`ANTHROPIC_API_KEY`)\n  - Google (`GOOGLE_API_KEY`)\n  - Mistral (`MISTRAL_API_KEY`)\n  - AnyScale\n\n## 安装步骤\n\n1. **克隆仓库**\n   将项目代码克隆到本地并进入目录：\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau-bench && cd .\u002Ftau-bench\n   ```\n\n2. **安装依赖**\n   使用 pip 从源码安装工具及其所需依赖包：\n   ```bash\n   pip install -e .\n   ```\n   *注：国内用户若下载缓慢，可添加 `-i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple` 参数使用清华镜像源。*\n\n3. **配置环境变量**\n   设置您的 API 密钥。您可以在终端临时导出，或写入 `.bashrc`\u002F`.zshrc` 文件中：\n   ```bash\n   export OPENAI_API_KEY=your_openai_key_here\n   export ANTHROPIC_API_KEY=your_anthropic_key_here\n   # 根据实际使用的模型提供商设置对应的 KEY\n   ```\n\n## 基本使用\n\n以下命令展示了如何在 **零售 (retail)** 环境中运行一个基于 **工具调用 (tool-calling)** 策略的 Agent，使用 `gpt-4o` 作为代理模型和用户模拟器。\n\n**运行完整测试：**\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --user-model gpt-4o --user-model-provider openai --user-strategy llm --max-concurrency 10\n```\n\n**运行指定任务：**\n如果您只想测试特定的任务 ID（例如 ID 为 2, 4, 6 的任务），请使用 `--task-ids` 参数：\n```bash\npython run.py --agent-strategy tool-calling --env retail --model gpt-4o --model-provider openai --user-model gpt-4o --user-model-provider openai --user-strategy llm --max-concurrency 10 --task-ids 2 4 6\n```\n\n**参数说明：**\n- `--max-concurrency`：请根据您的 API 速率限制调整并发数。\n- `--user-model` 和 `--user-strategy`：用于配置模拟用户的模型和行为策略（默认为 `llm`，也支持 `react`, `verify`, `reflection` 等）。","某大型电商平台的 AI 团队正在开发新一代智能客服代理，该代理需直接调用订单、库存和物流 API 来处理用户复杂的退换货请求。\n\n### 没有 tau-bench 时\n- **评估维度单一**：团队仅能测试模型是否成功调用 API，无法验证其在多轮对话中是否严格遵守“仅限 7 天内可退”等业务策略。\n- **缺乏真实交互模拟**：人工构造的测试用例过于理想化，难以覆盖用户突然改变需求或提供模糊信息等动态场景。\n- **策略合规性黑盒**：模型可能在成功执行操作的同时违反公司政策（如错误批准超额赔偿），这种风险在上线前难以被量化发现。\n- **迭代效率低下**：每次调整 Prompt 或更换基座模型后，缺乏统一的基准测试集来快速对比性能提升幅度。\n\n### 使用 tau-bench 后\n- **全链路策略验证**：利用 tau-bench 内置的零售领域任务，不仅能测通工具调用，还能精准评估模型在复杂约束下的策略遵循率（Pass@k 指标）。\n- **动态用户模拟**：通过 tau-bench 提供的 LLM 模拟用户，自动生成包含打断、反问和情绪变化的逼真对话流，暴露出模型在长上下文中的逻辑漏洞。\n- **量化合规风险**：借助基准测试中的明确评分标准，团队能直观看到模型在“错误退款”等关键违规项上的具体失败案例，从而针对性优化。\n- **科学选型依据**：基于 tau-bench 排行榜数据，团队快速验证了 Claude 3.5 Sonnet 在零售场景下优于 GPT-4o，为生产环境模型选型提供了坚实的数据支撑。\n\ntau-bench 将原本模糊的“智能体好不好用”转化为可量化的策略执行分数，帮助团队在安全合规的前提下加速 AI 代理落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsierra-research_tau-bench_1998a728.png","sierra-research","Sierra Research","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fsierra-research_9deb1f4b.png","",null,"SierraPlatform","https:\u002F\u002Fsierra.ai","https:\u002F\u002Fgithub.com\u002Fsierra-research",[23],{"name":24,"color":25,"percentage":26},"Python","#3572A5",100,1156,188,"2026-04-03T22:49:58","MIT",2,"未说明",{"notes":34,"python":32,"dependencies":35},"该工具主要通过 API 调用大模型（如 OpenAI, Anthropic, Google, Mistral 等），无需本地部署大型模型或 GPU。运行前需设置对应服务商的 API Key 为环境变量。建议使用 `pip install -e .` 从源码安装以自动获取依赖。注意：此仓库版本已过时，官方推荐使用 τ³-bench 获取最新任务和领域支持。",[36,37,38,39,40],"openai","anthropic","google-generativeai","mistralai","anyscale",[42,43],"Agent","其他",3,"ready","2026-03-27T02:49:30.150509","2026-04-11T18:33:33.039476",[49,54],{"id":50,"question_zh":51,"answer_zh":52,"source_url":53},14118,"通过 pip 或 setup.py 安装 tau_bench 后，为什么无法找到或运行 run.py 文件？","默认安装仅包含 tau_bench 目录，根目录下的 run.py 不会被安装。若需将其作为库使用并调用运行逻辑，建议将 run.py 的核心逻辑移至 tau_bench 包内部，使 `run` 方法成为已安装库的一部分。目前维护者已接受该改进方案并合并了相关 PR（#21），更新版本后即可直接使用。","https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau-bench\u002Fissues\u002F18",{"id":55,"question_zh":56,"answer_zh":57,"source_url":58},14119,"tau_bench 支持哪些 Python 版本？","该项目需要 Python 3.10 或更高版本（Python 3.10+）。","https:\u002F\u002Fgithub.com\u002Fsierra-research\u002Ftau-bench\u002Fissues\u002F20",[],[61,72,80,89,97,106],{"id":62,"name":63,"github_repo":64,"description_zh":65,"stars":66,"difficulty_score":44,"last_commit_at":67,"category_tags":68,"status":45},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,"2026-04-06T06:32:30",[42,69,70,71],"开发框架","图像","数据工具",{"id":73,"name":74,"github_repo":75,"description_zh":76,"stars":77,"difficulty_score":44,"last_commit_at":78,"category_tags":79,"status":45},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[69,70,42],{"id":81,"name":82,"github_repo":83,"description_zh":84,"stars":85,"difficulty_score":31,"last_commit_at":86,"category_tags":87,"status":45},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",150037,"2026-04-10T23:33:47",[69,42,88],"语言模型",{"id":90,"name":91,"github_repo":92,"description_zh":93,"stars":94,"difficulty_score":31,"last_commit_at":95,"category_tags":96,"status":45},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[69,70,42],{"id":98,"name":99,"github_repo":100,"description_zh":101,"stars":102,"difficulty_score":31,"last_commit_at":103,"category_tags":104,"status":45},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[105,42,70,69],"插件",{"id":107,"name":108,"github_repo":109,"description_zh":110,"stars":111,"difficulty_score":44,"last_commit_at":112,"category_tags":113,"status":45},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[88,70,42,69]]