RAG Interview Question
Interviewer:
Your RAG application handles 20 concurrent users smoothly. At 1,000 concurrent users, latency increases dramatically and requests start timing out.
How would you redesign the architecture to handle this traffic?
Ask 1: The signing bonus
"Could we close the gap with a one-time signing bonus?"
A one-time cost is much easier for them to approve than a permanent salary increase.
As an AI Engineer building with RAG in 2026.
Please learn:
1. Chunking as a design decision: chunk size decides what can ever be retrieved. Split mid-section and the answer is in neither half. Add overlap and you hide the seam, but now the same passage shows up three times in your results.
2. Embeddings are not search: a vector index finds text that sounds similar, not the passage that answers the question. "How do I reset the password" and "password reset policy" sit right next to each other, and the actual steps might not rank at all.
3. Hybrid retrieval: names, error codes, SKUs and IDs get blurred into nothing by embeddings. Keyword search catches them. Most real corpora need both, fused.
4. Reranking: retrieval gets you candidates, a reranker gets you order. Pull twenty, rerank to five. It's cheap and it's usually the biggest quality jump a system gets.
5. Metadata filters before vectors: tenant, date, permission, document type. Filter after retrieval and the model has already read what it should never have seen.
6. Permissions at retrieval time, not prompt time: a shared index over private documents leaks through retrieval, no matter what the system prompt says. The filter belongs in the query.
7. Freshness: the index is a snapshot. Anything updated after the last sync is invisible, and the model has no idea it's missing.
8. Citations & grounding: if the answer can't name the chunk it came from, you can't debug it and the user can't check it.
9. Retrieval evals separate from answer evals: measure whether the right passage showed up at all before you blame the model for a bad answer. Otherwise you spend a week tuning prompts for a document that was never in the context.
10. Query rewriting: users ask short questions with pronouns and half the context missing. Rewriting the query before retrieval beats a bigger model almost every time.
A wrong chunk still produces a fluent, confident answer. Nothing in it tells you it came from page 40 of an outdated policy, except the citation nobody checked.
None of this is a better embedding model. Most retrieval problems are data problems that happen to look like search.
RAG Interview Question
Interviewer:
Your RAG system retrieves 10 documents, but only 2 are relevant to the user's query. How would you improve retrieval accuracy and reduce irrelevant context?
Agentic AI interview question:
Your LLM app works fine for 10 users. At 100 concurrent users, it runs out of memory.The model didn't change.
What grew?
Accenture Interview Question:
Interviewer:
Your RAG system's documents are updated 20+ times a day, how would you keep the vector index fresh without re-embedding the entire corpus?
RAG Interview Question
Interviewer:
Your RAG application takes 15 seconds to retrieve relevant documents and generate an answer, but users expect a response within 3 seconds. How would you optimize the retrieval and generation pipeline to reduce latency?
I interviewed at Oracle → got 20LPA offer
I interviewed at Deloitte → got 23LPA offer
I interviewed at PwC → LOST 24LPA offer
I interviewed at Walmart → LOST 28LPA offer
I interviewed at MNC → got 32LPA offer
Finally, I interviewed at YC startup and got a 39LPA offer
After giving multiple interviews, one thing became clear: If you want to clear any Software Engineer interviews, the formula is simple: Java Backend, System Design, and DSA.
Here are 36 interview questions/topics that repeatedly showed up in my prep and interview journey:
𝗗𝗦𝗔
1. Implement LRU/LFU Cache
2. Find Median from Data Stream
3. Word Ladder problem
4. Merge K Sorted Lists
5. Detect Cycle in a Directed Graph
6. Maximum Subarray Sum
7. Kth Largest Element in a Stream
8. Task Scheduler/Priority-based scheduling
9. Longest Substring Without Repeating Characters
10. Trapping Rain Water
11. Find all permutations of a string
12. Lowest Common Ancestor in a Binary Tree
𝗝𝗮𝘃𝗮 𝗕𝗮𝗰𝗸𝗲𝗻𝗱
13. HashMap vs ConcurrentHashMap vs Hashtable
14. JVM memory model: Heap, Stack, GC
15. ExecutorService, Callable, and Future
16. How Spring Boot Dependency Injection works
17. REST vs Kafka/RabbitMQ in Microservices
18. Transactions in Spring Boot
19. SQL vs NoSQL
20. Designing scalable REST APIs
21. How does Transactional silently fail?
22. Thread safety: synchronized vs volatile vs atomic
23. How does HikariCP connection pooling work?
24. Circuit Breaker pattern with Resilience4J
𝗦𝘆𝘀𝘁𝗲𝗺 𝗗𝗲𝘀𝗶𝗴𝗻
25. Design a Chat Application
26. Design a URL Shortener
27. Design a Notification System
28. Scale a Video Streaming platform
29. Design a Payment System
30. Design an API Rate Limiter
31. Design an E-commerce Checkout System
32. Design a Ride-Hailing App
33. Design a Flash Sale system handling 10 million users
34. Design an Instagram Feed generation system
35. Design a Distributed Cache like Redis
36. Design a Search Autocomplete system
Until the next post...
Stay Curious. Keep Coding. 🚀
Two software engineers vacate identical ₹85,000/month 3BHK flats in Bengaluru after a 3-year lease.
Both deposited ₹4.5 Lakhs in security deposit.
Both have moving trucks packed on the street below and flights to catch in 4 hours.
At 11:00 AM, the landlord walks in with a clipboard:
"Walls have scuffs, tile grout is stained, wooden floor needs polish. Painting: ₹1.4L, carpentry: ₹50K, deep cleaning: ₹25K, plus 1 month vacancy loss: ₹85K. Deducting ₹3 Lakhs. You get ₹1.5 Lakhs in 45 days. Sign this move-out settlement slip, or security won't open the society gate for your moving truck."
Tenant A panics, argues for 2 hours, surrenders to the gate-lock threat, signs the slip, and loses ₹3 Lakhs.
Tenant B says 2 calm sentences.
20 minutes later, the landlord transfers 100% of the ₹4.5 Lakh deposit via IMPS with ₹0 deducted, and signs the gate pass.
Same society. Same ₹3 Lakh deduction. Same moving truck waiting.
The only difference?↓
𝗔𝗜 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝗶𝗻𝗴 𝗶𝘀 𝗷𝘂𝘀𝘁 𝟭𝟮 𝘁𝗲𝗿𝗺𝘀. 𝗟𝗲𝗮𝗿𝗻 𝘁𝗵𝗲𝗺 𝗶𝗻 𝘁𝗵𝗶𝘀 𝗼𝗿𝗱𝗲𝗿 𝗮𝗻𝗱 𝗲𝘃𝗲𝗿𝘆𝘁𝗵𝗶𝗻𝗴 𝗰𝗹𝗶𝗰𝗸𝘀.
1: 𝗠𝗼𝗱𝗲𝗹 The brain. It predicts the next piece of text, over and over. Claude, GPT and Llama are all models.
2: 𝗧𝗼𝗸𝗲𝗻 The unit it reads. A word or a piece of one. You pay by the token, and speed and limits are counted in tokens too.
3: 𝗖𝗼𝗻𝘁𝗲𝘅𝘁 𝘄𝗶𝗻𝗱𝗼𝘄 How much text the model can see at once. Anything outside it does not exist for the model.
4: 𝗣𝗿𝗼𝗺𝗽𝘁 Everything you send in. The question, the rules, the examples. A good prompt is the cheapest way to improve answers.
5: 𝗘𝗺𝗯𝗲𝗱𝗱𝗶𝗻𝗴 Text turned into numbers that capture meaning. Similar ideas land close together, so you can search by meaning.
6:𝗥𝗔𝗚 Search your own documents first, then hand the best parts to the model. It turns a memory test into an open-book exam.
7: 𝗧𝗼𝗼𝗹𝘀 𝗮𝗻𝗱 𝗠𝗖𝗣 Tools let the model do things, like query a database or open a ticket. MCP is the standard plug, so you connect each tool once.
8: 𝗔𝗴𝗲𝗻𝘁 A model that uses tools in a loop until the job is done. Not a chatbot. A chatbot talks, an agent acts.
9: 𝗘𝘃𝗮𝗹𝘀 Tests for AI. Real questions with known good answers, run on every change, so you stop shipping on hope.
10: 𝗚𝘂𝗮𝗿𝗱𝗿𝗮𝗶𝗹𝘀 Checks before and after the model. They block attacks, hide private data and limit what an agent can touch.
11: 𝗢𝗯𝘀𝗲𝗿𝘃𝗮𝗯𝗶𝗹𝗶𝘁𝘆 A record of every step: what was searched, what was sent, what it cost. This is how you debug a wrong answer.
12: 𝗟𝗟𝗠𝗢𝗽𝘀 Running all of this like real software. Version it, test it, watch the bill, have a rollback plan.
🚨 HUGE! India to have its own designed, manufactured, and branded mobile phone by October 2028. 🔥
– Built on 3 years of local PCB (motherboard) R&D.
– Tech already validated & picked by a major US telecom giant.
JUST IN 🚨
Denmark has launched an official website where foreigners can search for jobs, apply for vacancies, and relocate to work in the country.
https://t.co/HBTYUhiWRP
You know what to do??
AI inference engineers are in crazy demand rn 🔥
If I had 24 hours to prep for an AI inference engineering interview, these are the 25 problems I'd practice, in order.
1) Explain what happens between a request arriving and the first token leaving
2) Stream tokens over SSE, handle disconnects, and cancel in-flight generation
3) Size the KV cache for a Llama-style 70B model at 32K context and 100 users. Account for GQA and precision
4) Explain PagedAttention and the problem it solves
5) Explain why FlashAttention is faster when the math is the same
6) Design continuous batching under latency deadlines and explain why it beats static batching
7) A 100K-token prompt stalls short chats. Fix TTFT with chunked prefill and scheduling
8) Design prefix caching and cache-aware routing across GPU replicas
9) Cut inter-token latency without tanking throughput
10) Speculative decoding: when it helps and when it hurts
11) Quantization: FP8 vs INT8 vs INT4 vs NVFP4. Pick one and measure the loss
12) Pick GPUs for a workload: H100 vs H200 vs B200 vs L40S
13) Profile a slow model with Nsight: compute, memory bandwidth, or kernel launch overhead?
14) Your GPU sits at 30% utilization under load. Debug it
15) Write a fused CUDA/Triton RMSNorm kernel and benchmark it against PyTorch
16) Design observability: TTFT, TPOT, queue depth, KV cache utilization, prefix-cache hit rate, cost per request
17) Your p99 latency is 10x your p50. Diagnose it
18) vLLM vs TensorRT-LLM vs SGLang: benchmark on realistic workloads and pick one
19) Roll out a new model or quantization safely, with rollback
20) Design autoscaling for GPUs with slow cold starts
21) Design multi-tenant serving with fair scheduling, admission control and priority queues
22) Disaggregate prefill and decode: why do it, how do you transfer KV cache, and what does it cost?
23) Serve a large MoE model: choose a mix of tensor, pipeline and expert parallelism. Explain all-to-all overhead
24) Reduce cost per million tokens by 70% without hurting quality
25) Design ChatGPT-style inference for 1M daily active users. Estimate peak QPS, GPU capacity and cost
And please don't just memorize answers. Understand the concepts, work through real numbers, and focus on the trade-offs.
📌 Bookmark this + send it to someone prepping for AI interviews.
Software engineering interviews are so cooked.
You are strong in RAG, AI agents, LLMs, and vector databases, and the interviewer hits you with:
"Implement a hashmap from scratch."
You are strong in system design, networking, databases, and algorithms, and the interviewer hits you with:
"Design a real-time voice AI agent handling 10,000 concurrent calls with sub-500ms latency."
If you learn backend engineering for AI, you will never be unemployed again.
Stage 1: LLM calls are backend calls
- Learn: tokens, streaming, timeouts, retries, structured outputs.
- Practice: wrap an LLM API with a timeout, retry limit, fallback model and a cost log per request.
Stage 2: Retrieval
- Learn: embeddings, chunking, hybrid search, reranking, metadata filters.
- Practice: RAG over real docs, with citations and a freshness filter.
Stage 3: Cost and latency
- Learn: prompt caching, semantic caching, model routing, batching.
- Practice: cut cost per query by 50% without dropping your eval score.
Stage 4: Agents in production
- Learn: tool calling, step budgets, idempotent tools, human approval.
- Practice: an agent that can issue a refund safely.
Stage 5: Evals and observability
- Learn: golden datasets, LLM-as-judge, tracing.
- Practice: an eval suite in CI that blocks a bad prompt change.