Gen AI Interview Questions 2026: 35 LLM, RAG and Agent Questions With Simple Answers

Gen AI Interview Questions

Last updated: November 2026 · Sources: Weekday analysis of 148 LinkedIn hiring posts, Stack Overflow Developer Survey 2025, Reddit interview threads, Weekday salary pages

Gen AI interviews now go well beyond "what is a transformer". Expect questions on how you'd build a chatbot that doesn't make things up, how you'd test it, and what it'll cost per user.

Below are 35 questions across LLM basics, prompting, RAG, agents, evals and system design, with short answers you can say in an interview.

In one line: know how LLMs work at a high level, be able to build and debug a RAG pipeline, explain when an agent is (and isn't) the right tool, and show how you measure quality. Python and API skills are tested too.

Who's hiring for Gen AI roles right now

In Weekday's analysis of 148 LinkedIn hiring posts (14 to 23 November 2026), 21 posts had AI, ML, LLM, RL or agents in the job title. We tagged each post by the role names in its title. 13 of those 21 listed a location in India. A few examples:

  • SDE 2, Python Developer (LLM), Bengaluru, 4+ years
  • AI/ML Engineer, LLM and Agent Stack, Bengaluru, 4 to 10 years
  • SDE III, Backend Engineering (AI agents), Bengaluru, up to ₹1 Cr
  • Staff Software Engineer, AI, Bangalore, up to ₹45 LPA
  • A 6-month AI engineer internship for 2026 and 2027 grads, with a path to full time

Notice how many are "SDE" or "backend" titles with LLM work inside. Gen AI questions now show up in regular software interviews too. Service firms are hiring as well: candidates on Reddit have asked what comes up in GenAI interviews at Accenture and Infosys.

Why evals matter so much: in the Stack Overflow 2025 survey, 84% of developers use or plan to use AI tools, but 46% don't trust the accuracy of the output. Teams want people who can prove their AI feature works.

LLM basics (1–8)

1. What is a large language model?
A model trained on huge amounts of text to predict the next token. Chat, summaries and code all come from that one skill.

2. What is a token?
A chunk of text, often part of a word. Pricing and context limits are counted in tokens, not words.

3. What is the context window?
The maximum tokens the model can read and write in one call. Your prompt, retrieved documents and the answer all share it.

4. Explain attention in simple words.
Each word looks at every other word and decides which ones matter for its meaning. It's the core idea of the transformer, from the paper Attention Is All You Need.

5. What do temperature and top-p do?
They control randomness. Low temperature gives steady, repeatable answers. Higher values give more varied ones.

6. What are embeddings?
Numbers that represent meaning. "Salary slip" and "payslip" get close vectors, so you can search by meaning.

7. Why do LLMs hallucinate?
They generate likely text, not checked facts. Without the right source in context, they fill gaps confidently.

8. Prompting vs RAG vs fine-tuning: when do you use which?
Prompting first. RAG when the model needs your private or fresh data. Fine-tuning when you need a fixed style or format at scale and prompting can't get there.

Prompting (9–12)

9. What goes in a system prompt?
The role, rules, tone, output format and what to do when unsure, like "say you don't know".

10. What is few-shot prompting?
Giving 2 or 3 examples of input and ideal output inside the prompt so the model copies the pattern.

11. How do you get reliable JSON output?
Use the provider's structured output or JSON mode, give a schema, validate the response in code and retry on failure.

12. What is prompt injection and how do you defend against it?
User or document text that tries to override your instructions. Keep instructions separate from data, limit what tools can do, and check outputs before acting on them.

RAG (13–20)

13. What is RAG?
Retrieval-augmented generation: fetch relevant documents, put them in the prompt, then let the model answer from them. The idea comes from a 2020 research paper.

14. Walk me through a RAG pipeline.
Load documents, split into chunks, embed them, store in a vector database. At query time, embed the question, fetch top matches, build the prompt, generate, and cite sources.

15. How do you choose chunk size?
Test it. Too small loses context, too big adds noise. Split on headings or paragraphs and keep a small overlap.

16. What is hybrid search?
Combining keyword search (good for exact terms like "Form 16") with vector search (good for meaning).

17. What does a reranker do?
Takes the top results from search and re-orders them by true relevance before they go to the model.

18. Your RAG bot gives wrong answers. How do you debug it?
Check retrieval first: was the right chunk fetched? If not, fix chunking, search or metadata filters. If yes, fix the prompt or model.

19. How do you measure retrieval quality?
Build a set of questions with known correct chunks and track how often the right chunk appears in the top results.

20. How do you keep answers fresh when documents change?
Re-index changed files on a schedule or on upload, and store a version or date with each chunk.

Agents and tool calling (21–26)

21. What is an AI agent?
An LLM that can decide which tools to call, read the results and repeat until the task is done.

22. How does tool calling work?
You describe tools with a name and input schema. The model returns a tool name and arguments, your code runs it and sends the result back.

23. What is ReAct?
A loop of reasoning, acting with a tool and observing the result, from the ReAct paper.

24. Single agent or multi-agent?
Start with one agent and few tools. Split into specialised agents only when one prompt gets too long or tools conflict.

25. How do you stop an agent from doing damage?
Read-only tools by default, human approval for payments or deletes, step limits and full logs.

26. When should you not use an agent?
When a fixed workflow works. If the steps never change, plain code is cheaper and easier to test.

Evals and production (27–32)

27. How do you evaluate an LLM feature?
Make a test set of real questions with good answers, score outputs on accuracy and format, and run it on every prompt or model change.

28. What is LLM-as-a-judge?
Using a model to grade another model's output against a rubric. Check it against human grades on a sample first.

29. How do you cut latency?
Smaller models for easy steps, streaming, caching repeated answers and shorter prompts.

30. How do you cut cost?
Route simple queries to cheaper models, trim context, cache, and batch offline jobs.

31. What do you monitor after launch?
Latency, cost per request, error rate, user feedback and a sample of conversations reviewed each week.

32. How do you handle personal data?
Mask PII before sending it to the model, follow data rules like India's DPDP Act, and log carefully.

System design scenarios (33–35)

33. Design a support bot for an Indian bank that answers in Hindi and English.
RAG over policy documents, language detection, strict "answer only from sources" prompts, handover to a human for account actions, and evals in both languages.

34. Design a tool that screens 10,000 resumes for a role.
Extract fields to JSON, score against the job's must-haves in code, use the LLM only for fuzzy matching, and keep a human review for the shortlist.

35. Your LLM bill doubled last month. What do you do?
Find which feature and which prompts cost the most, then cache, shorten context and route easy calls to a smaller model.

The coding round

Expect Python: call an LLM API, parse JSON, add retries, and wrap it in a FastAPI endpoint. Revise with our Python interview questions and system design questions. A r/developersIndia thread on GenAI interviews lists the same topics: RAG, agents, transformers, embeddings, vector databases, fine-tuning, evaluation and LLMOps.

What Gen AI roles pay in India

Weekday's AI engineer salary guide puts freshers at ₹8–14 LPA and engineers with 2 to 4 years at ₹22–38 LPA. LLM application work (RAG, agents, evals) carries a premium of about 30% to 50% over general ML roles.

A three-week prep plan

  • Week 1: LLM basics and prompting. Build a small chatbot with JSON output.
  • Week 2: Build a RAG app on 50 PDFs, with a test set of 30 questions.
  • Week 3: Add one tool-calling agent, measure cost and latency, and practise the design scenarios out loud.

Coming from software engineering? Read how to move from full stack to AI engineering and the AI engineer roadmap.

Ready to apply?

See open AI and Gen AI roles on Weekday at startups, product companies and GCCs, with filters for experience and city.

See AI jobs →

Frequently asked questions

What is asked in a Gen AI interview?

LLM basics, prompting, RAG pipelines, agents and tool calling, evaluation, cost and latency, and one system design scenario. Most also include a Python coding round.

Can a fresher get a Gen AI job?

Yes, mostly through internships and AI engineer trainee roles. Show one deployed RAG or agent project with a test set and clear results.

Do I need to know machine learning for Gen AI roles?

Basics help, but most Gen AI jobs are about building apps on top of existing models. Python, APIs, RAG and evals matter more than training models from scratch.

Which tools should I learn for Gen AI interviews?

One LLM API, one vector database, one framework such as LangChain or LlamaIndex, and FastAPI. Learn one of each well rather than many.

Latest Articles

Browse Articles
Use AI to find jobs and apply

Stop manually filling job applications. Use AI to auto-apply to jobs

Browse jobs now