Question 1
Medium Design a customer-support chat system in which users communicate in real time with a virtual agent. A conversation escalates to a human agent when the virtual agent cannot resolve the issue, when the user explicitly requests a human, or when a high-risk intent is detected. Functional requirements: users create support conversations and send and receive real-time messages; the virtual agent processes messages and produces automated replies; escalation is triggered by an explicit request, a low-confidence or unsupported response, or high-priority intents such as fraud, account security, or refund disputes; after escalation the conversation is routed to an appropriate human agent who can view the full history and continue the chat; if no agent is available, the conversation enters a waiting queue and the user sees queue status; a human agent can close, transfer, or return a conversation to the virtual agent; and conversation history is persisted and retrievable by conversation ID. Non-functional requirements: horizontal scaling and high availability, low-latency message delivery, message ordering within a conversation, no conversation handled by multiple human agents at once, and consideration of agent presence, skill tags (such as billing, account, and shipping), and load balancing. Describe the core APIs, services and storage, the conversation state machine, the escalation and agent-assignment flow, and reliability and scalability choices.
Experience
The interviewer used a highly interrogative style, asking several questions after each statement and rarely letting the candidate lead the discussion. The candidate reported that the issues were resolved and the interviewer raised no objections. Recruiter feedback described this round as below expectations.