Sandbox
@amitshekhariitbhu/ai-engineering-interview-questions

AI engineering interview questions and answers guide

This repository collects interview questions and answers across LLM fundamentals, prompt engineering, RAG, agents, fine-tuning, evaluation, and production AI. It is structured as a long Markdown reference with links to deeper explanations and videos.

3,043 stars545 forksMarkdownUpdated 7d ago
AI Engineering Explained: LLM, RAG, MCP, Agent, Fine-Tuning, Quantization
Outcome School73k views • 6 months ago

Videos about this repo

Who it's for

Builders who are preparing for AI engineering interviews and want a structured study list for LLMs, RAG, agents, and production AI.

What it delivers

You can study the topics interviewers ask about without assembling your own prep notes from scratch.

What it does

LLM fundamentals section

Covers transformers, tokenization, attention, embeddings, context windows, KV cache, MoE, Flash Attention, and related model concepts.

Prompt engineering section

Includes prompting patterns, structured output, prompt injection, prompt chaining, and common failure modes.

RAG section

Walks through chunking, embeddings, hybrid search, reranking, agentic RAG, GraphRAG, freshness, and evaluation.

Agents and agentic systems section

Explains agent memory, ReAct, plan-and-execute, tools, MCP, subagents, loops, guardrails, and evaluation.

Production AI topics

Touches on LLMOps, safety, scalability, multimodal systems, and practical implementation tradeoffs.

README

AI Engineering Interview Questions and Answers

AI Engineering Interview Questions and Answers

AI Engineering Interview Questions and Answers - Your Cheat Sheet For AI Engineering Interviews

These interview questions and answers are helpful for roles such as:

  • AI Engineer
  • Gen AI Engineer
  • LLM Engineer
  • Agentic AI Engineer
  • AI Agent Engineer
  • Forward Deployed Engineer
  • AI Solutions Architect
  • AI Platform Engineer
  • Applied AI Engineer
  • MLOps Engineer
  • LLMOps Engineer

Table of Contents

Prepared and maintained by the Founder of Outcome School: Amit Shekhar

Follow Amit Shekhar

Follow Outcome School

I teach at Outcome School


Note: We will keep updating this with new questions and answers.


Must Know

  • LLM
  • RAG
  • MCP
  • Agent
  • Fine-tuning
  • Quantization

Learn about the LLM, RAG, MCP, Agent, Fine-tuning & Quantization: AI Engineering Explained: LLM, RAG, MCP, Agent, Fine-Tuning, Quantization

LLM Fundamentals

Prompt Engineering

  • What is prompt engineering, and why is it critical for AI applications?
  • Explain zero-shot, one-shot, and few-shot prompting with examples.
  • What is chain-of-thought (CoT) prompting, and when should you use it?
  • Explain self-consistency prompting and how it improves reasoning.
  • What is tree-of-thought prompting?
  • What is ReAct (Reasoning + Acting) prompting, and how does it work?
  • What is a system prompt, and how does it influence model behavior?
  • How do you structure prompts for consistent structured output (JSON, XML)?
  • What is prompt injection, and how do you defend against it?
  • What is jailbreaking in LLMs, and what are common jailbreak techniques?
  • How do you optimize prompts for cost and latency?
  • What is the difference between prompt engineering and prompt tuning?
  • What is a prompt template, and how do you design one for production use?
  • How do you handle multi-turn conversations with LLMs?
  • What is role prompting, and when is it effective?
  • What is prompt chaining, and how do you design a chain of prompts for complex tasks?
  • How do you evaluate and iterate on prompt quality?
  • What are meta-prompts, and how can they be used to generate prompts?
  • What are the common failure modes in prompting, and how do you debug them?
  • How do you handle edge cases and adversarial inputs in prompt design?
  • What is the "lost in the middle" problem in long-context prompting?
  • What are output parsers, and why are they needed for production applications?
  • How do you handle multi-language prompting effectively?
  • Your few-shot prompting gives inconsistent results across similar inputs. How do you stabilize it?
  • Your LLM classification system is too sensitive to prompt wording changes. How do you reduce prompt sensitivity?
  • Your chatbot's system prompt containing proprietary business logic is being leaked by users. How do you prevent it?
  • Your LLM agent is vulnerable to prompt injection that reveals the system prompt. How do you defend it?
  • Your chain-of-thought prompting is not improving LLM accuracy on reasoning tasks. What do you fix?
  • Your AI system works in English but fails for other languages. How do you add multilingual support?
  • Your zero-shot cross-lingual transfer from English fails on other languages. How do you fix it?

