LizzyDocs

Stage 03 · Rewards

Define what “better” means before training.

Select explicit, testable signals. A reward can be deterministic, judged, human-derived, or supplied by your own webhook.

Pick signals that match the job

Deterministic

Verifier

Schema, tool-call, regex, or exact checks. Fast, explainable, and ideal when correctness is mechanical.

Model-based

Judge

A rubric scores quality that cannot be expressed as a strict verifier.

Your system

Webhook

Batch candidates to an HTTPS endpoint. Secret configuration remains write-only.

Outcomes

Feedback RM

Learn from sufficient labeled calls and explicit human feedback.

Create a deterministic reward

Start with the narrowest signal that represents success. This verifier requires valid JSON matching a supplied schema.

curlexample
curl -X POST "https://<your-lizzy-host>/v1/distill/rewards" \
+  -H "Authorization: Bearer $LIZZY_API_TOKEN" \
+  -H "Content-Type: application/json" \
+  -H "Idempotency-Key: reward-json-001" \
+  -d '{"name":"valid-ticket-json","kind":"verifier","config":{"check":"json_schema","schema":{"type":"object","required":["answer","confidence"]}}}'
Pythonexample
import os, requests

reward = requests.post(
    "https://<your-lizzy-host>/v1/distill/rewards",
    headers={"Authorization": f"Bearer {os.environ['LIZZY_API_TOKEN']}", "Idempotency-Key": "reward-json-001"},
    json={"name": "valid-ticket-json", "kind": "verifier", "config": {
        "check": "json_schema",
        "schema": {"type": "object", "required": ["answer", "confidence"]},
    }},
).json()
TypeScriptexample
const response = await fetch("https://<your-lizzy-host>/v1/distill/rewards", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.LIZZY_API_TOKEN}`, "Content-Type": "application/json", "Idempotency-Key": "reward-json-001" },
  body: JSON.stringify({ name: "valid-ticket-json", kind: "verifier", config: {
    check: "json_schema",
    schema: { type: "object", required: ["answer", "confidence"] },
  }}),
});
if (!response.ok) throw await response.json();
const reward = await response.json();

Test before you optimize

A reward test accepts a captured call or an explicit candidate and reference. Test passing, failing, and malformed cases; look at the detail, not only the number.

POST/v1/distill/rewards/{reward_id}/test

Send {"candidate":"<candidate>","reference":"<reference>"} or a call ID. Use up to 25 sampled examples.

Reward selection is explicit

Recipe proposals are scoped to a dataset version and the exact reward IDs you select. Lizzy does not silently attach every active reward. Choose outcome: "report" for evaluation only or "deployable_student" when the recipe should include publication.

Built for humans and copilots.

Every risky action has an explicit handoff, validation, or approval boundary.

Recovery guide