For intelligent agents, reward design is more than a reinforcement learning detail. It defines what kind of behavior the system is encouraged to repeat. If the reward only measures whether the final answer looks correct, the agent may learn shortcuts: unsupported claims, unnecessary tool calls, brittle reasoning, or confident answers when it should refuse.
A more useful reward signal decomposes behavior:
This is still a simplification, but it points in the right direction. The agent should be rewarded for answering correctly, but also for using evidence, selecting appropriate tools, and staying within allowed actions. It should be penalized for unsupported claims, fake citations, unsafe operations, or failure to recover from missing context.
For RAG and tool-using agents, one useful distinction is between outcome reward and process reward. Outcome reward asks whether the final answer is right. Process reward asks whether the path was controlled:
- Did the agent retrieve the right source?
- Did it quote or cite evidence faithfully?
- Did it call a tool only when the tool was needed?
- Did it stop when the evidence was insufficient?
- Did it recover from failed retrieval or invalid URLs?
This matters because a deployed agent is not a single prediction. It is a workflow. The harness around the model should record traces, score intermediate behavior, and use that signal to improve routing, prompts, retrieval, and evaluation.
In practice, the reward model should be paired with a harness. The harness supplies constraints and observations; the reward model turns those traces into feedback. This combination is what makes agent improvement more reliable than simply asking the model to "be careful."
对智能体而言,奖励设计不只是强化学习的一个细节,它决定系统会被鼓励重复哪些行为。如果奖励仅衡量最终答案是否看起来正确,智能体就可能学会走捷径:无依据断言、多余工具调用、脆弱推理,或在应当拒答时自信作答。
更有用的奖励信号可以分解行为:
这仍是一种简化,却指出了值得探索的方向。除了正确回答,智能体还应因使用证据、选择恰当工具和遵守动作权限而获得奖励;无依据断言、伪造引用、不安全操作,以及无法从上下文缺失中恢复,则应受到惩罚。
对于 RAG 与工具型智能体,一个有用的区分是结果奖励与过程奖励。前者关注最终答案是否正确,后者关注路径是否受控:
- 是否检索到了正确来源?
- 是否忠实引用了证据?
- 是否只在确有需要时调用工具?
- 证据不足时是否停止?
- 是否能从检索失败或无效 URL 中恢复?
部署后的智能体不是一次孤立预测,而是一条工作流。模型外围的 Harness 应记录轨迹、评价中间行为,并用这些信号改善路由、提示词、检索与评估。
实践中,奖励模型应与 Harness 配合:Harness 提供约束和可观测信息,奖励模型将轨迹转为反馈。这比单纯要求模型“多加小心”,更有利于可靠地改进智能体。