Retrieval-Augmented Generation (RAG)

  • What is Retrieval-Augmented Generation (RAG), and why is it important?
  • Explain the architecture of a basic RAG system.
  • What are the key components of a RAG pipeline?
  • What are chunking strategies, and how do you choose the right chunk size?
  • Compare fixed-size chunking, semantic chunking, and recursive chunking.
  • What are embedding models, and how do they convert text to vectors?
  • How do you choose an embedding model for your RAG system?
  • Explain Agentic RAG.
  • What is hybrid search, and why is it better than pure vector search?
  • What is re-ranking, and how does it improve RAG retrieval quality?
  • How do you handle multi-document and multi-hop questions in RAG?
  • What is the "lost in the middle" problem in RAG systems?
  • How do you evaluate a RAG system? Explain faithfulness, relevance, and context precision/recall.
  • Explain Self-RAG. How does the model decide when to retrieve?
  • What is GraphRAG, and when would you use it over traditional RAG?
  • Vectorless RAG
  • How do you handle structured data (tables, SQL databases) in a RAG pipeline?
  • What are the common failure modes of RAG systems, and how do you debug them?
  • How do you handle document updates and maintain freshness in a RAG system?
  • How do you optimize RAG for latency in production?
  • What is the role of metadata filtering in RAG systems?
  • Compare RAG vs fine-tuning. When would you use each?
  • What is query transformation in RAG (HyDE, query decomposition, step-back prompting)?
  • How do you implement citation and source attribution in RAG?
  • How do you scale a RAG system to millions of documents?
  • What is parent-child chunking, and how does it improve retrieval?
  • Your RAG system is hallucinating despite having the right context. How do you fix it?
  • Your RAG chunk overlap causes redundant results. How do you reduce redundancy?
  • Your RAG retrieval is too slow with a large knowledge base. How do you speed it up?
  • Your RAG system returns duplicate results. How do you deduplicate?
  • Your RAG system needs per-user access control on internal documents. How do you implement it?
  • Your RAG system fails on domain-specific jargon. How do you fix it?
  • Your text-only RAG system now needs to handle images and tables. How do you extend it?
  • Your RAG knowledge base gets updated frequently and needs versioning. How do you manage it?
  • Your RAG system fails on multi-hop questions that require combining multiple facts. How do you fix it?
  • Your enterprise RAG system returns contradictory answers from different source documents. How do you resolve conflicts?
  • Your RAG system returns outdated answers from an evolving knowledge base. How do you keep it current?
  • Your RAG system struggles with PDF documents containing tables and layouts. How do you fix PDF parsing?

AI Agents and Agentic Systems

Files in the repo

Repository payload4 top-level entries
  • assets
  • .gitattributes
  • LICENSE
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tutorials & guides

shareAI-lab/
learn-claude-code

Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1

77k
luongnv89/
claude-howto
luongnv89/claude-howtoTutorials & Guides

A visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.

41k
agentskills/
agentskills
agentskills/agentskillsTutorials & Guides

Specification and documentation for Agent Skills

25k
ykdojo/
claude-code-tips
ykdojo/claude-code-tipsTutorials & Guides

45+ tips for getting the most out of Claude Code, from basics to advanced - includes a custom status line script and Claude Code running itself in a container. Also includes the dx plugin: skills for everyday dev workflows.

10k