Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Live-Session Conversational Chatbot

Design live, ordered chatbot sessions for one customer organization and one application domain, with isolated user context and controlled model releases.

Problem statement

For this exercise, assume one customer organization operates the chatbot in one configured application domain. Many authenticated end users may have independent live conversations; multi-tenant customer onboarding and cross-domain integrations are outside scope.

For this exercise, assume an authenticated user starts a text-only live chat session, sends a question, and receives a streamed answer that can use earlier turns in that same session.

The initial release keeps at most twelve committed turns as conversation context and expires the session after one idle hour; reopening old chats, search, external retrieval, tool actions, and autonomous tasks are outside scope.

Each user turn has an idempotency key and a clear pending, completed, canceled, or unavailable outcome. Only a completed answer becomes context for a later turn, and two concurrent user turns in one session must not silently reorder the conversation.

An existing general-purpose language model is available; choose a defensible model and prompt strategy, a versioned context-bounding policy, a multi-turn quality and safety evaluation, and a guarded release process.

Keep one user’s text out of another user’s context, and do not use private conversation text for training by default. These boundaries and workload targets are practice assumptions for this exercise.

What to build

  1. Within the one configured customer/application domain, an authenticated user starts an isolated live session, sends ordered text turns and receives streamed responses using only that session's committed context.
  2. A user can retry or cancel one generation and learn whether the turn completed, was canceled, or became unavailable without duplicating committed messages.
  3. Operators can compare candidate model, prompt, context-builder and safety-policy releases on multi-turn quality, safety and latency, canary a change, and roll back the complete release.

At scale

  • Assume 50,000 concurrently active sessions and 2,000 new user turns per second at peak; a session expires after one idle hour.
  • For an admitted healthy turn, target p95 first token within 1.5 seconds and a completed answer within eight seconds, with at most 256 generated tokens.
  • Only the latest twelve committed turns may be supplied as conversation history; if they exceed the model context budget, the system must make an explicit bounded-context decision.
  • Private turn text is retained only for the active session and is not training material by default; non-content operational outcomes may be retained for release monitoring.