# Reward Function Engineering: Verifiable, Math, Code, Format, Length, Diversity

> Source: https://sukruyusufkaya.com/en/learn/fine-tuning-cookbook/ftc-reward-function-engineering
> Updated: 2026-05-14T14:42:58.440Z
> Category: Fine-Tuning Cookbook (Model-by-Model)
> Module: Part XI — Alignment & Preference Optimization
**TLDR:** Reward function = definition of success for GRPO/PPO. Math (regex/SymPy), code (exec + test), format (chat template adherence), length (anti-rambling), diversity (n-gram penalty), composability. Cookbook's reward function design guide.

