유대선
프로젝트로
·기술 회고·2

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:

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.