Skip to main content
A reward signal defines the goal in a reinforcement learning problem. Typically this is a single number (scalar feedback) that tells an agent how good or bad an outcome is in an immediate sense. In ORS, rewards are obtained by executing tools and are returned as part of a ToolOutput. They can be used for training in reinforcement learning, or for agentic evaluation - for example, binary reward can be used for computing accuracy.

What is a Reward?

A reward is a numeric signal (typically a float) that indicates how good an outcome was:
Characteristics:
  • Optional field (can be null)
  • Often normalised in the range [-1, 1] or [0, 1]
  • Returned with every tool call
  • Accumulated over an episode

Reward Examples

Positive reward (success):
Zero reward (neutral):
Negative reward (penalty):

Reward Design Patterns

Pattern 1: Sparse Rewards

Only reward at episode end:
All intermediate steps:
Pros:
  • Simple to implement
  • Clear success/failure signal
  • Easy to understand
Cons:
  • Hard for agent to learn (delayed feedback)
  • Credit assignment problem
  • Slow learning
Best for: Simple tasks, short-horizon tasks

Pattern 2: Dense Rewards

Reward every meaningful action:
Pros:
  • Faster learning
  • Guides agent toward solution
  • Better credit assignment
Cons:
  • Harder to design
  • Can bias agent toward suboptimal paths
  • Risk of reward hacking
Best for: Complex tasks, long-horizon episodes

Pattern 3: Shaped Rewards

Reward based on distance to goal:
Pros:
  • Strong learning signal
  • Guides exploration
  • Accelerates training
Cons:
  • Requires domain knowledge
  • Can create reward hacking opportunities
  • Complex to implement
Best for: Well-understood domains, complex navigation

Pattern 4: Penalty-Based Rewards

Penalize bad actions:
Use cases:
  • Safety constraints
  • Efficiency requirements
  • Avoiding bad behaviors

Pattern 5: Binary Rewards

Simple success/failure:
Best for: Classification, Q&A, simple decisions

Reward Scales

Common Reward Ranges

[0, 1] scale:
  • 0 = failure
  • 1 = perfect success
  • 0.5 = partial success
[-1, 1] scale:
  • -1 = worst outcome
  • 0 = neutral
  • +1 = best outcome
Custom scales:
  • Can use any range, but normalise for RL algorithms
  • Some RL algorithms normalise automatically; e.g. group advantage in GRPO

Cumulative Rewards

In RL, we often care about total (undiscounted) return:
Interpretation:
  • Higher total return = better performance
  • Compare across episodes for learning progress
  • Use for evaluation metrics

Rewards for Evaluation

Rewards in ORS can be used for evaluation as well as training:

Next Steps

Tools

Design tools that return rewards

Tasks & Splits

Organize tasks for RL training

Sessions & Episodes

Understand episode lifecycle and reward accumulation

Implementing a Server

Build an ORS server with reward logic

Key Takeaway: Rewards are the learning signal for RL. Design them carefully to align with your true objective, provide timely feedback, and avoid unintended behaviors. Good reward design is critical for successful RL training.