Building a State-Machine Interview Agent with LangGraph
A Juejin tutorial shows how a server-side interview agent can be rebuilt around a LangGraph state machine instead of relying on one large prompt to enforce stage order. The redesign defines seven interview stages, conditional routing for candidate questions and termination, checkpointed resumption through MemorySaver and thread_id, and failure handling that leaves the current stage unchanged. The author reports that 56 offline pytest cases passed, covering routing, integration, state contracts, failure recovery, and resumption, but these are self-reported test results rather than an independent benchmark.
The tutorial provides a concrete engineering pattern for making multi-turn AI workflows testable, resumable, and easier to inspect by representing interview control flow as explicit state, nodes, and conditional edges.
前两篇把面试官的"嘴"和"人设"都调好了,我把整套东西接进服务端做内测,第一位同事聊了三分钟就退出了。我看他的会话日志,看到了三个事故现场:
第一,他刚做完自我介绍,面试官直接甩了一道场景题,技术基础一行都没问。因为我把整场面试的流程指令全塞进了一个大 prompt:请按"开场、自我介绍、技术、项目、场景"的顺序来。模型点头答应得很好,然后随缘执行。
第二,他中途打了一行"我想先问你个问题",面试官回了一句"好的,请继续做自我介绍"。因为流程意图全靠模型自己脑补,它根本没接到"用户想反问"这个信号该怎么处理的指令。