SWE-QA-Pro-SFT-Trajectories
收藏资源简介:
# SWE-QA-Pro SFT Trajectories [**💻 GitHub**](https://github.com/TIGER-AI-Lab/SWE-QA-Pro) | [**📖 Paper**](https://arxiv.org/abs/2603.16124) | [**🤗 SWE-QA-Pro**](https://hf.co/collections/TIGER-Lab/swe-qa-pro) ## Introduction SWE-QA-Pro SFT Trajectories is a set of **agentic tool-use trajectories** for **repository-level question answering**, used as the supervised fine-tuning (SFT) data in the SWE-QA-Pro training recipe. Each item is a multi-turn trajectory in which an agent answers a repository-grounded question by **exploring the codebase with read-only tools** rather than relying on memorized knowledge. The trajectories are generated by **Claude Sonnet 4.5** and stored in the `hermes` tool-calling format, ready to fine-tune open models (we fine-tune Qwen3-8B with [ms-swift](https://github.com/modelscope/ms-swift)). The agent operates in a strictly read-only environment with three tools: - `semantic_search`: search for terms across a file or directory tree - `view_codebase`: view files and directories with line ranges and outlines - `execute_readonly_command`: run allowlisted read-only shell commands (`ls` / `grep` / `find` / `cat` / ...) At each turn the agent plans, calls a tool, reads the observation, and finally emits its answer inside a `<finish>...</finish>` block. --- ## Dataset Format - **File**: `train.jsonl` (1,000 trajectories) - **Format**: one JSON object per line, in the `hermes` tool-calling format, with two fields: - `tools`: the tool definitions available to the agent (OpenAI-style function schemas for `view_codebase`, `semantic_search`, `execute_readonly_command`) - `messages`: the multi-turn conversation, a list of `{"role", "content"}` messages with roles: - `system`: the agent instructions and output protocol - `user`: the repository-grounded question - `assistant`: the agent's step-by-step planning - `tool_call`: a tool invocation (JSON with `name` and `arguments`) - `tool_response`: the observation returned by the tool - the final `assistant` message holds the answer inside `<finish>...</finish>` --- ## Usage These trajectories are the Stage 1 (SFT) data of the SWE-QA-Pro recipe. See the [GitHub repository](https://github.com/TIGER-AI-Lab/SWE-QA-Pro) (`train/SFT/`) for the full training setup. ```python from datasets import load_dataset ds = load_dataset("TIGER-Lab/SWE-QA-Pro-SFT-Trajectories", split="train") print(ds[0]["tools"]) print(ds[0]["messages"]) ``` --- ## Citation ```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}, } ```



