Skip to the page

30 questions · 8 rounds

GenAI engineer interview questions

Questions from real GenAI engineer rounds, grouped by the round that asks them. Open one for the follow-ups, what a strong answer covers and the traps. Then say your answer out loud: see the GenAI engineer mock interview.

Part 1 · 16 questions

Technical screen

  1. select_related or prefetch_related

    Django · Concept · Mid

    When do you use select_related and when prefetch_related? What SQL does each one actually run?

  2. List comprehension or generator expression for crores of rows

    Python core · Trade-off · Mid, Senior

    You need the total amount from 5 crore transaction rows read from a file. Would you use a list comprehension, a generator expression, or a plain loop? Why?

  3. 502 and 504 errors from Nginx

    Python services in production · Scenario · Mid, Senior

    Users see random '502 Bad Gateway' errors from our Nginx, and the finance team gets '504 Gateway Timeout' on the monthly report page. The app is Django on Gunicorn in Kubernetes, behind…

  4. Choosing a chunking strategy

    RAG · Trade-off · Mid, Senior

    How do you decide how to chunk documents for RAG? Fixed size, by headings and paragraphs, or semantic chunking: what would you pick for a company's HR policy manual, and why?

  5. Request validation with Pydantic v2

    FastAPI · Concept · Mid

    How does FastAPI validate a request body with Pydantic v2? Show me how you'd make sure end_date is after start_date, and reject fields the client shouldn't send.

  6. Embeddings and similarity search

    LLM fundamentals · Concept · Mid

    What is an embedding? How does a vector search find 'refund not received' when the document says 'money not credited back to your account'?

  7. Threads, processes or asyncio

    Python concurrency · Trade-off · Mid, Senior

    For each of these, would you use threads, processes or asyncio, and why? One: call a partner API for 20,000 PAN numbers. Two: resize 50,000 product images. Three: a service that holds…

  8. A deploy breaks because a dependency of a dependency changed

    Python in production · Scenario · Mid, Senior

    Nothing changed in our code, but this morning's deploy of a Python service failed: the new container crashes on start with an ImportError from a library we don't even use directly…

  9. The agent loop and when it stops

    Agents and tools · Concept · Mid, Senior

    What makes something an 'agent' rather than a single model call? Describe the agent loop, and tell me how it knows when to stop.

  10. An LLM feature you took to production

    LLM apps in production · Your experience · Mid, Senior, Lead

    Tell me about an LLM feature you took to production. What did it do, how did you know it was good enough to launch, and what broke after launch?

  11. 429 errors from the model provider during a sale

    LLM cost and serving · Scenario · Mid, Senior

    During a big sale, our shopping assistant starts failing: about 15% of requests get HTTP 429 'rate limit exceeded' from the model provider, and retries make it worse. What do you do now…

  12. Class attributes, instance attributes, classmethod and staticmethod

    Python OOP and typing · Concept · Mid

    What's the difference between a class attribute and an instance attribute? And between a normal method, a @classmethod and a @staticmethod? When do you use each?

  13. A generator pipeline over a 20 GB log file

    Python coding · Build it · Mid, Senior

    We have a 20 GB access log, one request per line: time, path, status and response time in milliseconds. Write Python that finds the 10 paths with the most 5xx errors, with their average…

  14. Storing passwords and secrets

    Python data access and security · Concept · Mid

    How should a Django or FastAPI app store user passwords? And where should secrets like SECRET_KEY, database passwords and API keys live?

  15. How Celery works

    Celery and background jobs · Concept · Mid

    Explain how Celery works. What are the broker, the worker and the result backend, and what happens between calling .delay() and the task running?

  16. Evaluating a RAG bot before launch

    LLM evaluation · Concept · Mid, Senior

    You've built a RAG bot for HR policies. Before launch, how do you evaluate it? What does your evaluation set look like, and who makes it?

Part 2 · 5 questions

Tech stack deep dive

  1. How your service gets AWS credentials

    AWS for developers · Concept · Mid, Senior

    Your service runs on AWS and needs to read files from S3 and send messages to SQS. How does the code get AWS credentials, and why shouldn't you just put an access key in its environment…

  2. Build a sliding-window rate limiter in Lua

    Redis in depth · Build it · Mid, Senior

    Write a Redis-based rate limiter for our OTP API: at most 5 OTP requests per phone number in any 10-minute window, across all API servers. Write the Lua script and the code that calls it…

  3. A consumer loop that loses emails

    Kafka · Write code · Mid, Senior

    This Python consumer sends order confirmation emails. After a pod restart, some customers never got their email, and the logs show no errors. Why? (code)

  4. A ConfigMap change nobody picked up

    Kubernetes for developers · Scenario · Mid, Senior

    You changed the payment timeout in the service's ConfigMap from 30 to 10 seconds and applied it. An hour later the pods still use 30 seconds. A teammate says, 'Just delete the pods.'…

  5. A messaging problem you debugged

    Messaging patterns · Your experience · Mid, Senior, Lead

    Tell me about a real problem you hit with a queue, Kafka or Redis in production. What happened, how did you find the cause, and what did you change?

Part 3 · 1 question

Python coding

  1. Valid parentheses (LeetCode 20)

    DSA · Build it · Mid, Senior

    Given a string of brackets, ()[]{}, return whether it's balanced.

Part 4 · 4 questions

Backend system design

  1. Cache-aside, write-through or write-back

    Design building blocks · Trade-off · Mid, Senior

    Our product catalogue API is slow, and someone says 'just add Redis'. Which caching strategy would you use: cache-aside, write-through or write-back? And how do you keep the cache from…

  2. Back-of-the-envelope estimation for a photo app

    Reliability and scale · Design · Mid, Senior, Lead

    Before we design anything, estimate the scale for a photo-sharing app with 10 crore daily active users. How many uploads and feed reads a second, how much storage a year, and how much…

  3. Design a UPI payments app backend with idempotency

    India-scale design · Design · Senior, Lead

    Design the backend of a UPI payments app like PhonePe or Google Pay. A user scans a shop's QR code, enters an amount and their PIN, and pays. Money must never move twice.

  4. Design a chat app like WhatsApp

    System design prompts · Design · Senior

    Design a messaging app like WhatsApp: one-to-one chats and groups, online status, and the delivered and read ticks.

Part 5 · 1 question

Techno-managerial

  1. A junior's pull request is weak

    Techno-managerial · Scenario · Senior, Lead

    A junior developer raises a PR for a new form. It works, but it has copy-pasted blocks, no tests, a 400-line component, and state in five places. The release is in two days. How do you…

Part 6 · 1 question

Resume deep dive

  1. "Architected / built from scratch" — the whiteboard test

    Resume deep-dive · Your experience · Senior, Lead

    Draw the architecture of the system you 'architected'. Where does the data and state live? How does auth work? How is it built and deployed?

Part 7 · 1 question

Behavioural / HM

  1. Code-review and debugging rounds

    Leadership & behavioural · Write code · Senior

    "Here's a teammate's pull request in the stack you work in. Review it like a real PR." Or: "This app has bugs and four failing tests. Fix them while thinking aloud."

Part 8 · 1 question

Recruiter / HR round

  1. Background verification

    HR & recruiter · Your experience · Mid, Senior, Lead

    Our BGV partner will verify your employment history, including UAN service history, relieving letters and education. Is there anything we should know before we start?

Reading is not answering. Say it out loud.

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview