SWE-QA-Pro-SFT-Trajectories
收藏资源简介:
SWE-QA-Pro SFT Trajectories是一个专为监督微调设计的代码库级别问答智能体工具使用轨迹数据集。它包含1000条由Claude Sonnet 4.5生成的多轮交互轨迹,模拟智能体在严格只读环境下通过工具探索代码库以回答问题的过程。智能体可使用的工具包括:在文件或目录树中搜索术语的`semantic_search`、查看带行范围和轮廓的文件与目录的`view_codebase`,以及运行允许列表内只读shell命令(如`ls`、`grep`、`find`、`cat`等)的`execute_readonly_command`。每条轨迹以`hermes`工具调用格式存储,每个JSON对象包含两个字段:`tools`(可用工具的定义,采用OpenAI风格函数模式)和`messages`(多轮对话消息列表,包含`system`、`user`、`assistant`、`tool_call`、`tool_response`等角色,最终答案位于`<finish>...</finish>`块内)。该数据集适用于训练模型进行代码库级别的问答任务,是SWE-QA-Pro训练方案中第一阶段(SFT)的核心数据。
SWE-QA-Pro SFT Trajectories is a codebase-level question answering agent tool-use trajectory dataset tailored for supervised fine-tuning. It contains 1,000 multi-turn interaction trajectories generated by Claude Sonnet 4.5, which simulate the process where agents explore codebases via tools to answer questions within a strictly read-only environment. The tools available to the agent include: `semantic_search` for searching target terms across files or directory trees, `view_codebase` for inspecting files and directories with specified line ranges and structural outlines, and `execute_readonly_command` for running allowlisted read-only shell commands such as `ls`, `grep`, `find`, `cat`, and other similar commands. Each trajectory is stored in the `hermes` tool calling format, with each JSON object comprising two fields: `tools` (definitions of available tools following the OpenAI-style function schema) and `messages` (a list of multi-turn conversational messages with roles including `system`, `user`, `assistant`, `tool_call`, and `tool_response`, where the final answer is enclosed within the `<finish>...</finish>` block). This dataset is suitable for training models to perform codebase-level question answering tasks, and serves as the core data for the first stage (SFT) of the SWE-QA-Pro training pipeline.
数据集名称
SWE-QA-Pro SFT Trajectories
数据集简介
该数据集是一组用于仓库级问答的智能体工具使用轨迹,作为SWE-QA-Pro训练流程中的监督微调(SFT)数据。每条数据是一个多轮交互轨迹,智能体通过只读工具探索代码库来回答仓库相关的问题,而非依赖记忆化知识。轨迹由Claude Sonnet 4.5生成,并采用hermes工具调用格式存储,可用于微调开放模型(例如使用ms-swift微调Qwen3-8B)。
智能体在一个严格的只读环境中运行,使用以下三种工具:
semantic_search:在文件或目录树中搜索术语view_codebase:查看文件和目录,支持行范围和大纲execute_readonly_command:运行允许的只读Shell命令(如ls、grep、find、cat等)
在每一轮交互中,智能体进行规划、调用工具、读取观察结果,并最终在<finish>...</finish>块内输出答案。
数据集格式
- 文件:
train.jsonl(包含1,000条轨迹) - 格式:每行一个JSON对象,采用
hermes工具调用格式,包含两个字段:tools:智能体可用的工具定义(OpenAI风格的函数架构,包含view_codebase、semantic_search、execute_readonly_command)messages:多轮对话,是一个{"role", "content"}消息列表,角色包括:system:智能体指令和输出协议user:仓库相关的问题assistant:智能体的逐步规划tool_call:工具调用(包含name和arguments的JSON)tool_response:工具返回的观察结果- 最终的
assistant消息在<finish>...</finish>内包含答案
数据集大小
- 条目数量:1,000条轨迹
数据集语言
- 英语(en)
数据集许可
- MIT许可
任务类别
- 问答(question-answering)
标签
- SWE
- QA
- Agent
- Trajectories
用途
这些轨迹是SWE-QA-Pro流程中的第一阶段(SFT)数据。完整的训练设置请参见GitHub仓库中的train/SFT/目录。
引用
bibtex @article{cai2026sweqapro, title={SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understanding}, author={Songcheng Cai and Zhiheng Lyu and Yuansheng Ni and Xiangchao Chen and Baichuan Zhou and Shenzhe Zhu and Yi Lu and Haozhe Wang and Chi Ruan and Benjamin Schneider and Weixu Zhang and Xiang Li and Andy Zheng and Yuyu Zhang and Ping Nie and Wenhu Chen}, journal={arXiv preprint arXiv:2603.16124}, year={2026}, }




