Interview prep pack
Interview prep packs
Real interview questions, with full answers
Every question has a full answer, the follow-ups, the common mistakes and a diagram. Each pack is a PDF you download right after paying and keep.
Best value
All 9 Interview Prep Packs
1,260 questions in one payment. Bought one by one: ₹8,991. · Bought one by one: $180.
System Design and Distributed Systems
200 questions
₹999 · $20BuyAI Engineering (LLM applications)
150 questions
₹999 · $20Buy150 questions
₹999 · $20Buy120 questions
₹999 · $20Buy120 questions
₹999 · $20Buy150 questions
₹999 · $20Buy150 questions
₹999 · $20BuyMaths for ML and Deep Learning
120 questions
₹999 · $20Buy100 questions
₹999 · $20Buy
India: UPI, cards, netbanking or wallets through Razorpay. Everywhere else: card or PayPal, in US dollars. The PDF is in My packs the moment the payment is confirmed. All sales are final, so read the free question below first.
Free question · System Design pack · senior
Your call to the payment provider times out. Did the customer pay? How do you design the payment state machine and reconciliation so no money is lost or charged twice?
Why it is asked: Unknown outcomes are the hardest part of payments. Candidates who mark a timeout as failed cause double charges when the customer pays again.
The answer
What the interviewer listens for
- Timeout means unknown, not failed
- Forward-only states with conditional updates
- Resolve with status checks, same-key retries and webhooks
- Daily reconciliation against the settlement file

Interview prep packs · by Roni Das
Answered the way interviewers want to hear them
Every question comes with why it is asked, a full answer, what the interviewer listens for, the follow-ups, the common mistakes and a diagram. Each pack is a PDF you keep. On sale now: System Design, AI Engineering, GenAI and LLM, Agentic AI, Inference Engineering, ML Engineering, Data Science, Maths for ML, Forward Deployed Engineer.
pay from anywhere
Card or PayPal, from any country
Pay by Visa, Mastercard, American Express or Maestro card, or with PayPal. Your access opens the moment the payment is verified.
- Cards are processed by Razorpay, a PCI DSS compliant payment gateway. You enter the card in Razorpay's secure window over an encrypted (TLS) connection.
- Every payment is verified by the payment provider's signed confirmation before your access opens. You get a payment ID on screen and by email.
- Charged in US dollars. Your bank or PayPal shows the amount in your own currency.
The nine packs
9 on sale now. The rest are being written and checked; they have no price until they are finished.
Interview prep pack
AI Engineering (LLM applications)
Free sample: What do temperature and top-p control, and what values would you use for data extraction versus brainstorming?
Interview prep pack
GenAI and LLM Engineering
Free sample: Why are LLMs bad at counting letters or reversing a word?
Interview prep pack
Agentic AI Engineering
Free sample: Describe the basic agent loop.
Interview prep pack
Inference Engineering
Free sample: What happens, step by step, when an LLM server handles one request?
Interview prep pack
ML Engineering and MLOps
Free sample: A model scores 95% accuracy offline but users say it is useless. What do you check first?
Interview prep pack
Data Science
Free sample: You need to show delivery times for 20 cities. Would you use histograms, box plots, violin plots or ECDFs, and why?
Interview prep pack
Maths for ML and Deep Learning
Free sample: Compute the cosine similarity of a = (3, 4) and b = (4, 3) by hand. What does the result mean?
Interview prep pack
Forward Deployed Engineer
Free sample: A customer says: "We want AI for our support team." What do you do in the first meeting?
What is inside one question
A real question from the Inference Engineering pack, exactly as the pack has it. Every question has these parts.
Inference Engineering · KV cache · mid
Derive the KV cache size formula and work it out for Llama 3 70B.

Hand-drawn matrices showing per-layer K and V caches of n by 1,024 values, then the arithmetic 2 x 80 x 8 x 128 x 2 = 327,680 bytes per token and 1.34 GB for 4,096 tokens.
The question
Worded the way it is asked in the room, marked with its level.
Why it is asked
Every capacity plan starts with this formula. The interviewer checks each factor and that you use KV heads, not query heads.
The full answer
KV bytes per token = 2 x layers x KV heads x head dimension x bytes per value, which for Llama 3 70B in BF16 (2 bytes per number) is 2 x 80 x 8 x 128 x 2 = 327,680 bytes, about 0.33 MB per token. Read it all
What the interviewer listens for
- 2 x layers x KV heads x head_dim x bytes
- Use KV heads (8), not query heads (64)
- 327,680 bytes per token for Llama 3 70B in BF16
Follow-ups
- How does tensor parallelism split this? Hint: KV heads are divided across GPUs, so with TP=8 each GPU holds one KV head per layer.
- Does the formula hold for DeepSeek-V3? Hint: no; its multi-head latent attention stores a compressed latent, so use its own formula.
Common mistakes
- Using the number of query heads
- Forgetting the factor 2 for K and V
- Mixing GB (10^9 bytes) and GiB (2^30 bytes) in the same calculation
A diagram
At least one per question, drawn to explain it, not to decorate it.
Who it is for, by level
Every question is marked junior, mid, senior or staff. Across the packs on sale:
junior questions
Your first AI or ML role, or moving into one: the definitions and the reasons behind them, said clearly.
mid questions
Two to five years in: how the parts work, how to debug them, and the numbers you should know.
senior questions
You own a system: trade-offs, failure modes, cost and latency, and how you would measure them.
staff questions
You set direction: designs end to end, what you would build first, and what you would refuse to build.
Paying and getting your PDF
India: Razorpay
UPI, cards, netbanking or wallets, in Razorpay's own secure window. Razorpay is a PCI DSS compliant payment gateway, and every payment is verified by its signed confirmation before the pack opens.

Everywhere else: card or PayPal
A Visa, Mastercard, American Express or Maestro card through Razorpay, or your PayPal balance or card through PayPal. The price is in US dollars.
Instant download, yours to keep
The moment the payment is confirmed, the PDF is in My packs. Download it again whenever you like. All sales are final: read the free questions first.
Free sample questions
Five full questions from each pack on sale, with their diagrams. Each one also has its own page.
System Design and Distributed Systems (5 free questions)
- A page calls 100 backend servers in parallel and waits for all of them. Each server is slow only 1% of the time. How often is the page slow, and what can you do about it?
- Design a URL shortener like bit.ly. What are the requirements and the API, what happens when a link is created and when it is clicked, and should the redirect be a 301 or a 302?
- Your call to the payment provider times out. Did the customer pay? How do you design the payment state machine and reconciliation so no money is lost or charged twice?
- Walk me through a UPI person-to-person payment. What do the payer's app, the PSP, the NPCI switch and the two banks each do?
- You must move a 600-million-row orders table from MySQL to DynamoDB, where data is modeled around access patterns instead of joins. How do you migrate with no downtime and prove the new model answers every query?
Free sample 1 · Latency and throughput · mid
A page calls 100 backend servers in parallel and waits for all of them. Each server is slow only 1% of the time. How often is the page slow, and what can you do about it?

