Layer 3 · Go deeper · 11 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
How much memory does one copy of the index need?
What does it cost to embed the corpus and keep it fresh?
What does an answer cost, per employee a month?
Build-up · 5 steps
Build the high-level design
One functional requirement at a time, ending with a design that works before any scaling.
Step 1 of 5
A cited answer
Start with the read path and a nightly-built index. The Ask service retrieves eight chunks, numbers them as sources and tells the model to answer only from them, citing tags like [S1].
6 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 6
Interviewer
“A 200-page credit manual, a Slack thread and a scanned circular must all be searchable. How do you split documents?”
Your move. Pick an approach:
Deep dive 2 of 6
Interviewer
“Questions mix paraphrases, Hindi and exact codes like PAY-4812. How do you find the right eight chunks?”
Your move. Pick an approach:
Deep dive 3 of 6
Interviewer
“You have 60 million 1,024-dimension vectors, 246 GB in float32. How do you store and search them quickly?”
Your move. Pick an approach:
Deep dive 4 of 6
Interviewer
“The assistant must never use a document the employee couldn’t open in the source system. Where do permissions apply?”
Chunks carry a copy of their document’s ACL as group IDs. A branch officer can open about 5% of them.
Your move. Pick an approach:
Deep dive 5 of 6
Interviewer
“Assume 80,000 documents change a day, and a withdrawn circular must stop answering questions. How do you keep the index fresh?”
Your move. Pick an approach:
Deep dive 6 of 6
Interviewer
“The model remembers central-government LTA rules from training. How do you make it answer from the bank’s own documents?”
Your move. Pick an approach:
Build-up · 8 steps
Follow one question through it
A query path and an ingestion path meet at one search index. Follow one question, then one document.
Step 1 of 8
Ask
The employee’s question arrives at the Ask service with an SSO token, over a streaming request.