Design the Vector Store Behind a File Search Tool for Developers
Last updated: November 29, 2026
Quick Overview
Design a managed service where API developers upload files into vector stores, and assistants retrieve relevant chunks at query time with metadata filters and low latency.
OpenAI
System Design
Software Engineer
OpenAI
November 29, 2026Software Engineer
Onsite
System Design
Medium
0
0
0 solved
Design a managed service where API developers upload files into vector stores, and assistants retrieve relevant chunks at query time with metadata filters and low latency.
OpenAI's file search tool lets developers attach documents to agents without running their own retrieval stack. The interviewer is checking whether you can build multi-tenant ingestion and ANN search with clear isolation, freshness and cost trade-offs.
What the Interviewer Expects
- Define the ingest pipeline: parse, chunk, embed, index, with status the developer can poll
- Choose an ANN index type and segment layout for many small tenants and a few huge ones
- Support metadata filters without destroying recall
- Isolate tenants for security and noisy neighbors
- Explain re-ranking and how retrieved chunks are passed to the model
Key Topics to Cover
ANN indexes
HNSW
chunking
multi-tenancy
re-ranking
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you handle a tenant with 50 million chunks next to a million tenants with 100?
- How would you support deleting one file from a store immediately?
- How do you price this: storage per GB per day, per query, or both?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- APIs: create vector store, add files (PDF, docx, code, markdown), poll file status, search with query and filters, delete file.
- Files up to 512 MB; stores up to millions of files.
- Search p95 und...
High-Level Design
- Upload to object storage; enqueue an ingest job.
- Ingest workers: parse (layout-aware for PDFs), chunk by tokens with overlap (for example 800 tokens, 400 overlap), embed in batches on GPU,...
Submit Your Answer
Markdown supported