AI Cloud Architect

Custom reward functions for multi-turn reinforcement learning with Amazon Nova Forge

AWSHow-to by Maria Masood, Laurent Mombaerts and Nick BisoAWS Artificial Intelligence Blog

In multi-turn reinforcement learning, your custom reward function decides what the model actually learns. This post shows how to design a composite multi-turn reward for Amazon Nova Forge, execute model-generated code safely inside it, and instrument each component to catch the pitfalls that quietly collapse a reward.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Shows how to build a composite multi-turn reward for Nova model RL training, run model-generated code safely in the reward, and instrument components to catch dead reward signals.

Who it is for

Teams running multi-turn reinforcement fine-tuning on Amazon Nova Forge with a custom reward environment on SageMaker HyperPod.

Key points

  • Multi-turn rewards run in a customer environment container via Nova Forge BYOO, because single Lambda invocations cannot cover multi-turn episodes past 15 minutes.
  • Post's example reward is a weighted sum of correctness, asked_before_coding, guessed_immediately and loop_penalty components.
  • Authors say a component with zero within-group variance contributes no gradient, so per-component variance should be tracked.

The same at other vendors

Timeline

  1. What it explainsAmazon Nova Forge: Build your own Frontier Models using Nova · AWS · Announcement
  2. Read firstReinforcement fine-tuning for Amazon Nova: Teaching AI through feedback · AWS · Blog post
  3. Read firstKick off Nova customization experiments using Nova Forge SDK · AWS · How-to
  4. Read firstHow to build effective reward functions with AWS Lambda for Amazon Nova model customization · AWS · How-to
  5. Read firstReinforcement fine-tuning with LLM-as-a-judge · AWS · How-to
  6. This postCustom reward functions for multi-turn reinforcement learning with Amazon Nova Forge

Go deeper