What they’re really asking
If you only remember one thing, say this in the first minute: “I built a four-step pipeline: turn the request into a spec, write the story, have a second model call check it against each rule separately, and rewrite only what failed, at most twice. The checker is itself a model, so it can be wrong. I made it answer pass or fail for one rule at a time, used plain code wherever code can decide, and measured how often it agreed with my own labels, using a score that corrects for agreement by luck.”
The rest of this page explains each part of that answer.
The task, as reported, is a bedtime-story generator for children whose quality check is done by a language model. The interesting part is not the story. It is whether you know when to trust the check.
What makes this different from a normal take-home
In a normal pipeline, the validation step is code, and code is either right or wrong the same way every time. Here the validation step is a large language model (LLM), the same kind of text-in, text-out program that wrote the story. Using a model to grade another model’s output is called LLM-as-judge, and the grader is the judge. A judge can be wrong, and if it uses the same model as the writer it may share the writer’s blind spots. So you have to measure the checker before you rely on it, the way you would test a new monitoring alert before you page people on it.
Words you need first
- Prompt: the text and instructions you send the model.
- Spec: here, a small JSON record of what the story must contain (age, characters, theme, length, things to avoid).
- Criterion: one rule the story must meet, such as “mentions every requested character”.
- Labels: your own pass or fail judgments on sample stories, the answer key you test the judge against.
Where it was reported
Public candidate repositories for this Hippocratic AI take-home describe four stages (spec builder, storyteller, LLM judge, rewriter), a required model (gpt-3.5-turbo) and up to two revision cycles AI Engineering Field Guide (GitHub). Two of them describe bedtime stories for ages 5–10.
Clarify first
- What must every story satisfy? Assume age-appropriate content, the requested characters and theme, a length range and a calm ending. Each becomes a separate check.
- Is a story that still fails after two rewrites returned, or refused? Assume it is returned with a flag, or replaced by a safe fallback, never passed off silently.
- Is the user allowed to request changes? Assume one optional tweak loop.
- Must the judge use the same model? The constraint says gpt-3.5-turbo. Note that a judge sharing the generator’s blind spots is a known weakness.
Answer
A picture of the pipeline
Request ("a story about a shy dragon for a 6-year-old")
│
▼
Spec builder ── model → JSON spec {age, characters, theme, length, must_avoid}
│
▼
Storyteller ── model writes the story from the spec
│
▼
Checks ── code checks (length, names present) + judge: one pass/fail per criterion, with a reason
│ │
│ all pass └── some fail and rewrites < 2 ──► Rewriter (gets only the failed criteria) ──► back to Checks
▼ └── still failing after 2 rewrites ──► return with a flag, or a safe fallback
Story to the user
Spec builder. Turns a loose request into structured fields, so every later step works from the same rules.
Storyteller. Writes from the spec, not from the raw request.
Checks. Code checks what code can decide. The judge checks the rest, one criterion at a time, and gives a short reason for each failure.
Rewriter. Receives only the failed criteria and their reasons, so it fixes the problem instead of rewriting the whole story and breaking something else.
The stop rule: stop when everything passes or after two rewrites. That is at most 7 model calls per story; put that ceiling in the README.
Follow one story
An illustrative run for the shy-dragon request:
| Step | What happens | What to say in the interview |
|---|---|---|
| Spec | {age: 6, characters: ["Pip the dragon"], theme: "making a friend", length: 300–500 words, must_avoid: ["violence"]} | ”Every later step reads the same spec.” |
| Draft | 620 words; Pip meets a knight who fights another dragon. | — |
| Checks, round 1 | Code: length fail (620 > 500). Judge: age-appropriate fail (“a fight scene”); characters pass; calm ending pass. | ”Two specific failures, each with a reason.” |
| Rewrite 1 | The rewriter gets only those two failures. | ”Fix what failed; don’t touch what passed.” |
| Checks, round 2 | 450 words, no fight. Everything passes. | ”Done in 5 calls, under the 7-call ceiling.” |
Make the judge checkable
Ask for binary answers, pass or fail, one criterion each, rather than a 1–10 score. A score of “7” is hard to check against anything; “the story contains violence: yes or no” is easy to check against your own label. Use code where code can decide (length, required names present). Hamel Husain and Shreya Shankar’s evals FAQ recommends exactly this: binary judges per failure, validated against human labels (evals FAQ).
Measure the judge against your labels
In a take-home, label 20–30 stories yourself, run the judge on them, and report how often it agrees with you per criterion. Say the sample is small: the FAQ, as of 2026-10-12, asks for at least 50 passing and 50 failing examples before you trust a judge.
Raw agreement misleads when most stories pass. A judge that always says “pass” agrees with you on every story that really does pass, without checking anything. Cohen’s kappa fixes that: it measures agreement beyond what two raters would reach by luck, given how often each says pass. 0 means no better than luck; 1 means perfect.
κ = (p_o − p_e) ÷ (1 − p_e) p_o- observed agreement between judge and your labels
p_e- agreement expected by chance from each side's pass rates
30 pairs, 26 agree (p_o = 0.867), both say pass 70% of the time (p_e = 0.58): κ = 0.68
An always-pass judge agrees 70% of the time in that example and has κ = 0. Say it like this: “70% agreement sounds fine until you see that a judge that never looks at the story gets the same 70%.”
Verify the loop
Two tests matter most. A test where the judge always fails proves the pipeline stops at two rewrites. A test with a malformed judge reply proves it is retried or treated as a fail, never as a pass.
Senior vs Staff
Pipeline with an LLM judge
Senior
- Bounded loop, per-criterion binary judge, code checks where possible, judge agreement measured on own labels.
Staff
- Treats the judge as a component with its own error rate: corrects reported pass rates for it, says which criteria need a human or a different model, and what drift check runs in production.
In plain words: Senior builds a bounded loop and checks the judge against their own labels. Staff also treats the judge’s mistakes as a known error rate, adjusts the reported numbers for it, and plans how to notice if the judge gets worse over time.
Small-team version
A small team rarely has paid labelers, so a judge calibrated against the owner’s own labels is the cheap option.
The model bill is small: about 1 cent per story in the 7-call worst case, on gpt-5-mini ($0.25 / $2 per 1M input / output tokens, fetched 2026-10-11). The labels are the real cost: 100 examples at an assumed 2 minutes each is about 3.3 hours of an expert’s time.
Build the judge as a CI check per failure type, keep a human-labelled sample refreshed monthly, and never let a judge you have not measured gate a release. Revisit the judge model when its agreement with your labels drops.
The arithmetic behind the numbers (for a Staff-level follow-up)
- Assumed: 1,000 input and 500 output tokens per call.
- Per call: 1,000 × $0.25 per million = $0.00025; 500 × $2 per million = $0.001; total $0.00125.
- Worst case: 7 calls × $0.00125 = $0.00875, about $0.009 per story.
- Labels: 100 × 2 min = 200 min ≈ 3.3 h.
- Kappa example: p_o = 26 ÷ 30 = 0.867; p_e = 0.7 × 0.7 + 0.3 × 0.3 = 0.58; κ = (0.867 − 0.58) ÷ 0.42 = 0.68.
Pitfalls
- One holistic score. A single 1–10 rating from the judge can’t be checked against labels or used to tell the rewriter what to fix.
- Rewriting the whole story. It fixes one failure and often breaks a criterion that had passed.
- Unbounded revision loops. Without a cap, a judge that never passes burns money forever.
- Reporting the judge’s pass rate as the system’s quality. That number is only as good as the judge, which you must measure first.
Go deeper
- Family walkthrough: Build an LLM app or agent take-home, then defend it.
- Labs: Build Your Own LLM Evaluation Harness.