Why it is asked: This is the classic tail-at-scale question. It tests whether you can turn a per-server percentile into a user-facing probability and know the mitigations.
What the interviewer listens for
- P(page slow) = 1 - 0.99^100, about 63%
- Fan-out turns a 1% tail into the common case
- Hedged requests, partial results and fewer fan-out calls
- Budget the extra load that hedging creates
Follow-ups the interviewer may ask
- When should the hedge fire? Hint: around the p95 latency, so you only duplicate the slowest few percent.
- Why can hedging make things worse? Hint: if the slowness is caused by overload, duplicates add more load; cap the hedge rate.
Common mistakes
- Answering '1%' because each server is slow 1% of the time.
- Retrying immediately everywhere, which multiplies load during an incident.
Free sample 2 · Classic system design problems · junior
Design a URL shortener like bit.ly. What are the requirements and the API, what happens when a link is created and when it is clicked, and should the redirect be a 301 or a 302?

Why it is asked: The classic warm-up design. It checks that you can state requirements, size the system, and build a fast read path, plus one real HTTP detail.
What the interviewer listens for
- Read-heavy: the redirect path is the one to optimize
- Numbers: about 12 writes/s and 1,157 redirects/s on average
- Code is the primary key; Redis in front of the database
- 301 is cached by browsers; 302 keeps analytics and edits working
Follow-ups the interviewer may ask
- How do you support custom aliases? Hint: insert the alias as the code with the same unique constraint; reject it if taken.
- How do you stop people using it to spread malware? Hint: check URLs against a blocklist on create and on a schedule, and rate limit link creation.
Common mistakes
- Writing click analytics synchronously in the redirect path.
- Choosing 301 for speed without realizing it breaks click counts and link edits.
Free sample 3 · Classic system design problems · senior
Your call to the payment provider times out. Did the customer pay? How do you design the payment state machine and reconciliation so no money is lost or charged twice?

Why it is asked: Unknown outcomes are the hardest part of payments. Candidates who mark a timeout as failed cause double charges when the customer pays again.
What the interviewer listens for
- Timeout means unknown, not failed
- Forward-only states with conditional updates
- Resolve with status checks, same-key retries and webhooks
- Daily reconciliation against the settlement file
Follow-ups the interviewer may ask
- What if the provider has no status API? Hint: rely on the same-key retry and the webhook, and keep the payment UNKNOWN until reconciliation.
- How do you stop the customer paying twice meanwhile? Hint: block a new attempt for the same order while one payment is UNKNOWN, and show its status.
Common mistakes
- Treating a timeout as a failure and letting the customer retry with a new key.
- Allowing any state to overwrite any other, so a late, wrong event can undo a success.
Free sample 4 · Indian product design problems · mid
Walk me through a UPI person-to-person payment. What do the payer's app, the PSP, the NPCI switch and the two banks each do?

Why it is asked: UPI is the payment system most Indian candidates use every day, so interviewers at payment companies and banks expect you to know who owns each step and who actually holds the money.
What the interviewer listens for
- The app holds no money; banks debit and credit, NPCI only switches messages
- The payee's PSP resolves the VPA to an account and a name
- The UPI PIN is encrypted on the phone and verified by the payer's bank
- Debit first, then credit, then the final status to both PSPs
- P2P payments are push-only since October 2025
Follow-ups the interviewer may ask
- What happens if the beneficiary bank does not answer after the debit? Hint: the payment becomes pending (or deemed approved, treated as successful), status checks follow, and an amount that cannot be credited must be reversed by T+1 (the next day).
- How can one app serve customers of hundreds of banks? Hint: the app talks only to its PSP; NPCI routes each message to the right bank, so the app never connects to the customer's bank directly.
- Why does the payer see the payee's name before paying? Hint: the address check lets the payer catch a wrong VPA before any money moves.
Common mistakes
- Saying the UPI app or NPCI holds the money; it stays in bank accounts the whole time.
- Saying the app checks the UPI PIN; it is encrypted on the phone and checked by the payer's bank.
- Describing a P2P collect request as a normal flow; it was stopped in October 2025.
Free sample 5 · Senior and staff trade-offs · staff
You must move a 600-million-row orders table from MySQL to DynamoDB, where data is modeled around access patterns instead of joins. How do you migrate with no downtime and prove the new model answers every query?

