Tooluck logoTooluck
SKILL.md

02-rl-reward

Agent skill fromagentscope-ai/OpenJudge

Build RL reward signals using the OpenJudge framework. Covers choosing between pointwise and pairwise reward strategies based on RL algorithm, task type, and cost; aggregating multi-dimensional pointwise scores into a scalar reward; pairwise tournament reward for GRPO on subjective tasks (net win rate across group rollouts); generating preference pairs for DPO/RLAIF; and normalizing scores for training stability. Use when building reward models, scoring rollouts for GRPO/REINFORCE, generating preference data for DPO, or doing Best-of-N selection.

How to install 02-rl-reward

install 02-rl-reward
# install the OpenJudge pack with the skills CLI
npx skills add agentscope-ai/OpenJudge

# or add only this skill to Claude Code: copy the folder

skills/openjudge-core/02-rl-reward/

# into

~/.claude/skills/02-rl-reward/ (all projects)

.claude/skills/02-rl-reward/ (one project)

skills/openjudge-core/02-rl-reward/SKILL.md

Apache-2.0Full file
1# RL Reward Construction with OpenJudge
2
3Build reward signals for reinforcement learning from human feedback (RLHF) and
4reinforcement learning from AI feedback (RLAIF) using the `openjudge` library.
5
6## When to Use This Skill
7
8- Building scalar rewards for GRPO / REINFORCE rollout scoring
9- Generating (chosen, rejected) preference pairs for DPO / IPO
10- Best-of-N candidate selection
11- Multi-dimensional reward shaping (correctness + safety + format)
12- Replacing or bootstrapping a reward model with LLM-as-judge
13
14## Step 1 — Choose Your Reward Strategy
15
16Use this decision tree **before** writing any code:
17
18```
19RL Algorithm + Task type?
20│
21├── GRPO / REINFORCE — Verifiable task (math, code, structured output)
22│ └── → POINTWISE ✅ (FunctionGrader, exact score, zero LLM cost)
23│
24├── GRPO / REINFORCE — Subjective task (instruction following, dialogue, summarization)
25│ └── → PAIRWISE TOURNAMENT ✅ (compare each rollout vs all others in group,
26│ reward = net win rate within group)
27│
28├── DPO / IPO / SLiC — need (chosen, rejected) pairs
29│ └── → PAIRWISE ✅ (two-way comparison, return winner/loser)
30│
31└── Best-of-N / reranking — rank N candidates
32 └── → LISTWISE ✅ (single call ranks all N at once)
33```
34
35```
36Cost constraint?
37├── Low budget
38│ └── FunctionGrader (free) → pointwise; or pairwise with small judge model
39│
40├── Medium budget
41│ └── Pointwise: 2–3 LLM graders + WeightedSumAggregator
42…

Excerpt shown under the repository's Apache-2.0 license.

More skills in OpenJudge

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates