AI Engineering NotesRohit’s interview study guide

Interview study guide

AI engineering, from tokens to agents.

Build real AI features as a full stack engineer: what a model actually does with your prompt, how to call it, ground it with RAG, give it tools, turn it into an agent, test it with evals and run it in production. Every example runs, and the AI Lab puts real models in your browser to poke at.

Chapters
14
Topics
135
Code samples
515
Added beyond the doc
135
01How LLMs WorkWhat a model actually does with your prompt: tokens, next-token probabilities and the generation loop, sampling, attention and the KV cache, context windows, how training shapes behaviour, reasoning models, hallucination and choosing a model, with a real small model running the examples.10 topics02Calling Models from CodeThe Messages API end to end with the real TypeScript SDK: requests and responses, conversations, streaming, errors and retries, tokens and cost, thinking and effort, images and PDFs, stop reasons and refusals, the OpenAI shapes, provider-neutral code with the AI SDK, and batches at half price.11 topics03Prompt Engineering for ApplicationsPrompts as production code: versioned and tested, system prompts that work, XML structure, few-shot examples, thinking, safe templates for untrusted input, long documents, prompt caching with real savings maths, chaining, and how to debug a prompt without fooling yourself.10 topics04Structured Output and Tool CallingHow to get data your code can trust out of a model, and how to let a model call your functions: JSON schemas and zod, validation and repair, the tool loop written by hand and with the SDK's runner, parallel calls, errors, server tools, and what replaced forced tool choice.10 topics05Embeddings and Vector SearchMeaning as coordinates: what embeddings are and where they fail, how to measure similarity, choosing an embedding model, brute-force and approximate search (IVF and HNSW built from scratch), pgvector run for real, vector databases, filtering and multi-tenancy, why BM25 still matters, and what quantisation saves.10 topics06Retrieval-Augmented GenerationGrounding a model in your own documents: the RAG pipeline end to end with real local models, chunking, hybrid search with reciprocal rank fusion, cross-encoder reranking, query rewriting and HyDE, prompts with citations and "I don't know", Anthropic's contextual retrieval, retrieval metrics computed on a labelled set, and when long context or fine-tuning is the better choice.11 topics07AgentsWhat an agent really is (a model using tools in a loop), the workflow patterns to try before you build one, a complete agent loop with limits and a trajectory log, planning, memory and context management, multi-agent systems, human approval, the frameworks and platforms, MCP, computer use, and why agents fail.12 topics08AI Features in a Full-Stack AppHow a model call becomes a product feature: where the key and the state live, streaming from your server to the browser, a chat UI in React and in Angular, rendering tool results as components, storing conversations, cancellation, quotas, file uploads and the UX details that make it feel fast.10 topics09Evals and TestingHow you know an AI feature works and keeps working: why evals are the core skill, building an eval set, code graders, LLM-as-judge and its biases, evaluating RAG and agents, testing AI code in CI with mock models, online A/B tests and monitoring, and the error-analysis loop that actually improves quality.9 topics10Production: Cost, Latency and ObservabilityRunning AI features for real users: where the seconds and the dollars go and how to cut them, exact and semantic response caching (and when semantic caching gives the wrong answer), routing and fallbacks, rate limits and queues, tracing with OpenTelemetry's GenAI conventions, guardrails, and shipping prompt and model changes without breaking production.8 topics11Security and SafetyThe attacks that are specific to AI features and the defences that actually hold: the OWASP Top 10 for LLM applications, direct and indirect prompt injection (demonstrated on a real model), defences in code, data leakage, model output as untrusted input, excessive agency, jailbreaks and moderation, and the AI supply chain.8 topics12Fine-Tuning and Open ModelsWhen changing a model's weights beats changing its prompt, and when it doesn't; how SFT, LoRA and QLoRA work, with the parameter and memory maths in code; preference tuning (RLHF and DPO) and distillation; running open-weight models locally with Ollama, LM Studio and llama.cpp; serving them with vLLM; and small models in the browser.7 topics13Designing AI SystemsHow the AI system design interview differs from the classic one, and five designs worked end to end in the same shape: requirements, estimates calculated in code, an API sketch, a data model, an architecture diagram, deep dives and what to say.6 topics14Review QuestionsRapid revision before an interview: short questions with model answers you can say out loud in a minute, each linked to the topic that explains it in depth.13 topics

Added marks topics that weren’t in my original doc. Tick Learned on a topic to track what you’ve revised.

Sync progress across devices

Type the same private phrase on your Mac and your phone, and your Learned ticks follow you between them — on every study site.

The phrase never leaves this device: only a fingerprint of it is sent, and the server stores a fingerprint of that. Anyone who knows the phrase could see or change your ticks, so pick something you don’t use elsewhere.

Sync is on in this browser.

Sync ID

This ID must be the same on every device. If another device shows a different one, its phrase is different (capital letters count): tap “Turn off here” on it and type the phrase again exactly.