For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tutorial 2: Build your first judge

Tutorial 2 — Build, test, and apply your first LLM judge.

Time: ~20 minutes Level: Beginner-intermediate You'll build: A custom helpfulness judge, tested against examples, applied to an evaluation.

What you'll learn

  • How to author a judge rubric

  • How to test a judge against examples

  • How to apply a judge to an evaluation

  • When to GEPA-optimize (next tutorial)

Prerequisites

Step 1: Define the dimension

Write down — in plain English — what you're trying to grade. Keep it specific. "Helpfulness for customer-support questions about billing." Not just "helpful."

Step 2: Create the judge via SDK

from layerlens import Stratix

client = Stratix()

judge = client.judges.create(
 name="billing-support-helpfulness",
 evaluation_goal="Rate whether the response helps the customer resolve a billing question. The response should: (1) directly address the question, (2) provide actionable next steps, (3) be polite and professional.",
)
print("Judge:", judge.id)

Step 3: Test on examples

Step 4: Iterate the rubric

If the verdict doesn't match your intuition, edit the rubric and re-test.

Step 5: Apply to an evaluation

Step 6 (optional): GEPA-optimize

If you have ≥30 labeled examples, jump to Tutorial 5 to lift judge agreement.

What's next

Last updated

Was this helpful?