Sparring upgraded to a real adversarial agent — memory, escalation, teach-on-miss, gpt-5.4
The /sparring drill was a stateless single-turn judge, so it couldn't corner you on your own earlier answers. Gave it conversation memory, a relentless escalating prompt, teach-on-miss (explain the concept when you're lost, then re-ask), and switched the model to gpt-5.4 — which required swapping max_tokens for max_completion_tokens and dropping the custom temperature.
The owner wanted a top-level adversarial partner — something to actually fight with on a deep-dive, all day, hands-free, that teaches him a concept the moment he hits one he doesn't know. The existing /sparring looked the part (a hard, mechanism-focused judging prompt, voice in and out, 14 drills) but reading the code showed the real limit: it was stateless. Each POST sent only the current question and the latest transcript; the page accumulated past attempts but never sent them. So the partner graded every answer in isolation. It could ask a follow-up, but it couldn't remember what you said three turns ago, escalate from there, or catch you contradicting yourself — which is exactly what a tough interviewer does.
Four changes turned it into an interviewer:
- Memory. The page now sends the running exchange (last eight turns: the question, your spoken answer, and the score it gave). The route formats that into a "conversation so far" block, and the prompt is told to escalate from where you are, never repeat a question you already answered well, and emit a
contradictionKofield when this answer clashes with an earlier one. - Escalation. The prompt is more ruthless: push every claim to a concrete metric (p99, lock wait, rows scanned), press harder on the exact gap when an answer is vague, and dig one level deeper each turn.
- Teach-on-miss. When you say you don't know or score ≤2, instead of just marking you down it fills
teachKo/teachEn— a short, plain explanation of the mechanism you're missing with one example — then re-asks the same idea more simply so you can try again. That's the "walk all day, understand on the spot, keep digging" loop. It shows up as a sky-blue "💡 모르면 — 빠른 이해" box. - Model. Switched to
gpt-5.4, the strongest the key has. That isn't a drop-in: the gpt-5/o-series rejectsmax_tokensand a customtemperature, so the route detects a reasoning-style model (/^(gpt-5|o[134])/) and sendsmax_completion_tokenswith no temperature; gpt-4o-style models keep the old params.
Verified end to end before shipping: a deliberately weak answer ("um, a lock, it's fast") came back as technicalScore 1 with the concept taught in Korean and a harder follow-up demanding the exact invariant and transaction boundary. Deploy confirmed by image-digest match plus a live POST to the phone URL.
The reusable lesson: a judge endpoint only becomes an interviewer when it carries conversation state. Memory is what lets it escalate and catch contradictions; without it, all it can do is grade one answer at a time.