Demo · Reinforcement learning

Your evals are
the reward.

Point reinforcement learning at an agent evaluation you already run. A small open model works every task many times in Chalk sandboxes, your scorers grade each attempt, and a GRPO step teaches it to do more of what scored well.

The loop

Rollouts, scores, one step, repeat

The example is Larkspur, a fictional appliance company with 60 support tickets that sit on policy boundaries: refunds on day 14, a 48-hour damage window, recalls, billing errors. The student is Qwen3-4B-Instruct with a LoRA adapter. Every iteration runs four steps.

  1. 01

    Run the evaluation

    Every support ticket becomes a task in its own Chalk sandbox, with a simulated customer, a helpdesk backend, and a ledger the agent's actions are graded against.

  2. 02

    Sample rollouts

    The small model, served by vLLM with its current LoRA adapter, works each ticket several times. One iteration of 60 tickets is 120 conversations, done in 3½–8 minutes in parallel sandboxes.

  3. 03

    Score them

    The evaluation's own scorers grade every rollout: policy rubric, cost of service, LLM judges for accuracy and tone, and the customer's survey. Their weighted sum is the reward.

  4. 04

    Take a GRPO step

    A Chalk training run reinforces the rollouts that beat their ticket's average, saves the adapter, and hot-loads it into vLLM. On one A100 that took 8 min 20 s.

The reward: a weighted sum of scorer averages
Policy compliance × 1Cost of service × 0.5Claims accurate × 0.2Customer satisfied × 0.15CSAT survey × 0.1Customer got irate × -0.3

What one step bought

A real iteration on Chalk's staging GPUs: Qwen3-4B worked all 60 tickets twice, then one GRPO step trained its adapter, and the adapter worked them again. Five of six scorers improved, led by the accuracy of the agent's claims to the customer.

Measured · one iteration, 120 rollouts each side
ScorerBase modelAfter 1 stepChange
Policy compliance0.7420.747+0.005
Cost of service0.7660.774+0.008
Claims accurate0.5120.554+0.042
Customer satisfied0.7500.765+0.015
CSAT survey0.6730.681+0.008
Customer got irate0.0250.025same
Cost per ticket$178$184+$6
Mean reward1.3991.420+0.020

One step is small on purpose: two samples per ticket and a learning rate of 1e-5 move the model gently, so the gains are modest and a single step is within noise on some scorers.

The honest detail is the cost per ticket: the adapter resolved tickets slightly more generously, so dollars per ticket rose while the bounded cost score improved. That is exactly the trade-off the reward weights exist to steer.

Rollouts took 3½–8 minutes and the training step 8 min 20 s on one A100 80GB, so a full run is a matter of hours.

The shape of a full run

Illustrative

Twelve iterations from the seeded demo run in the same environment, which replays real trajectories with synthetic scores. It is a sketch of what a longer run looks like, not a result. The purple points are the measured iteration above, and the dashed line is Claude Haiku 4.5 working the same tickets, scored with the same weights.

Illustrative 12-iteration runMeasured: one real iterationClaude Haiku 4.5 reference
1.21.41.61.8036912IterationHaiku 4.5 · 1.73Qwen3-4B · 1.69
Show the numbers
IterationIllustrativeMeasured
01.2591.399
11.3421.420
21.390—
31.457—
41.485—
51.523—
61.547—
71.597—
81.621—
91.644—
101.664—
111.674—
121.693—

Why post-train on your evals

Prompting a frontier model gets an agent working. Reinforcement learning gets a model you own to do the job the way your business grades it.

Frontier quality, small-model cost

A 4B-parameter model you host can serve millions of tickets for a fraction of a frontier API's price, if it is trained on your job. Post-training is how it gets there.

No labeled data

The reward comes from the evaluation you already run. There is no dataset of ideal answers to write, and the model learns from its own best attempts.

Optimize what the business measures

Weights decide the trade-offs: compliance first, then cost, with judges and surveys shaping tone. An irate customer is a penalty, not just a lower score.

Your data stays in your cloud

Tickets, transcripts, trajectories and adapters live in your Chalk environment. The rollouts, the trainer and the policy server all run there.

One loop, many workloads

The same sandboxes, scorers, training runs and model registry run every iteration, so a post-training run is a configuration, not a new platform.

Every step is inspectable

Each iteration is an evaluation run with traces, and each GRPO step is a training run with metrics and a versioned adapter you can roll back to.

Getting started

An evaluation in, a trained adapter out

Serve the small model, pick your reward weights, and start the loop. A Temporal workflow in Chalk drives each iteration: it runs the evaluation, starts the training run, and waits for the new adapter to be live before the next round of rollouts.

The trainer is plain PyTorch and PEFT in six small modules: rewards and Dr-GRPO advantages, chat reconstruction from the agent's trajectory, loss masking, the policy-gradient step, and the loop that saves and hot-loads each adapter.

chalk-ai/chalk-harbor
cd chalk-harbor/examples/appliance_support/post_training

# A vLLM server for the small model, with LoRA hot-loading, behind Chalk's AI router.
./serve_policy.py --gpu nvidia-a100-80gb:1

# Turn the evaluation's scorers into a reward and start the loop:
# each iteration runs the evaluation, then takes one GRPO step on a LoRA adapter.
./start_post_training.py \
    --evaluation-id <larkspur evaluation> \
    --trainer-image <uri from build_trainer_image.py> \
    --policy-server-url <url from serve_policy.py>

Train the model your evals describe

Bring an agent and the scorers you trust. Talk to an engineer about post-training it on GPUs in your cloud.