AI-Assisted Commerce Platform
Design an online store whose AI shopping agent, reachable by text or by voice, can recommend products and propose safe, explicitly confirmed cart actions.
Problem statement
For this exercise, assume an online shop supports catalog search, product pages, carts, checkout, and order status.
Add a conversational shopping agent that can explain products, recommend items, and propose cart changes using the same catalog, price, promotion, inventory, and policy authorities as the ordinary storefront.
The customer must explicitly confirm each state-changing agent proposal, and the agent can never submit payment by itself. Design the store and agent integration, including freshness, consent, checkout correctness, failure handling, and auditability.
For this exercise, also assume customers can talk to the agent by voice in the web and mobile apps: their speech is transcribed as they talk, the agent's reply is spoken back as it is generated, and a customer may interrupt the agent while it is speaking.
A cart change proposed in a voice conversation needs the same explicit confirmation as a typed one, and the exact change must be read back before it is confirmed. Transcripts of voice turns are part of the audit trail.
Training the language, speech-recognition or speech-synthesis models and running card networks are outside scope; assume streaming speech-to-text and text-to-speech services are available.
What to build
- Customers can search and browse products with current price, availability, and product details.
- Customers can maintain a cart and place an order with an explicit price and inventory recheck.
- The AI agent can answer product questions and recommend items using authorized catalog evidence.
- Customers can speak to the agent and hear its replies, and can interrupt a spoken reply to redirect the conversation.
- The agent can propose cart mutations, but only an authenticated customer confirmation of the exact proposal, typed, tapped or spoken after a read-back, applies it, and every action, including voice transcripts, is auditable.
At scale
- Serve a catalog of 10 million products to one million daily active customers, with 5,000 peak browse requests per second.
- Support 500 checkout attempts per second and 1,000 concurrent agent conversations, of which up to 300 may be voice sessions.
- Keep catalog reads under 200 ms at p95 and return the first useful typed agent response within two seconds at p95. For this exercise, assume that in voice sessions the agent starts speaking within one second at p95 after the customer stops talking, and stops speaking within 300 ms of an interruption.
- Prevent overselling at order commit, make checkout retries idempotent, and never apply a stale or unconfirmed agent action.