🧠 AI System Design Interview Prep

June 29, 2026 Β· View on GitHub

Design production LLM systems under interview pressure β€” gateways, caching, streaming, cost, evals, and the trade-offs senior interviewers actually probe. Not flashcards: real decision matrices, architecture diagrams, and "what the interviewer asks next."

Stars PRs Welcome License: MIT

⭐ If this helps your prep, star it β€” it’s the fastest way to help other engineers find it.


If you're preparing for an AI / ML system design interview β€” LLM system design, GenAI infrastructure, or an AI platform / ML infra role β€” this repo gives you the senior-level answers: how to choose models, design LLM gateways, cache and route requests, control cost, stream responses, and build evals the way production teams actually do. Every answer leads with the decision, backs it with a trade-off table or diagram, and ends with the follow-up the interviewer asks next.


πŸ“š AI Interview Prep series

This repo is the system-design hub. Topic depth lives in dedicated companion repos β€” each focused so you can go deep without wading through everything else:

RepoFocusGo here for
AI System Design Interview (you are here)LLM fundamentals + end-to-end system designModel selection, gateways, caching, streaming, cost, evals, full design walkthroughs
πŸ”Ž rag-interview-systemRetrieval-Augmented Generation, in depth200+ RAG Q&As: chunking, vector DBs, hybrid search, rerankers, RAG evaluation
πŸ€– ai-agents-design-patternsAgentic systems & patternsReAct/Plan-Execute, tool use, multi-agent orchestration, memory, guardrails

Preparing for a full AI system design round? Work through this repo, then go deep on RAG and Agents in the companion repos. ⭐ all three.


πŸ‘‹ Who This Is For

  • Software engineers preparing for Senior / Staff / Principal AI roles
  • Backend engineers moving into ML platform or AI infrastructure positions
  • Candidates interviewing at FAANG, AI startups, FinTech, InsurTech, and SaaS companies
  • Engineers who want to understand production AI systems, not just theory

πŸ—‚οΈ What's Inside

ModuleTopicsQuestions
LLM FundamentalsModel selection, fine-tuning, prompting, serving, evals, context20
System Design PatternsGateways, routing, caching, streaming, cost, scale, observability25
Case StudiesFull worked design walkthroughs (LLM gateway, code assistant…)3
ResourcesStudy plan, cheat sheets, mock interview templateβ€”
πŸ”Ž RAGβ†’ rag-interview-system200+
πŸ€– AI Agentsβ†’ ai-agents-design-patternsβ€”

πŸš€ Quick Start

If you have 1 week: Focus on LLM Fundamentals + System Design Patterns

If you have 2 weeks: Add the Case Studies and go deep on RAG via rag-interview-system

If you have 1 month: All modules + Agents via ai-agents-design-patterns + practice with the mock interview template


πŸ—‚οΈ Module Overview

🟑 LLM Fundamentals

Core knowledge every AI engineer needs.

  • Model selection criteria (cost, latency, capability)
  • Fine-tuning vs prompting vs RAG decision framework
  • Prompt engineering patterns for production
  • Serving & inference optimization (vLLM, batching, KV cache, quantization)
  • Evaluation frameworks and benchmarks
  • Token budgeting and context window management

🟠 System Design Patterns

How to design end-to-end AI systems at scale.

  • LLM gateway and routing patterns
  • Streaming architectures for real-time inference
  • Caching strategies (semantic cache, prompt cache)
  • Cost optimization at scale
  • Multi-tenancy, rate limiting, and quota design
  • Observability, tracing, and monitoring
  • Scaling, failover, and graceful degradation

🟒 Case Studies

End-to-end worked walkthroughs you can practice against β€” clarify, design, deep-dive, trade-offs.


🀝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md before submitting a PR.

  • πŸ’‘ Found a gap? Open an issue
  • ✏️ Want to add questions? See the question template
  • ⭐ Found this useful? Star the repo β€” it helps others discover it

Support

For issues, questions, or general feedback:


πŸ“„ License

MIT β€” free to use, share, and build upon with attribution.