Fine-tuning lab
Build the first training config and smoke adapt path
One clean transaction through **POST /v1/fine_tuning/jobs** must match the oracle: held-out tone score ≥ 0.82 and factual hallucination rate ≤ 0.05 on 40 gold pairs.
1Learn the idea
Read
Order the successful transaction
Code the narrow path that serves support ops manager reviewing tone before a seasonal campaign: accept → authorize/normalize → call dependency → validate → record. Keep stages named so a trace can show which boundary passed. Success must emit evidence useful to tone_pass_rate and unsupported_fact_rate, not only a 200 with prose. Predict the observable for POST /v1/fine_tuning/jobs before running: held-out tone score ≥ 0.82 and factual hallucination rate ≤ 0.05 on 40 gold pairs.
Read
Run with fakes first
Drive the path with recording fakes or local stubs. Assert call order and arguments. Idempotency keys or stable ids should keep retries from duplicating costly work where the product requires it. Product under test remains LoRA adapter that keeps support replies in brand voice while facts stay in RAG — resist adding unrelated features mid-path.
Read
Implementation artifact
job = client.fine_tuning.jobs.create(model="gpt-4.1-mini", training_file=file_id, hyperparameters={"n_epochs": 2})
print(job.id, job.status)
Read
Compare prediction to result
For Fine-tuning lab, paste the CLI/HTTP transcript beside your prediction for POST /v1/fine_tuning/jobs. If the oracle is unmet (held-out tone score ≥ 0.82 and factual hallucination rate ≤ 0.05 on 40 gold pairs), stop and debug this page; do not compensate with prompt folktales. Re-run once after a clean process start to catch hidden global state that would invalidate FT-PROMO-LEAK-12.
Read
Stage depth
Performance sketch: measure local p95 for the fake-backed path so later regressions are obvious. Keep concurrency modest until failure-handling proves limits. Log a single structured event per success with request id, revision, and the evidence field behind tone_pass_rate and unsupported_fact_rate. Avoid hidden global caches in the happy path unless the lab is about caching — and even then key by tenant. If the path calls a model, pin model id in config and echo it in the response for auditability. Remember support ops manager reviewing tone before a seasonal campaign experiences wall-clock time, not your debugger’s single-step comfort.
Read
Field notes for `fine-tuning-lab` / `happy-path`
Prefer explicit function names over a single god-object handleRequest. Thread a correlation id from ingress to the last log line. When streaming, define what partial failure means before coding. Snapshot one successful response body in fixtures after redaction. If the path writes to a queue, assert message attributes in the fake. Stop adding retries on this page; that is the next concern. In this chapter the product is LoRA adapter that keeps support replies in brand voice while facts stay in RAG, the human stakeholder is support ops manager reviewing tone before a seasonal campaign, and the incident id you design against is FT-PROMO-LEAK-12. Re-state the oracle in your notes — held-out tone score ≥ 0.82 and factual hallucination rate ≤ 0.05 on 40 gold pairs — and keep the invariant visible: weights never encode store hours or prices; those stay in retrieval docs. Track tone_pass_rate and unsupported_fact_rate as the scoreboard. Surface under change control: POST /v1/fine_tuning/jobs. If you only have forty minutes, finish the fixture for training set includes tomorrow's promo price; model invents it after promo ends before polishing UI. Promotion language stays ternary: promote, hold, or roll back based on evidence, not hope.
Go deeper
Before you start
Why this matters
Without calling production, order the steps a single success takes for support ops manager reviewing tone before a seasonal campaign. Circle the first irreversible side effect. Your prediction should mention POST /v1/fine_tuning/jobs and the evidence field that proves held-out tone score ≥ 0.82 and factual hallucination rate ≤ 0.05 on 40 gold pairs.
Related lessons
Check your understanding
Page assessment
Answer from memory. Completion is saved from this evidence, not from opening the next page.
All responses are required.