Design Full-Text and Semantic Search Over a User's Past Conversations

Last updated: November 29, 2026

Quick Overview

Design search across a single user's ChatGPT conversation history that returns relevant conversations for keyword and natural-language queries within a few hundred milliseconds, while respecting deletions immediately.

OpenAI
System Design
Software Engineer
OpenAI
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design search across a single user's ChatGPT conversation history that returns relevant conversations for keyword and natural-language queries within a few hundred milliseconds, while respecting deletions immediately.

Heavy ChatGPT users accumulate thousands of conversations and rely on the sidebar search to find old work. The question checks whether you recognize this as many small per-user indexes rather than one global index, and whether you balance lexical and embedding retrieval against cost.

What the Interviewer Expects
  • Recognize the access pattern: queries are always scoped to one user or workspace
  • Combine lexical (BM25) and vector retrieval and merge results
  • Index asynchronously from a change stream with bounded freshness lag
  • Enforce deletions and temporary-chat exclusion in the index path
  • Estimate embedding and storage costs at hundreds of millions of users
Key Topics to Cover
inverted index
embeddings
hybrid retrieval
change data capture
multi-tenancy
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you highlight the matching snippet within a long conversation?
  • How would you rank a conversation from yesterday against a better textual match from a year ago?
  • How would enterprise admins search across their workspace for compliance, and what changes?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Query box returns conversations ranked by relevance, with a snippet.
  • Freshness: a new message is searchable within about a minute.
  • Deleted conversations disappear from results immediately.
  • p95...
High-Level Design
  • Change stream from the conversation store (CDC) feeds an indexer.
  • Indexer chunks messages (for example 500-token windows), writes lexical postings and computes embeddings with a small embe...

Submit Your Answer
Markdown supported