Why it is asked: Moving between data models is harder than copying rows. Teams that copy MySQL tables one-to-one into DynamoDB find that half their queries have no key.
What the interviewer listens for
- Start from access patterns and their rates
- Keys and indexes per query; copy into the order what MySQL joined (denormalize)
- CDC before throttled backfill; newer versions win
- Shadow-read and diff per access pattern
- Joins and scans move to the warehouse
Follow-ups the interviewer may ask
- How do you keep the copied address in orders correct? Hint: it should be a snapshot of the address used for that order, so it never needs updating.
- What if one restaurant chain writes thousands of orders per second? Hint: one partition key takes about 1,000 writes per second, so split a hot key (RESTAURANT#ID#0..9) and read all parts; 100,000 orders for one customer is fine, because the sort key and a limit read only the newest page.
Common mistakes
- Copying the MySQL tables one to one into DynamoDB and expecting the same queries to work.
- Checking row counts only, instead of comparing the answers to each real query.
AI Engineering (LLM applications) (5 free questions)
- What do temperature and top-p control, and what values would you use for data extraction versus brainstorming?
- What is hybrid search, and how do you merge keyword and vector results with Reciprocal Rank Fusion?
- Users ask "list all X" questions and RAG returns only five items. Why, and what do you do?
- How do you check that an LLM judge agrees with human reviewers?
- Cut the cost of an LLM feature serving 10 million requests a day by 60% without hurting quality. Walk through your plan.
Free sample 1 · LLM application basics · junior
What do temperature and top-p control, and what values would you use for data extraction versus brainstorming?

Why it is asked: Shows whether you know how sampling (picking the next token by its probability) works and can match the settings to the task instead of copying defaults.
What the interviewer listens for
- Temperature reshapes the list of probabilities; top-p cuts off the unlikely end
- Temperature 0 is greedy: always the top token
- Extraction: temperature near 0. Brainstorming: about 0.8 to 1.0 with top-p 0.9 to 0.95
- Tune one setting at a time
- Low temperature gives consistency, not correctness
Follow-ups the interviewer may ask
- What is top-k, and how is it different from top-p? Hint: top-k keeps a fixed number of tokens; top-p keeps a variable number based on total probability.
- Why might high temperature produce broken JSON? Hint: unlikely tokens such as a stray character get sampled more often.
- How would you pick the best temperature for a feature? Hint: run the eval set at a few values and compare quality and variety.
Common mistakes
- Saying temperature controls creativity without explaining the mechanism
- Raising both temperature and top-p together and not knowing which one helped
- Believing temperature 0 removes hallucination
Free sample 2 · Retrieval · mid
What is hybrid search, and how do you merge keyword and vector results with Reciprocal Rank Fusion?

Why it is asked: Hybrid search is standard in production RAG. The interviewer wants the RRF formula and why it uses ranks.
What the interviewer listens for
- Run BM25 and vector search, then fuse
- RRF score is the sum of 1 / (k + rank), k about 60
- Uses ranks, so no score normalization
- Documents found by both lists rise
- Usually followed by a reranker
Follow-ups the interviewer may ask
- What happens if a document appears in only one list? Hint: it gets one term, so it can still rank well if it is near the top of that list.
- When would you prefer a weighted score sum? Hint: when you have labeled data to tune the weights and can re-tune them over time.
Common mistakes
- Adding raw BM25 and cosine scores together
- Assuming hybrid always helps without measuring
Free sample 3 · Retrieval · senior
Users ask "list all X" questions and RAG returns only five items. Why, and what do you do?

Why it is asked: Tests whether you understand that top-k search is a ranking tool, not a complete query, and whether you can route aggregation questions to the right kind of index.
What the interviewer listens for
- Top-k is a ranking with a fixed cap, so it cannot answer "all" questions
- Detect list and count intent and route it differently
- Extract entities into a structured store at ingestion and query with SQL or filters
- Score item recall on a list-question eval set
- Tell the user how many items exist
Follow-ups the interviewer may ask
- How would you detect list intent? Hint: a small classifier or the router prompt, trained on logged queries, with a fallback when unsure.
- What if the criteria are fuzzy, such as "all incidents caused by config changes"? Hint: filter by metadata, then a map-reduce pass of the LLM over every candidate document.
- Why not just set k = 200? Hint: cost, latency, lost in the middle, and still a cap.
Common mistakes
- Raising k and calling it fixed
- Trusting the model to say the list is incomplete
- Measuring with answer relevance instead of item recall
Free sample 4 · LLM-as-judge and online evals · mid
How do you check that an LLM judge agrees with human reviewers?

Why it is asked: The interviewer wants to know if you treat the judge as a model that must itself be tested, and whether you know why raw agreement is a misleading number.
What the interviewer listens for
- Human labels on real traces, same rubric as the judge
- Separate dev and test splits so the judge prompt is not overfit
- True positive and true negative rates, not raw agreement
- Cohen's kappa corrects for chance agreement
- Re-validate after any judge model or prompt change
Follow-ups the interviewer may ask
- Can you correct the judge's pass rate using these numbers? Hint: true pass rate = (observed pass rate + TNR - 1) / (TPR + TNR - 1).
- What if two humans disagree with each other? Hint: measure human-human agreement first; the judge cannot be expected to beat it.
- How many labeled cases do you need? Hint: enough failures to estimate TNR, so aim for at least 30 to 50 failing cases.
Common mistakes
- Reporting 90% agreement on a dataset where 90% of cases pass
- Tuning the judge prompt on the same cases used to report its accuracy
- Letting the judge define the rubric instead of a domain expert
Free sample 5 · Cost and latency · staff
Cut the cost of an LLM feature serving 10 million requests a day by 60% without hurting quality. Walk through your plan.

Why it is asked: A staff-level cost question: can you find where the money goes, order the levers by risk, and protect quality with evals while you cut?
What the interviewer listens for
- Measure input and output token spend before choosing levers
- Order savings steps by risk: caching and trimming before model changes
- Show the arithmetic and leave margin above the target
- Gate each step with evals and roll routing out as an experiment
Follow-ups the interviewer may ask
- How do you decide which requests are easy? Hint: a classifier or rules trained on cases where the small model matched the large one on your eval set.
- What would you not cut? Hint: safety checks and the context the answer depends on.
Common mistakes
- Switching everything to a cheaper model first, with no quality gate
- Ignoring output tokens, which are often priced several times higher than input
GenAI and LLM Engineering (5 free questions)
- Why are LLMs bad at counting letters or reversing a word?
- Write out scaled dot-product attention with the shape of every tensor.
- How does speculative sampling keep exactly the target model's distribution?
- What is GRPO, and how do verifiable rewards train reasoning models?
- Design a system that answers questions from 300-page contracts accurately.
Free sample 1 · Tokenization · junior
Why are LLMs bad at counting letters or reversing a word?

Why it is asked: A classic check that you understand the model sees token ids, not characters, and that you know practical workarounds.
What the interviewer listens for
- The model sees token ids, not letters
- 'strawberry' is 3 tokens in o200k_base: st, raw, berry
- Letter knowledge per token is learned indirectly
- Fix: spell out with separators, or use code tools
Follow-ups the interviewer may ask
- Why are LLMs weak at multiplying large numbers? Hint: digits are chunked into tokens unevenly, and carrying needs exact step-by-step work.
- How do you make letter counting reliable? Hint: call a code tool or force one token per character.
- Would a character-level model fix this? Hint: yes for spelling, at the cost of much longer sequences.
Common mistakes
- Saying the model is just 'bad at math'
- Assuming the word is one token or one token per letter
- Trusting the model for exact string validation in production
Free sample 2 · Self-attention math · mid
Write out scaled dot-product attention with the shape of every tensor.

Why it is asked: Tests precision: can you write the formula and track every shape, including heads and GQA, the way you would when debugging a kernel?
What the interviewer listens for
- softmax(QK^T / sqrt(d_k) + mask) V
- Q is [B, h, n, d_k]; K and V use the number of KV heads
- Scores are [B, h, n, n]: quadratic in sequence length
- Softmax is over the key axis, one distribution per query
- Heads are merged back to [B, n, d] and projected by W_O
Follow-ups the interviewer may ask
- What changes for decode? Hint: Q has one row; scores are [B, h, 1, context].
- Where does d_v enter? Hint: V's head size; usually equal to d_k but it does not have to be.
- How large is the score tensor for 32 layers if kept for backward? Hint: about 137 GB at 8K, which is why it is recomputed.
Common mistakes
- Softmax over the query axis instead of the key axis
- Scaling by d_k instead of sqrt(d_k)
- Giving K and V the query head count in a GQA model
Free sample 3 · Decoding · senior
How does speculative sampling keep exactly the target model's distribution?

Why it is asked: Speculative decoding is a standard speed-up; senior candidates must show why it is lossless, not just that it is fast.
What the interviewer listens for
- Accept with min(1, p/q); on reject sample from norm(max(0, p - q))
- Output distribution equals the target's exactly
- Target checks all drafts in one forward pass
- Bonus token when all drafts pass
- Expected tokens per pass (1 - alpha^(gamma+1)) / (1 - alpha)
Follow-ups the interviewer may ask
- Why is the verification pass cheap? Hint: decode is memory-bound; scoring gamma + 1 positions reads the weights once.
- What happens at high temperature? Hint: draft and target disagree more, acceptance falls, speed-up shrinks.
- Why does speculative decoding help less at large batch sizes? Hint: decode becomes compute-bound, so verifying extra draft tokens is no longer free; draft-free variants such as Medusa heads and EAGLE reduce the overhead.
Common mistakes
- Saying speculative decoding approximates the target and loses quality
- Accepting only exact matches when sampling, which changes the distribution
Free sample 4 · Alignment: RLHF and DPO · senior
What is GRPO, and how do verifiable rewards train reasoning models?

Why it is asked: GRPO with checkable rewards is how many recent reasoning models are trained. The interviewer wants the group-relative advantage and the practical failure modes.
What the interviewer listens for
- Group of samples per prompt; advantage = (r - group mean) / group std
- No value model, so less memory and less tuning than PPO
- Verifiable rewards: checkers for answers, tests and format
- All-same groups give zero signal; pick medium-difficulty prompts
- Harden the checker and watch length and entropy
Follow-ups the interviewer may ask
- Why does group normalization work as a baseline? Hint: the group mean estimates the expected reward for that prompt, which is what the value model approximated.
- How large should G be? Hint: larger groups give better baselines but cost more generation; 8 to 64 is common, measure it.
- Where does the wall-clock time go in GRPO training? Hint: rollout generation; teams run a fast inference engine for rollouts, sync weights to it, and watch for entropy collapse.
Common mistakes
- Saying the original GRPO has no KL term (it has one in the loss; some later recipes such as DAPO drop it on purpose)
- Training on prompts the model always solves or never solves
- Trusting a regex answer checker without testing it
Free sample 5 · Context length and hallucination · staff
Design a system that answers questions from 300-page contracts accurately.

Why it is asked: Tests whether you can turn a vague accuracy goal into a pipeline with structure-aware ingestion, grounded citations, abstention and a real evaluation plan, instead of saying 'use a long context model'.
What the interviewer listens for
- Clause-level chunking with section paths, not fixed-size chunks
- Defined terms and cross-references must be pulled into context
- Hybrid retrieval plus reranking, answers cite clause ids
- A verbatim quote check and an explicit 'not found' path
- Golden set built with lawyers; measure citation precision and abstention
Follow-ups the interviewer may ask
- Why not just use a 1M-token context model? Hint: cost per question, latency, weaker use of mid-context facts, and no citation guarantee; keep it as a baseline in the eval.
- How do you handle amendments? Hint: store document version and date, retrieve across the base and amendments, and let the newest amendment override with both cited.
- How do you handle tables like payment schedules? Hint: parse tables to structured rows and answer numeric questions from the table, not from flattened text.
Common mistakes
- Fixed 512-token chunks that cut clauses in half and lose the section number
- Trusting the model's answer without checking that the cited text exists
- Evaluating only on questions that have answers, so the model never learns to abstain
Agentic AI Engineering (5 free questions)
- Describe the basic agent loop.
- What are pass@k and pass^k, and why do they matter for agents?
- How does prompt injection become dangerous once the agent has tools?
- Design the security architecture for an agent that can read and send company email.
- Design a customer support agent for an e-commerce company.
Free sample 1 · Agent foundations · junior
Describe the basic agent loop.

Why it is asked: Checks that you understand the core mechanism every agent framework implements, including how it ends.
What the interviewer listens for
- Context in, decision out: tool call or final answer
- Your code executes tools and appends results
- Stops on final answer or on step, budget or time limits
- Context grows each turn, raising cost and latency
Follow-ups the interviewer may ask
- Where do you add a human approval? Hint: between the model's tool call and your code executing it.
- What happens to errors? Hint: return them to the model as the tool result so it can try another way.
Common mistakes
- Describing the loop without any stop condition
- Saying the model executes the tools
Free sample 2 · Agent evals · mid
What are pass@k and pass^k, and why do they matter for agents?

Why it is asked: These two metrics measure opposite things and are often confused. The interviewer checks the definitions, the math, and which one matches the product.
What the interviewer listens for
- pass@k: at least one of k succeeds, 1 - (1 - p)^k
- pass^k: all k succeed, p^k
- At p = 0.75, k = 8: pass^k is only 10%
- Compute per task, then average
- pass^k matches user-facing reliability
Follow-ups the interviewer may ask
- What does a big gap between pass@1 and pass^8 tell you? Hint: the agent can do the task but is inconsistent; look for flaky steps.
- Is pass@k useful at all for agents? Hint: yes, when a verifier, such as unit tests, can pick the good attempt.
Common mistakes
- Quoting a pass@k number as if it were the user's success rate
- Computing p^k from the average success rate across tasks
Free sample 3 · Security, permissions and sandboxing · mid
How does prompt injection become dangerous once the agent has tools?

Why it is asked: The interviewer checks that you can trace the full attack path, from injected text to a harmful tool call, and name defenses that do not depend on the model behaving.
What the interviewer listens for
- Injection moves from words to actions
- Indirect injection hides in emails, pages and tool results
- Data theft (exfiltration) through sends, links and images
- One control in code per channel: sends, links, writes, memory, spending
Follow-ups the interviewer may ask
- How can a rendered image leak data? Hint: the image URL carries data in its query string and the browser fetches it automatically.
- Is an injection classifier enough? Hint: no, attackers rephrase; use it only as an extra layer.
Common mistakes
- Assuming only the user's own message can contain an attack
- Defending only with "ignore instructions in emails" in the prompt
Free sample 4 · Security, permissions and sandboxing · staff
Design the security architecture for an agent that can read and send company email.

Why it is asked: This tests whether you can design trust boundaries around a tool that is both a source of untrusted input and an exfiltration channel, and roll it out safely across a company.
What the interviewer listens for
- Inbound email is untrusted input; send is an exfiltration channel
- Delegated, mailbox-scoped identity with tokens held outside the model
- Quarantined reader passes typed fields only; free text crosses as an opaque reference
- Deterministic send gateway: recipient rules, DLP, rate limits, approval
- Staged rollout: drafts, internal send, external with approval
Follow-ups the interviewer may ask
- Why not a single service account with access to all mailboxes? Hint: one injection then reaches every mailbox; per-user delegation limits the blast radius.
- How do you stop approval fatigue? Hint: approve only external or unusual sends, show a clear diff, and track rubber-stamp signals like approval time.
- How do you handle a legal hold or deletion request? Hint: the agent's logs and memory follow the same retention policy as the mailbox.
Common mistakes
- Letting the planner read raw email or a free-text summary of it
- Putting send rules in the system prompt instead of a gateway
- Using one broad service account for every user
Free sample 5 · Agent system design · senior
Design a customer support agent for an e-commerce company.

Why it is asked: A classic agent design loop: the interviewer checks scoping, tool permissions with limits, escalation, and how you measure resolution without hurting customers.
What the interviewer listens for
- Scope to top ticket types, hand off the rest
- Router to narrow skills with their own tools
- Refund limits in code, identity check before account actions
- Policy retrieval with versioned citations
- Replay past tickets; staged rollout by ticket type
Follow-ups the interviewer may ask
- How do you stop refund fraud through the agent? Hint: per-customer limits, velocity checks, and the same fraud signals the human team uses.
- What is your north-star metric? Hint: resolved without human and without reopen within 7 days, next to satisfaction.
Common mistakes
- One general agent with every tool
- Refund limits written only in the prompt
- Measuring deflection (tickets kept away from humans) instead of real resolution
Inference Engineering (5 free questions)
- What happens, step by step, when an LLM server handles one request?
- Derive the KV cache size formula and work it out for Llama 3 70B.
- What is PagedAttention?
- When does speculative decoding stop helping or make things worse?
- Design a service to serve Llama 3 70B at 10 QPS with latency targets.
Free sample 1 · Inference fundamentals · junior
What happens, step by step, when an LLM server handles one request?

Why it is asked: Checks that you know the full path of a request, not only the model call, and can say where time and memory go.
What the interviewer listens for
- Tokenize with the chat template before anything reaches the GPU
- Admission depends on free KV cache memory, not only on a queue slot
- Prefill builds the KV cache and gives the first token in one pass
- Decode adds one token per step and shares each step with other requests
- Stop conditions and freeing KV blocks are part of the lifecycle
Follow-ups the interviewer may ask
- Where does most of the wall-clock time go for a long answer? Hint: the decode loop, one memory-bound step per token.
- What happens if the client disconnects mid-answer? Hint: the server should abort the sequence and free its KV blocks at once.
- Where can prefix caching help? Hint: it skips prefill for a shared prompt start that is already in the KV cache.
Common mistakes
- Describing the model as producing the whole answer in one pass
- Forgetting tokenization, sampling and detokenization, which can add real CPU time
- Ignoring the queue, which is often the biggest part of time to first token under load
Free sample 2 · KV cache · mid
Derive the KV cache size formula and work it out for Llama 3 70B.

Why it is asked: Every capacity plan starts with this formula. The interviewer checks each factor and that you use KV heads, not query heads.
What the interviewer listens for
- 2 x layers x KV heads x head_dim x bytes
- Use KV heads (8), not query heads (64)
- 327,680 bytes per token for Llama 3 70B in BF16
- Multiply by tokens and by concurrent sequences
Follow-ups the interviewer may ask
- How does tensor parallelism split this? Hint: KV heads are divided across GPUs, so with TP=8 each GPU holds one KV head per layer.
- Does the formula hold for DeepSeek-V3? Hint: no; its multi-head latent attention stores a compressed latent, so use its own formula.
Common mistakes
- Using the number of query heads
- Forgetting the factor 2 for K and V
- Mixing GB (10^9 bytes) and GiB (2^30 bytes) in the same calculation
Free sample 3 · PagedAttention and prefix caching · mid
What is PagedAttention?

Why it is asked: PagedAttention is the memory model behind vLLM and most engines since; you should explain it with the operating-system analogy and the block table.
What the interviewer listens for
- KV split into fixed blocks (16 tokens by default in vLLM)
- A per-sequence block table maps logical blocks to any physical block
- Waste limited to the last partial block
- Enables sharing: prefix caching and copy-on-write
Follow-ups the interviewer may ask
- What happens when no free block is left? Hint: the scheduler preempts a sequence, then swaps or recomputes it later.
- Why does attention need a special kernel? Hint: it must gather keys and values from non-contiguous blocks using the table.
Common mistakes
- Saying PagedAttention makes the attention math cheaper; it changes memory layout, not FLOPs
- Confusing it with CPU paging to disk
Free sample 4 · Speculative decoding · senior
When does speculative decoding stop helping or make things worse?

Why it is asked: Speculative decoding is often switched on blindly. The interviewer checks that you know it spends idle GPU compute, and that the idle compute disappears at high batch or low acceptance.
What the interviewer listens for
- It spends spare compute that exists only while decode is memory-bound
- Model: 2.80x up to batch 32, 1.42x at 128, 0.74x at 256
- Low acceptance or an expensive draft can make it slower even at batch 1
- Draft memory reduces KV room and so maximum batch
- Gate it by measured batch size and acceptance rate
Follow-ups the interviewer may ask
- Why does the curve fall near batch 59 and not 295? Hint: each sequence verifies 5 tokens, so the target processes 5 times the tokens per step.
- Does speculation help time to first token? Hint: no, it only speeds up decode; the draft also has to process the prompt.
- How would you adapt it at runtime? Hint: shorten the draft or turn it off as the running batch grows.
Common mistakes
- Benchmarking at batch 1 and enabling it for a busy multi-tenant endpoint
- Ignoring the draft's own memory and KV cache
- Assuming acceptance measured on one dataset holds for all traffic
Free sample 5 · System design scenarios · staff
Design a service to serve Llama 3 70B at 10 QPS with latency targets.

Why it is asked: This is the classic staff inference design question. The interviewer wants the binding constraint found first, Little's law applied with the real step time, memory and compute checked, and redundancy that survives a node loss.
What the interviewer listens for
- Find the binding constraint: prefill takes 36% of the replica at 10 QPS
- Little's law with the real step (9.5 to 16.8 ms), not the 40 ms SLO: 29 to 51 in flight
- 70.6 GB FP8 weights + about 22 GB KV fits easily in 320 GB
- Capacity about 15.9 QPS real per replica; deploy two in separate failure domains
- Continuous batching, chunked prefill, admission control, FP8 evals, load test
Follow-ups the interviewer may ask
- Could TP=2 work? Hint: memory yes (35.3 GB of weights per GPU plus KV), but prefill would take 72% of its compute and real capacity falls to about 5.8 QPS.
- What if outputs grow to 1,000 tokens? Hint: decode work and time in system roughly triple; recompute capacity and KV before adding replicas.
- Why chunked prefill? Hint: a long prompt's prefill otherwise blocks everyone's decode steps and breaks TPOT.
Common mistakes
- Using the 40 ms TPOT target as the step time in Little's law
- Forgetting that prefill compute, not memory, binds this workload
- Putting both replicas on one node and calling it redundant
ML Engineering and MLOps (5 free questions)
- A model scores 95% accuracy offline but users say it is useless. What do you check first?
- How do you train on a dataset that does not fit in memory?
- A long distributed training job dies at hour 20. How do you make training fault tolerant?
- How does request batching on a GPU trade latency for throughput?
- An online model metric dropped 8% overnight. How do you debug it?
Free sample 1 · The ML lifecycle · mid
A model scores 95% accuracy offline but users say it is useless. What do you check first?

Why it is asked: A classic debugging question: the interviewer wants a calm, ordered checklist starting with the most likely cause.
What the interviewer listens for
- Accuracy on an imbalanced label can equal the do-nothing baseline.
- Recall, precision and balanced accuracy expose it.
- Leakage and training-serving skew are the next suspects.
- Check that the test set looks like real usage.
- Read real failures before touching the model.
Follow-ups the interviewer may ask
- Which metric would you report for a 1% positive rate? Hint: precision and recall at the operating threshold, or average precision (area under the precision-recall curve).
- How do you detect leakage quickly? Hint: look for a single feature with near-perfect importance, and check feature timestamps against the prediction time.
- How do you compare live inputs with training inputs? Hint: per-feature statistics or PSI (population stability index, a score of how far a distribution has moved) between the training sample and a recent serving sample.
Common mistakes
- Trusting accuracy without checking the class balance.
- Retraining a bigger model before ruling out data problems.
- Asking users for vague feedback instead of reading specific failures.
Free sample 2 · Training at scale · junior
How do you train on a dataset that does not fit in memory?

Why it is asked: Real datasets are larger than RAM. The interviewer checks that you know streaming, sharding and how shuffling still works.
What the interviewer listens for
- Shard the data into many files on disk or object storage and stream them.
- Worker processes read and decode ahead of the GPU (prefetching).
- Shuffle shard order each epoch plus a shuffle buffer; only the buffer lives in RAM.
- For classic ML: partial_fit, or a distributed engine such as Spark or Dask.
- Mix rows when writing shards; sorted shards defeat a small buffer.
Follow-ups the interviewer may ask
- How big should the shuffle buffer be? Hint: large compared to how many similar rows sit together in a shard; mixing at write time lets it be smaller.
- The GPU sits idle waiting for data. What do you do? Hint: more loader workers, prefetch, pre-decoded or smaller formats, faster storage.
- How do you resume mid-epoch after a crash? Hint: save the shard list and position (or the sampler state) in the checkpoint.
Common mistakes
- Loading the whole dataset into a pandas DataFrame and adding RAM until it fits.
- Streaming files in a fixed order with no shuffle, so the model sees one class or one day at a time.
- Using one huge file, which cannot be read in parallel or split across workers.
Free sample 3 · Training at scale · senior
A long distributed training job dies at hour 20. How do you make training fault tolerant?

Why it is asked: Jobs on many GPUs fail often, from bad nodes to network faults. The interviewer checks that you save the full training state safely and restart without a human.
What the interviewer listens for
- Checkpoint the full state: weights, optimizer, scheduler, step, RNG states, data position.
- Atomic save: temporary files plus a manifest written last, keep the last few checkpoints.
- Automatic restart of all ranks by the scheduler, and resume-from-latest on every start.
- Interval from Young's rule, sqrt(2 x save time x MTBF): about 76 minutes for a 2-minute save and daily failures.
- Prove it with a failure drill, not by assuming it works.
Follow-ups the interviewer may ask
- How do you keep saving from stalling the GPUs? Hint: copy state to CPU memory, then upload in a background thread; shard the save across ranks.
- What if the data loader position is not saved? Hint: the model sees some samples twice and skips others; save the sampler state or the epoch and step offset.
- How do you handle a node that keeps failing? Hint: health-check nodes before start, drain the bad one, and restart on a spare.
Common mistakes
- Saving only the model weights, then restarting with a fresh optimizer and learning-rate schedule.
- Overwriting one checkpoint file in place, so a crash during save destroys the only copy.
- Saving to local disk on the node that just died.
Free sample 4 · Serving and inference · mid
How does request batching on a GPU trade latency for throughput?

Why it is asked: Batching is the main lever for GPU serving cost. The interviewer checks that you know why it works, where it stops helping, and how to tune it against a latency target.
What the interviewer listens for
- Fixed per-batch cost is shared, so throughput rises with batch size.
- Batch time and queue wait rise, so per-request latency grows.
- Gains flatten near the per-item limit (here 2,000 per second).
- Dynamic batching: max batch size plus max wait; tune against p99.
- LLMs use continuous batching at each generation step.
Follow-ups the interviewer may ask
- Why does batching help less on a CPU? Hint: less parallel hardware sits idle at batch 1, so the fixed cost share is smaller; it can still help.
- What limits batch size on a GPU? Hint: memory for activations (and, for LLMs, the KV cache that stores attention values for the text so far) and the latency target.
- Different input lengths in one batch? Hint: padding wastes compute; bucket by length or use continuous batching.
Common mistakes
- Maximizing batch size without a latency target.
- Forgetting the queue wait while a batch fills.
- Expecting throughput to grow forever with batch size.
Free sample 5 · ML system design · staff
An online model metric dropped 8% overnight. How do you debug it?

Why it is asked: Production incidents test judgment under pressure. The interviewer looks for an ordered search that rules out cheap explanations first and restores service quickly.
What the interviewer listens for
- Verify the metric pipeline before touching the model.
- Correlate with deploys; roll back first if one lines up.
- Slice to localize the drop.
- Check feature health, freshness and skew.
- External causes, then the model; add a check afterward.
Follow-ups the interviewer may ask
- How do you know if it is seasonal? Hint: compare with the same weekday last week and the same period last year, and with a holdout group.
- No deploy, no segment, inputs look fine: what next? Hint: look at upstream product changes and traffic mix, then compare model versions offline on yesterday's data.
- How do you prevent a repeat? Hint: automatic checks on null rates, freshness and per-segment metrics, with alerts tied to deploys.
Common mistakes
- Retraining immediately without knowing the cause.
- Debugging the model for hours while a recent deploy sits un-rolled-back.
- Trusting the dashboard without checking the logging pipeline.
Data Science (5 free questions)
- You need to show delivery times for 20 cities. Would you use histograms, box plots, violin plots or ECDFs, and why?
- A test is 99% accurate and you test positive. What is the chance you have the disease?
- What share of first-time buyers make a second purchase within 30 days? Write the SQL.
- How would you forecast daily orders for the next four weeks, and how do you know the forecast is any good?
- A coupon A/B test shows a small average lift. How do you find which users the coupon actually works for, and who should get it next time?
Free sample 1 · Descriptive statistics · junior
You need to show delivery times for 20 cities. Would you use histograms, box plots, violin plots or ECDFs, and why?

Why it is asked: Choosing a chart is choosing what the reader can see. The interviewer checks that you know what each chart hides, not only how to draw it.
What the interviewer listens for
- Box plots compare many groups at once but can hide two peaks.
- Histograms show shape but depend on the bin width.
- ECDFs need no bins and show every percentile.
- Small multiples (a grid of small charts) with shared axes, and the sample size per city.
Follow-ups the interviewer may ask
- How would you order the 20 boxes? Hint: by median, or by p90 if the slow tail is the business problem, never alphabetically.
- A violin plot shows a bump for a city with 30 orders. Do you trust it? Hint: no; smoothing invents shape with few points, so show the raw points.
- What would you show a non-technical audience? Hint: the median and p90 per city, plus the share of orders later than the promised time.
Common mistakes
- Trusting a box plot alone when the shape matters.
- Comparing histograms drawn with different bins or axes.
- Hiding sample sizes, so a tiny city looks as reliable as a big one.
Free sample 2 · Probability · mid
A test is 99% accurate and you test positive. What is the chance you have the disease?

Why it is asked: This is the classic base-rate question; it tests whether you ask for the prevalence instead of answering 99%.
What the interviewer listens for
- Ask for the base rate and what 'accurate' means.
- Count true and false positives in a concrete population.
- Prevalence 1%: 99 true vs 99 false positives, so 50%.
- Precision collapses when the positive class is rare.
Follow-ups the interviewer may ask
- How would a second independent positive test change it? Hint: prior 50% becomes 99 x 0.99 / (99 x 0.99 + 99 x 0.01) = 99%.
- What metric would you show a fraud team? Hint: precision and recall at the operating threshold, at the real fraud rate.
- Why is accuracy useless here? Hint: a test that says 'healthy' to everyone is 99% accurate at 1% prevalence.
Common mistakes
- Answering 99%.
- Not asking for prevalence.
- Treating sensitivity and P(disease | positive) as the same thing.
Free sample 3 · SQL · senior
What share of first-time buyers make a second purchase within 30 days? Write the SQL.

Why it is asked: Repeat rate is a core retention metric for any commerce app. The interviewer checks that you count users rather than orders, measure the window from the first purchase, and notice that recent buyers have not had 30 days to come back.
What the interviewer listens for
- One row per user: first order (ROW_NUMBER = 1) plus the next order date (LEAD or a self-join).
- The 30-day window starts at each user's first order.
- Count users, not orders.
- Right-censoring: drop users whose first order is within 30 days of the data end (35.3% vs 32.9% here).
Follow-ups the interviewer may ask
- Two orders placed 5 minutes apart: is that a repeat? Hint: decide on a rule, such as a second order on a later day or a gap of more than an hour, and write it into the metric definition.
- How would you use the users you dropped? Hint: a survival curve (Kaplan-Meier) uses each user's partial follow-up instead of discarding it.
- How do you show the trend? Hint: the same query grouped by first-order month, with the last month flagged as incomplete.
Common mistakes
- Dividing by orders instead of first-time buyers.
- Including buyers whose 30-day window has not finished, which drags the rate down.
- Excluding only the late buyers who did not return, which pushes it up.
Free sample 4 · Time series and forecasting · senior
How would you forecast daily orders for the next four weeks, and how do you know the forecast is any good?

Why it is asked: Forecasts drive staffing, inventory and rider supply. The interviewer wants a baseline, an honest backtest and a range, not just the name of a model.
What the interviewer listens for
- Seasonal naive (same weekday last week) is the bar to beat.
- Rolling-origin backtest, never a random split.
- WAPE, bias and error by horizon, not MAPE on low-volume days.
- Give prediction intervals; plans use the high end.
Follow-ups the interviewer may ask
- How do you handle Diwali? Hint: holiday features built from earlier years, and a separate error check on holiday days.
- Why can gradient boosting on raw levels not forecast growth? Hint: trees only predict values seen in training, so model differences or ratios.
- How many backtest origins do you need? Hint: enough to cover different seasons, for example one every four weeks over the last six months.
Common mistakes
- A random train-test split on time series.
- No baseline, so nobody knows whether the model adds anything.
- Reporting one number with no interval.
Free sample 5 · Product sense and metrics case studies · staff
A coupon A/B test shows a small average lift. How do you find which users the coupon actually works for, and who should get it next time?

Why it is asked: Coupons and offers are the biggest controllable spend at many consumer companies. The interviewer checks that you target by the effect of the coupon, not by who is likely to order, and that you prove the rule with money and a new test.
What the interviewer listens for
- An average lift hides persuadables, sure things and lost causes.
- Uplift = outcome with the coupon minus without it, per user.
- Validate on randomized holdout data with an uplift or Qini curve.
- Target where uplift x margin beats the cost; confirm with a new test.
Follow-ups the interviewer may ask
- Why not give coupons to the users most likely to order? Hint: they are mostly sure things; in the simulation that group showed no lift.
- How do you evaluate an uplift model when no user is seen in both arms? Hint: rank randomized holdout users by predicted uplift and compare treatment and control within each rank group (a Qini curve).
- What changes when the coupon budget is fixed? Hint: rank users by predicted profit per coupon and fill the budget from the top.
Common mistakes
- Targeting by the chance to order instead of by uplift.
- Slicing many segments after the test and shipping the best one.
- Shipping a targeting rule without a new randomized test.
Maths for ML and Deep Learning (5 free questions)
- Compute the cosine similarity of a = (3, 4) and b = (4, 3) by hand. What does the result mean?
- A batch of 32 MNIST images goes into a dense layer with 128 units. What are the shapes, and what is the rule for when two matrices can be multiplied?
- A disease affects 1% of people. A test catches 90% of sick people (sensitivity) and wrongly flags 9% of healthy people (false positive rate). You test positive. What is the chance you are sick?
- Why do we not use mean squared error for classification with a sigmoid output? Compare the gradients numerically.
- Compute scaled dot-product attention by hand for two tokens with d_k = 2.
Free sample 1 · Linear algebra: vectors and similarity · junior
Compute the cosine similarity of a = (3, 4) and b = (4, 3) by hand. What does the result mean?

Why it is asked: Cosine similarity is the default score in semantic search (search by meaning, not exact words) and RAG (retrieval-augmented generation, where an LLM first looks up relevant text), and computing it by hand shows you know what it ignores.
What the interviewer listens for
- cos = a·b / (‖a‖‖b‖), range -1 to 1.
- Worked: 24 / 25 = 0.96, angle ≈ 16.26°.
- Scaling a vector does not change its cosine with anything.
- 1 same, 0 unrelated, -1 opposite.
Follow-ups the interviewer may ask
- What is cosine distance? Hint: 1 - cosine similarity, so 0.04 here.
- Can cosine similarity be negative for embeddings? Hint: yes in principle, though many text models rarely produce negative scores for real texts.
- How do you compute it fast for millions of vectors? Hint: normalize once, then it is a dot product, a single matrix multiply.
Common mistakes
- Reporting the dot product (24) as the similarity.
- Thinking 0.96 means '96% of the meaning is shared'; it is the cosine of an angle, not a percentage.
Free sample 2 · Linear algebra: matrices as transformations · mid
A batch of 32 MNIST images goes into a dense layer with 128 units. What are the shapes, and what is the rule for when two matrices can be multiplied?

Why it is asked: Shape errors are the most common bug in model code. The interviewer checks the inner-dimension rule and how frameworks store weights.
What the interviewer listens for
- (m × k)(k × n) = (m × n); inner sizes must match.
- Worked: (32 × 784)(784 × 128) = (32 × 128).
- Bias is broadcast across the batch rows.
- nn.Linear stores W as (out × in) and uses XWᵀ.
Follow-ups the interviewer may ask
- How many parameters does this layer have? Hint: 784 × 128 + 128 = 100,480.
- What shape does a (B × n × d) tensor have after @ (d × d_ff)? Hint: (B × n × d_ff).
- Why put the batch first? Hint: one large matrix multiply per batch keeps the GPU busy.
Common mistakes
- Writing the weight as (128 × 784) and forgetting the transpose in a hand-written layer.
- Flattening images to (784 × 32) and mixing up batch and feature axes.
Free sample 3 · Probability: Bayes' theorem · mid
A disease affects 1% of people. A test catches 90% of sick people (sensitivity) and wrongly flags 9% of healthy people (false positive rate). You test positive. What is the chance you are sick?

Why it is asked: It is the most asked Bayes question. The interviewer checks whether you anchor on the 90% or work through the 1% prior.
What the interviewer listens for
- Use the prior: 1% prevalence.
- 10,000 people: 90 true positives vs 891 false positives.
- P(sick | +) = 90 / 981 ≈ 0.0917.
- A negative is very reassuring: ≈ 0.0011.
Follow-ups the interviewer may ask
- What if prevalence were 10%? Hint: 0.09 / (0.09 + 0.081) ≈ 0.5263.
- Which number should improve to raise the posterior most? Hint: the false positive rate, because the healthy group is 99 times larger.
- What is the specificity here? Hint: 1 - 0.09 = 0.91.
Common mistakes
- Answering 90% (confusing P(+ | sick) with P(sick | +)).
- Answering 91% from the specificity.
Free sample 4 · Information theory: cross-entropy and KL divergence · staff
Why do we not use mean squared error for classification with a sigmoid output? Compare the gradients numerically.

Why it is asked: Tests whether you can derive gradients through the sigmoid and explain a design choice from first principles.
What the interviewer listens for
- MSE gradient carries the factor ŷ(1 - ŷ), which vanishes at saturation (the sigmoid's flat part).
- Cross-entropy gradient is ŷ - y, no vanishing factor.
- Worked at z = -5: -0.9933 vs -0.01321, about 75 times.
- Cross-entropy is convex for logistic regression and is the Bernoulli MLE.
Follow-ups the interviewer may ask
- Does the same hold for softmax? Hint: yes, softmax plus cross-entropy gives gradient q - p with no extra slope factor.
- Is MSE ever used on probabilities? Hint: the Brier score (mean squared error between probabilities and 0/1 labels) is MSE on probabilities, used to evaluate calibration, not usually to train.
- Why compute the loss from logits? Hint: PyTorch's BCEWithLogitsLoss (binary cross-entropy that takes raw scores) uses a stable log-sum-exp form and avoids ln 0.
Common mistakes
- Saying MSE 'cannot' be used, rather than explaining why it trains badly.
- Forgetting the sigmoid slope in the chain rule.
Free sample 5 · Capstone: embeddings and attention by hand · senior
Compute scaled dot-product attention by hand for two tokens with d_k = 2.

Why it is asked: Interviewers at LLM teams ask this to see that you know every step of attention, not just the formula.
What the interviewer listens for
- softmax(QKᵀ/√d_k)V, row by row.
- Worked: weights (0.6698, 0.3302) and (0.5, 0.5).
- Outputs (1.6605, 2.6605) and (2, 3).
- Causal mask uses minus infinity before softmax.
Follow-ups the interviewer may ask
- What changes in cross-attention? Hint: Q comes from one sequence, K and V from another, such as the encoder output.
- Why softmax rather than plain normalization? Hint: it handles negative scores and gives smooth gradients.
- How does the KV cache use this? Hint: during generation, earlier K and V rows are stored and only the new query row is computed.
Common mistakes
- Applying softmax over the whole matrix instead of each row.
- Forgetting the √d_k scaling or dividing by d_k.
Forward Deployed Engineer (5 free questions)
- A customer says: "We want AI for our support team." What do you do in the first meeting?
- The customer's admin offers you a global admin account "to save time". What do you ask for instead, and why?
- Your connector writes tickets into the customer's system. A request timed out, the connector retried, and now there are duplicate tickets. How do you make the writes safe to retry?
- The customer wants RAG over 10 million documents, all behind their firewall. Size it for me on the whiteboard.
- One deployment of your AI platform must serve 50 business units of the same enterprise. How do you design multi-tenancy?
Free sample 1 · Scoping an ambiguous customer problem · mid
A customer says: "We want AI for our support team." What do you do in the first meeting?

Why it is asked: This is the classic FDE scoping question. The interviewer checks that you ask before you build and that you end with a concrete next step.
What the interviewer listens for
- Questions before solutions.
- Users, pain, workflow, data, baseline, constraints.
- Several candidate use cases ranked by value and risk.
- Prefers a human-in-the-loop start.
- Leaves with an owner, a data request and a date.
Follow-ups the interviewer may ask
- The CEO wants a customer-facing chatbot live in a month. Hint: show the risk, offer agent assist first as the path to a chatbot, with the eval data it creates.
- They cannot give you any baseline numbers. Hint: measure it yourself from a ticket export in week one.
Common mistakes
- Demoing a chatbot in the first meeting.
- Leaving without a measurable goal or a next step.
Free sample 2 · Integrating with messy enterprise data · junior
The customer's admin offers you a global admin account "to save time". What do you ask for instead, and why?

Why it is asked: This tests judgment and security hygiene. A good FDE turns down convenient but risky access and asks for something precise.
What the interviewer listens for
- Ask for a dedicated, non-human service account.
- Scope: only the systems, objects and actions the integration needs.
- Reasons: blast radius, clean audit trail, no MFA or leaver breakage.
- Put the request in a reviewable table with an owner and review date.
Follow-ups the interviewer may ask
- The integration later needs write access to one table. What do you do? Hint: request a second, separate grant for that table only, with its reason.
- How do you authenticate the service account without a password? Hint: key pairs, workload identity or OAuth client credentials, with keys stored in a secrets manager.
- Who should own the service account? Hint: a named team on the customer side, so it is reviewed and not orphaned.
Common mistakes
- Accepting admin access because it makes the first demo faster.
- Sharing one service account across several integrations, so audit and revocation lose meaning.
- Forgetting that a Snowflake role also needs USAGE on the warehouse, database and schema.
Free sample 3 · Integrating with messy enterprise data · mid
Your connector writes tickets into the customer's system. A request timed out, the connector retried, and now there are duplicate tickets. How do you make the writes safe to retry?

Why it is asked: Retries are unavoidable over enterprise networks. The interviewer checks that you know a timeout is not a failure and how idempotency fixes duplicates.
What the interviewer listens for
- A timeout is unknown outcome, not failure.
- Idempotency key fixed before the first attempt and reused on every retry.
- Upsert on a unique external ID (ON CONFLICT / MERGE).
- At-least-once delivery plus idempotent consumer gives exactly-once effect.
- Guard against older data overwriting newer data.
Follow-ups the interviewer may ask
- How long should the server keep idempotency keys? Hint: longer than your longest retry window, often 24 hours or more.
- What if the same key arrives with a different body? Hint: reject it with an error; it signals a client bug.
- How do you clean up the duplicates already created? Hint: group by source ID, keep the earliest, merge or close the rest with the customer's approval.
Common mistakes
- Generating a new idempotency key on each retry.
- Turning retries off, which turns duplicates into data loss.
- Search-then-create with several parallel workers, which still races.
Free sample 4 · Mini system-design cases · senior
The customer wants RAG over 10 million documents, all behind their firewall. Size it for me on the whiteboard.

Why it is asked: A classic FDE case: can you turn a vague ask into numbers (chunks, storage, ingest time) quickly and correctly, and do you remember permissions and freshness, not just size?
What the interviewer listens for
- States assumptions before computing.
- Correct chunk, storage and ingest arithmetic.
- Quantization or sharding to fit memory.
- Parsing and OCR are often the real bottleneck.
- Permission filtering and incremental refresh.
Follow-ups the interviewer may ask
- What if they need 3,072 dimensions? Hint: storage triples: 40M × 3,072 × 4 = 491.52 GB in float32.
- How do you choose chunk size? Hint: test 300, 500 and 800 tokens on a labeled question set and measure retrieval recall.
- Which LLM if nothing may leave the network? Hint: an open-weight model on their GPUs, sized for peak queries per second.
Common mistakes
- Forgetting the 4 bytes per float32 number, or mixing up GB and GiB without saying so.
- Sizing only the vectors and ignoring text, OCR and re-indexing.
- Searching first and checking permissions afterward, which leaks snippets.
Free sample 5 · Mini system-design cases · staff
One deployment of your AI platform must serve 50 business units of the same enterprise. How do you design multi-tenancy?

Why it is asked: Large enterprises want one platform but strict separation between units. The interviewer checks tenant identity, data isolation tiers, encryption, fair quotas and how you prove isolation.
What the interviewer listens for
- Tenant ID from the token, never from the client.
- Isolation tiers: RLS, own schema or database, per-tenant vector namespace.
- Per-tenant KMS keys.
- Guaranteed quota plus burst, computed.
- Cross-tenant access tests on every release.
Follow-ups the interviewer may ask
- Why not one deployment per unit? Hint: 50 stacks to patch and run; reserve dedicated stacks for the few units that need them.
- How do you handle a user in two units? Hint: the token lists both; the user picks one per session, and every request carries exactly one.
- How do you bill units fairly? Hint: meter tokens, storage and requests per tenant and report them monthly.
Common mistakes
- Taking the tenant ID from a request header the client controls.
- One shared vector index across business units, walled only by a metadata filter.
- No per-tenant quota, so one batch job starves 49 units.
Questions people ask
What exactly do I get?
A PDF for each pack you buy. Every question has why it is asked, a full answer, what the interviewer listens for, the follow-ups, the common mistakes and at least one diagram. You download it from My packs right after paying, and it is yours to keep.
How do I pay?
In India through Razorpay: UPI, cards, netbanking or wallets. Everywhere else by card (Visa, Mastercard, American Express) or PayPal, in US dollars. The price is shown in your own currency on every pack.
Can I read some questions before I buy?
Yes. Every pack on sale has five full questions free, each on its own page with its diagram, and the same five are in the free samples section below.
Is this the same as the courses?
No. The packs are separate from the System Design and AI Engineering courses. A course teaches a subject lesson by lesson; a pack is interview practice, question by question. Buying one does not include the other.
Which level is it for?
Every pack spans junior to staff level, and each question is marked with its level, so you can start where you are.
Can I get a refund?
These are digital products, so all sales are final and there are no refunds. Read the free questions first to decide.
Best value
All 9 Interview Prep Packs
Every pack in one purchase: system design, AI, GenAI, agents, inference, MLOps, data science, maths and FDE.
1,260 questions, each with a full answer, the follow-ups interviewers ask, common mistakes and a diagram.
Bought one by one, the nine packs cost ₹999 each (₹8,991 for nine) or $20 each ($180 for nine).
Digital products: all sales are final and there are no refunds. See refunds and cancellation and delivery. The packs are separate from the System Design and AI Engineering courses.








