今天我们准备训练一个agent, 

1、数据准备 利用claude-4.5进行轨迹收集,gt 就是role assistant部分,这部分有special token 

<think_tool> <tool_call> ,

messages: [
  {role: "system", content: "系统提示词..."},      ← 输入上下文
  {role: "user", content: "播放Enigma..."},        ← 输入上下文
  {role: "assistant", content: "<think>...</think>\n<tool_call>...</tool_call>"},  ← ✅ GT
  {role: "tool", content: "{搜索结果...}"},        ← 输入上下文
  {role: "assistant", content: "<think>...</think>\n<tool_call>...</tool_call>"},  ← ✅ GT
  {role: "tool", content: "{音乐结果...}"},        ← 输入上下文
  {role: "assistant", content: "<think>...</think>\n<tool_call>...</tool_call>"}   ← ✅ GT
]

训练目标: 模型学习根据上下文(system + user + tool 返回)生成正确的 assistant 回复,包括推理思考和工具调用决策。这是一个多步推理 + 工具调用的 SFT 任务。

Logo

中国智能体开发者社区,聚焦智能体与大模型开发,提供前沿资讯、实用工具链、开源项目及行业案例。通过技术沙龙、开发者大赛等活动,促进经验交流与协作,助力开发者快速构建创新智能应用。

更多推荐