How to become an AI Engineer
Step by step and free: 12 phases, 90 topics and 274 graded practice questions.
Open any topic and mark it Learning, Done or Skip to track your progress. Sign in to save it to your account.
0 of 90 done · 0 learning · 0 skipped · Start with the first topic
Saved on this device only. Sign up free or sign in to keep your progress everywhere.
It's saved on this device only. Sign up free to keep it everywhere; your marks move into your account.
What is an AI Engineer?
An AI engineer builds software products on top of large language models, turning a model API into a feature people can rely on. Day to day that means writing and testing prompts, wiring retrieval over company documents, giving models tools and agent loops, choosing which model to call, and measuring quality with evals. They work with product managers, backend engineers and domain experts, and they own cost, latency and safety once the feature ships.
Who this roadmap is for
Software engineers who already ship web or backend code and want to build with language models. You should be comfortable with HTTP APIs, JSON and one programming language, ideally Python or TypeScript. This is not a research track: if you want to train frontier models from scratch, the research roadmaps suit you better.
What you will be able to do
By the end you can design prompts and test them against cases, return structured output, build retrieval with chunking, hybrid search and citations, run an agent loop with tools, budgets and human approval, decide when fine-tuning pays off, and ship with evals, tracing, cost monitoring and defences against prompt injection.
The AI Engineer roadmap
AI Engineer
-
Phase 1 LLM foundations
-
Phase 2 Prompt engineering
-
Phase 3 Building with LLMs
-
Phase 4 Choosing and running models
-
Phase 5 Retrieval and knowledge
-
Phase 6 Context engineering
-
Phase 7 Agents and tools
-
Phase 8 Fine-tuning and adaptation
-
Phase 9 Multimodal AI
-
Phase 10 Evaluation and testing
-
Phase 11 Security and responsible AI
-
Phase 12 AI application engineering in production
All topics, in order
Mark each topic Learning, Done or Skip, and sign in to save your place to your account. Done is your own word, not passing: a topic is passed when you score 50 or more on its questions. This order is the study plan.
-
Phase 1 · LLM foundations
-
AI basics: what it is and how to ask it
An AI assistant predicts likely words; it does not look facts up or know when it is wrong. That makes it strong at working with material you give it and weak as a source of facts. Learn to ask clearly, hand it the right material, check what comes back, and own what you send.
Start the 5 questionsTest yourself on this topic
5 graded questions · scored out of 100 with feedback · free
-
AI basics: using it safely at work
Using AI well at work is mostly judgment: which tool is safe for which material, which actions need your OK first, how to test a helper before trusting it, and how to split a big job into checkable steps. These habits matter more than any one tool.
Start the 5 questionsTest yourself on this topic
5 graded questions · scored out of 100 with feedback · free
-
What an AI engineer does
As an AI engineer you build products on models someone else trained, so your craft is the layer around the model: prompts, context, tools, tests, guardrails and cost. Reach for the cheapest fix first and climb to fine-tuning or training only when your own test set proves you need it. Knowing where your work ends and ML engineering begins keeps you from spending months on the wrong problem.
Reading
- The Rise of the AI Engineer (Latent Space) latent.space
- Anthropic: Building effective agents anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
How LLMs work
LLMs are next-token predictors that operate on tokens, not characters or words. Text is split by a tokenizer, and the fixed context window bounds how many tokens fit. Understanding tokens, context limits, and probabilistic generation explains truncation, cost, and why outputs vary.
Reading
- Anthropic: models overview docs.anthropic.com
- OpenAI: tokenizer guide platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Pre-training, post-training and inference
A model learns language and facts in pre-training, learns to follow instructions in post-training, and only runs during inference, where it learns nothing from your users. That one picture explains the knowledge cutoff, why fresh facts belong in the prompt, and why you pin a model version before it changes under you.
Reading
- Training language models to follow instructions (InstructGPT, arXiv) arxiv.org
- Hugging Face LLM Course: Transformer models huggingface.co
- Hugging Face: Generation with LLMs huggingface.co
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Why models make things up
Models make things up because they are built to produce plausible text and are often rewarded for guessing. You cannot train that out from the app side, but you can ground answers in sources, give the model a sanctioned way to say not found, check its quotes in code, and measure how often it invents. Persona lines and temperature zero feel like fixes and are not.
Reading
- Why Language Models Hallucinate (arXiv) arxiv.org
- Claude docs: Reduce hallucinations platform.claude.com
- A Survey on Hallucination in Large Language Models (arXiv) arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Prompting fundamentals
A prompt is the instruction and context you give the model. Clear, specific, constrained prompts, with explicit output formats and enumerated options, produce far more reliable results than vague requests. Prompting is the primary control surface before you reach for tools or fine-tuning.
Reading
- Anthropic: prompt engineering overview docs.anthropic.com
- OpenAI: prompt engineering platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Model APIs and tool use
Model APIs take messages and parameters and return generated text or tool-call requests. When you expose tools, the model asks to call a function; your code runs it and returns the result so the model can finish. Knowing this request/execute/return loop is the basis of every integration.
Reading
- Anthropic: tool use docs.anthropic.com
- OpenAI: function calling platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 2 · Prompt engineering
-
System prompts and roles
The system prompt sets the role, rules, tone and format for every turn, and models weigh it above user text. It is still not secret and not a lock, so you keep credentials out of it and enforce hard limits in code. Getting this split right is what keeps a clever user from talking your assistant past its rules.
Reading
- The Instruction Hierarchy (arXiv) arxiv.org
- Microsoft Learn: System message design learn.microsoft.com
- OpenAI Model Spec model-spec.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Examples in the prompt (few-shot)
Examples teach a model faster than descriptions, but it copies everything it sees, including details you never meant as rules. You get the benefit without the copying by using a few varied, clearly labelled examples that differ wherever real inputs differ. Watch label balance and order when the task is classification.
Reading
- Language Models are Few-Shot Learners (arXiv) arxiv.org
- Calibrate Before Use: few-shot biases (arXiv) arxiv.org
- Claude docs: Use examples effectively platform.claude.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Separating instructions from untrusted input
To a model, your instructions and a stranger's review are both just text. You reduce prompt injection by keeping instructions in the system prompt, wrapping untrusted content in clear markers and saying it is data. Because that lowers the odds without removing them, any action with real consequences also needs limits in code.
Reading
- OWASP GenAI: LLM01 Prompt Injection genai.owasp.org
- Indirect Prompt Injection (Greshake et al., arXiv) arxiv.org
- Claude docs: Structure prompts with XML tags platform.claude.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Step-by-step reasoning and reasoning models
Writing out steps before the answer gives a model room to work through multi-step problems, and reasoning models do this on their own. You get the gain only if the reasoning comes first and the final answer lands in its own field your code reads. Thinking costs tokens and time, so you spend it where the task has real steps.
Reading
- Chain-of-Thought Prompting Elicits Reasoning (arXiv) arxiv.org
- OpenAI docs: Reasoning models developers.openai.com
- Claude docs: Extended thinking platform.claude.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Prompt templates and versioning
A prompt is product logic, so you keep it as a template with named slots, store it in version control, and never edit a released version in place. Logging the prompt version and model with every request is what lets you answer which prompt made this output, and roll back in minutes when a change goes wrong.
Reading
- Langfuse docs: Prompt management langfuse.com
- OpenAI docs: Prompt engineering developers.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Testing a prompt against cases
A prompt fix that works on one example can break three others. You catch that by running every change against a saved set of real cases, comparing old and new case by case, and reading the new failures before you ship. Rerun to separate real change from run-to-run noise, and weigh failures by what they cost.
Reading
- Claude docs: Create strong empirical evaluations platform.claude.com
- OpenAI docs: Evals developers.openai.com
- promptfoo docs: Intro promptfoo.dev
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Prompt anti-patterns
Prompts go wrong in predictable ways: only saying what not to do, shouting in capitals, rules that contradict, vague goals and no output shape. You fix most of them by naming the reader and purpose, stating the task calmly, and showing the shape you want. Reviewing a prompt as a new hire would read it catches these fast.
Reading
- Claude docs: Prompting best practices platform.claude.com
- Google AI: Prompt design strategies aistudio.google.com
- OpenAI docs: Prompt engineering developers.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 3 · Building with LLMs
-
Structured output
Downstream code usually needs machine-parseable output. Provider structured-output modes and tool/JSON schemas constrain the model to emit only conforming data, which is far more robust than asking politely for JSON and parsing free text. Enforce the schema at the decoding layer.
Reading
- OpenAI: structured outputs platform.openai.com
- Anthropic: tool use for JSON docs.anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Sampling and determinism
Sampling parameters like temperature and top-p control randomness. Lower temperature (near 0, greedy decoding) makes outputs more stable and reproducible; higher temperature adds variety. Full byte-for-byte determinism is not guaranteed, but sampling settings are your main knob for testability.
Reading
- OpenAI: text generation params platform.openai.com
- Anthropic: Messages API docs.anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Streaming responses
Streaming sends the reply in chunks as the model writes it, so users see words in under a second instead of staring at a blank screen. It does not make the model finish sooner; it moves the first word earlier. You also take on new work: detect the final event, handle errors that arrive mid-stream, and parse JSON only after the stream ends.
Reading
- Anthropic: streaming messages docs.anthropic.com
- OpenAI: streaming API responses platform.openai.com
- MDN: using server-sent events developer.mozilla.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Errors, retries and rate limits
Model APIs fail in two kinds of ways: timing problems that clear on their own (rate limits, overloaded servers, dropped connections) and request problems that fail every time (bad input, a wrong key). Retry only the first kind, with exponential backoff and random jitter, and honour any wait time the server sends. Retrying the second kind wastes quota and hides real bugs.
Reading
- Anthropic: API errors docs.anthropic.com
- Anthropic: rate limits docs.anthropic.com
- AWS Builders' Library: timeouts, retries and backoff with jitter aws.amazon.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Prompt caching
Prompt caching lets the provider reuse its work on a prompt's unchanging opening, so repeated instructions and documents get cheaper and faster on the next call. It only pays when that opening matches exactly and another request arrives before the cache expires. Check the cache read and write counts in your usage data: all writes and no reads means you are paying for nothing.
Reading
- Anthropic: prompt caching docs.anthropic.com
- OpenAI: prompt caching platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Cost and latency
Different models trade capability against price and speed. Matching each task to an appropriately sized model, plus techniques like caching and limiting output length, keeps a product affordable and fast. Do not route every workload to the largest frontier model by default.
Reading
- Anthropic: models overview docs.anthropic.com
- OpenAI: pricing openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Batch processing
When nobody is waiting on a single answer, a batch API lets you submit thousands of requests at once and collect the results later, usually at a lower price and outside your live rate limits. Give every request a custom ID, since results can come back in any order, and resubmit only the items that failed. Test the prompt on a small sample before you pay for the full run.
Reading
- Anthropic: batch processing docs.anthropic.com
- OpenAI: Batch API guide platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Model routing and fallbacks
A fallback sends requests to a second model when the main one fails, so a provider outage does not become your outage. Switch on provider-side failures like timeouts and server errors, not on bad requests the backup would reject too. Give the backup its own tested prompt, run it through your evals, and log which model served every request so you can explain quality changes later.
Reading
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 4 · Choosing and running models
-
Closed and open-weight models
A closed model runs on the provider's computers and you reach it through an API; an open-weight model is one you can download and run wherever you like, including servers your client controls. Open weights give you data control and a model that does not change under you, but you take on the hosting. Read the license first: downloadable weights do not automatically mean you may use them in a product you sell.
Reading
- Open Source Initiative: Open Source AI Definition opensource.org
- Hugging Face: licenses on Hub repositories huggingface.co
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Reading model cards and benchmarks
A model card tells you what a model was built for, how it was tested and where it is weak. Before you trust a benchmark score, check that the test resembles your task and languages, read the limitations section, and ask whether the scores were self-reported or could be inflated by test data leaking into training. Use the card to build a shortlist, then test on your own examples.
Reading
- Model Cards for Model Reporting (arXiv) arxiv.org
- Hugging Face: model cards huggingface.co
- Benchmark contamination with rephrased samples (arXiv) arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Picking a model for the job
Start model selection with the rules a model must pass: the inputs it must accept, where the data may go, how fast it must answer and what the license allows. Drop every model that fails one, then test the survivors on your own real examples and choose the cheapest that meets your quality bar. This order stops you polishing a demo on a model you were never allowed to ship.
Reading
- Anthropic: choosing a model docs.anthropic.com
- Stanford CRFM: HELM holistic model evaluation crfm.stanford.edu
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
When a reasoning model is worth it
Reasoning models spend extra time and tokens working through a problem before they answer. That pays off on multi-step tasks with many rules that must all hold, especially when your current model fails and code can check the result. It is wasted on fast voice replies, simple high-volume labels and look-up questions, where users pay in waiting time for thinking that changes nothing.
Reading
- Anthropic: extended thinking docs.anthropic.com
- OpenAI: reasoning models guide platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Running models on your own machine
Tools like Ollama and llama.cpp let you run open-weight models on your own machine, so private data never leaves it and there is no per-request bill. The hard limit is memory: the weights must fit in RAM or GPU memory with room to spare, or the model spills to disk and crawls. Check the file size against your free memory, and pick a smaller or more compressed version when it is tight.
Reading
- Ollama on GitHub github.com
- llama.cpp on GitHub github.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Serving open models at scale
A GPU serving one request at a time spends most of its time waiting on memory, so its compute sits idle. Serving engines such as vLLM fix this with continuous batching, which slots new requests into the running batch as old ones finish, and with paged memory for each request's attention cache so more requests fit at once. Measure tokens per second across the whole server, not only one request's speed.
Reading
- vLLM documentation docs.vllm.ai
- PagedAttention: memory management for LLM serving (arXiv) arxiv.org
- Hugging Face: Text Generation Inference huggingface.co
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Quantization
Quantization stores each model weight in fewer bits: 8-bit roughly halves memory and 4-bit cuts it to about a quarter, often letting a model fit on one GPU or a laptop. The quality cost is usually small but uneven, and exact work like numbers, code and long instructions can suffer more than chat. Rerun your own test set on the quantized version before you ship it.
Reading
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Hugging Face Hub and Transformers
The Hugging Face Hub hosts a huge public library of open models, and the Transformers library can load one in a few lines, which makes it easy to skip the checks. Treat a Hub model like any outside dependency: read its license and card, pin an exact revision, prefer safetensors files over pickle-based ones, and read any custom code before you let it run on your servers.
Reading
- Hugging Face Hub documentation huggingface.co
- Hugging Face Transformers documentation huggingface.co
- Hugging Face: safetensors format huggingface.co
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 5 · Retrieval and knowledge
-
Embeddings and RAG basics
Embeddings map text to vectors so similar meaning sits close together. Retrieval-augmented generation chunks and embeds documents into a vector store, retrieves query-relevant chunks at inference, and passes them as context. RAG grounds the model in private or fresh knowledge it never trained on.
Reading
- Pinecone: retrieval-augmented generation pinecone.io
- OpenAI: embeddings guide platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Chunking documents
Before you can retrieve a document, you cut it into chunks, and each chunk gets one embedding. Make chunks too big and the embedding blurs many topics together; make them too small and a chunk loses the context that gives it meaning. Split on the document's own structure, carry the heading into each chunk, and test sizes against real questions, because chunking quietly caps how good your whole RAG system can be.
Reading
- Pinecone: chunking strategies for LLM applications pinecone.io
- Anthropic: contextual retrieval anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Vector databases and indexes
A vector database stores embeddings and finds the nearest ones to a query. Comparing against every vector is exact but slow at scale, so most systems use an approximate index such as HNSW or IVF that trades a little recall for a lot of speed. You tune that trade with the index's search settings, and you only know where you stand if you measure recall against exact search on real queries.
Reading
- Malkov and Yashunin: HNSW graphs (arXiv) arxiv.org
- FAISS wiki github.com
- pgvector: vector search for Postgres github.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Hybrid search
Vector search is good at meaning and paraphrase but often fumbles exact strings like error codes, part numbers and names. Keyword search such as BM25 is the reverse. Hybrid search runs both and merges the ranked lists, often with reciprocal rank fusion, so you get the strengths of each. Check your failed queries first: if many hinge on exact tokens, hybrid is usually the cheapest big win.
Reading
- Cormack et al.: reciprocal rank fusion (SIGIR paper, PDF) plg.uwaterloo.ca
- Elasticsearch: reciprocal rank fusion elastic.co
- Anthropic: contextual retrieval anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Reranking results
First-stage retrieval is built for speed, so its ranking is rough: the best passage is often in the top 50 but not the top 5. A reranker, usually a cross-encoder, reads the question and each candidate together and scores them far more precisely. Retrieve wide and cheap, rerank, then send only the best few to the model, and you improve answers without paying to stuff the context.
Reading
- Sentence Transformers: cross-encoders sbert.net
- Cohere: rerank overview docs.cohere.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Rewriting the user's query
What a user types is often a poor search query: follow-ups like "what about contractors?" lean on earlier turns, and vague questions miss the words the documents use. A small model step can rewrite the message into a standalone search query, split a compound question, or search several phrasings at once. Log the rewritten query next to the original, because when retrieval fails, that is the first thing you will want to see.
Reading
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Metadata filters and access control
Every chunk can carry metadata, such as source, date, department and who may read it, and the search can filter on it. That is how you keep answers current and in scope, and it is the only reliable way to enforce permissions: a model cannot keep a secret it has already been shown. Filter inside the search using the user's groups from your identity system, and keep chunk permissions in sync with the source.
Reading
- Pinecone: filter by metadata docs.pinecone.io
- OWASP GenAI: vector and embedding weaknesses genai.owasp.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Grounding and citations
Grounding means answering only from provided context and attributing each claim to its source. Requiring the model to cite the specific retrieved chunks it used makes answers verifiable and reduces confident fabrication and cross-document blending. Attribution is what earns stakeholder trust.
Reading
- Anthropic: reduce hallucinations docs.anthropic.com
- Pinecone: retrieval-augmented generation pinecone.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Measuring retrieval quality
If you only judge a RAG system by its final answers, you cannot tell a retrieval miss from a generation mistake. Build a set of real questions with the chunks that answer them, then score retrieval on its own with metrics like recall@k and MRR. Every change to chunking, embeddings, filters or top-k then gets a number you can compare, instead of a feeling from reading a few answers.
Reading
- Thakur et al.: BEIR retrieval benchmark (arXiv) arxiv.org
- Ragas documentation docs.ragas.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Context management
The context window is a scarce, costly resource. Curating what enters it, summarizing old turns, retrieving only top-k relevant chunks, and dropping low-signal content, improves both cost and answer quality. Stuffing the window full often dilutes relevance and hurts results.
Reading
- Anthropic: long context tips docs.anthropic.com
- Pinecone: chunking strategies pinecone.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 6 · Context engineering
-
What belongs in the context window
Everything you put in the context competes for the model's attention: instructions, tool definitions, documents and history. Adding more rarely makes an agent smarter, and past a point it starts missing rules and picking the wrong tools. For each call, load what this task needs, keep the rest one lookup away, and ask of every block whether the model would do worse without it.
Reading
- Anthropic: effective context engineering for AI agents anthropic.com
- Liu et al.: Lost in the Middle (arXiv) arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Short- and long-term memory
A model only knows what is in its current context, so memory is something you build. Short-term memory is the running conversation; long-term memory is a store outside the model that you write to and read back later. Save stable preferences, durable facts and corrections, leave out bulky one-off material and secrets, and let users see and delete what you keep, because a wrong memory repeats its mistake in every future session.
Reading
- Packer et al.: MemGPT, LLMs as operating systems (arXiv) arxiv.org
- Claude docs: memory tool platform.claude.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Summarising and compacting long histories
Long-running agents fill their context with tool output they have already acted on, and eventually they hit the limit or start losing the thread. Compaction replaces old history with a structured summary of the goal, the user's rules, decisions and open work, clears stale tool results, and keeps recent turns as they were. Done well, the agent carries on as if nothing happened; done carelessly, it forgets a rule the user set an hour ago.
Reading
- Anthropic: effective context engineering for AI agents anthropic.com
- Claude docs: context editing platform.claude.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Model Context Protocol (MCP)
MCP is an open standard for connecting AI applications to tools and data. You wrap a system once as an MCP server that lists its tools, resources and prompts, and any MCP-capable host, such as an IDE assistant, a chat app or an agent, can connect to it. Treat each server as code acting with real permissions: scope its access per user, and review third-party servers, since their tool descriptions go straight into your model's context.
Reading
- MCP: architecture overview modelcontextprotocol.io
- MCP: specification modelcontextprotocol.io
- MCP: security best practices modelcontextprotocol.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Isolating context for sub-agents
A sub-agent starts with a clean context, so it can read dozens of pages on one narrow job without crowding the lead agent's window. That only works if its brief is complete, since it cannot see the lead's history, and if it returns a short, sourced result instead of its raw notes. Use it for work that splits into independent parts; tightly linked steps that need shared detail are better kept in one context.
Reading
- Anthropic: how we built our multi-agent research system anthropic.com
- Claude Code docs: subagents code.claude.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
How context goes wrong
Many agent failures are context failures, not model failures. A guess gets written down as fact and reused (poisoning), a long history pulls the agent into repeating itself (distraction), too many tools or documents muddle its choices (confusion), or two sources disagree (clash). When an agent loops or drifts, look at what is in its context before rewriting its instructions, and fix the context itself.
Reading
- Chroma Research: context rot research.trychroma.com
- Liu et al.: Lost in the Middle (arXiv) arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 7 · Agents and tools
-
Workflow or agent?
A workflow is a path you write in code, with the model filling in steps; an agent lets the model choose its own path. If you could draw the task as a flowchart today, build the flowchart: it is cheaper, faster, and you can test and audit each step. Save agents for the parts where the next step truly depends on what the model finds.
Reading
- Anthropic: Building effective agents anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Tool use and function calling
Agents act through tools defined by a schema: a name, description, and typed parameters. Precise, well-described schemas with required parameters and constraints guide the model to call the right tool with valid arguments, which is essential for money-moving or state-changing actions.
Reading
- Anthropic: tool use docs.anthropic.com
- OpenAI: function calling platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Designing tools a model can use
The model never sees your code, only each tool's name, description, inputs and what it sends back. Give tools clear names, merge ones that overlap, return short filtered results instead of whole tables, and write error messages that say how to fix the call. Then read real agent transcripts, because a tool that makes sense to you can still confuse the model.
Reading
- Anthropic: Writing effective tools for agents anthropic.com
- Model Context Protocol: Tools specification modelcontextprotocol.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
The agent loop
An agent runs a loop: reason, call a tool, observe the real result, then decide the next action. Feeding actual observations back lets the model adapt to what happened instead of guessing. This observe-then-act cycle is the defining structure of agentic systems.
Reading
- Anthropic: building effective agents anthropic.com
- Anthropic: tool use docs.anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Planning and breaking down tasks
Before an agent starts a large job, have it write a short plan: the full scope, the change pattern, the order, and a check for each step. Then let it update the plan when reality surprises it, instead of following a frozen script. A visible plan keeps the work consistent, lets you catch a wrong idea before any code changes, and shows exactly how far the job got.
Reading
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Multi-step workflows
Real tasks span several dependent steps. Decomposing them into discrete steps with explicit success checks and gating, so downstream actions run only after upstream steps verifiably succeed, keeps agents correct under partial failure and prevents unsafe actions like paying after a failed lookup.
Reading
- Anthropic: building effective agents anthropic.com
- OpenAI: function calling platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Stopping conditions and budgets
An agent whose only exit is the model deciding it is done can loop for hours. Put hard limits in code on steps, tokens, wall-clock time and repeated identical calls, and when one trips, return the partial work with the reason it stopped. Set the numbers from real runs, so a stuck agent costs you a little and tells you where it got stuck.
Reading
- OpenAI Agents SDK: Running agents (max turns) openai.github.io
- Anthropic: How we built our multi-agent research system anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Human approval checkpoints
Put a human approval pause in front of the actions that are hard to undo, high in impact or seen by customers, such as large refunds, mass emails and deletes. Enforce it in code at the tool, show the reviewer the exact action and why, and save the agent's state so it can wait. Gate too much and people approve without reading, which leaves you with no real check at all.
Reading
- OWASP GenAI: LLM06 Excessive Agency genai.owasp.org
- OpenAI Agents SDK: Human in the loop openai.github.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Multi-agent patterns
Several agents help when work splits into independent parts, such as a lead agent sending helpers to research ten companies at once, each with a clean context. They also multiply tokens, lose detail at every handoff, and make failures harder to trace. Measure where one agent fails first: a broken lookup is fixed by a better tool, not by more agents around it.
Reading
- Anthropic: How we built our multi-agent research system anthropic.com
- OpenAI Agents SDK: Handoffs openai.github.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Agent SDKs and frameworks
Every agent framework wraps the same core: a model call, a tool list and a loop that feeds results back. Build that loop yourself once so you know what a framework adds, then adopt one when it solves a problem you actually have, like runs that pause for days or tracing hundreds of runs. Whatever you pick, make sure you can still see the exact prompt sent to the model.
Reading
- OpenAI Agents SDK documentation openai.github.io
- Claude Agent SDK overview docs.claude.com
- LangGraph documentation langchain-ai.github.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 8 · Fine-tuning and adaptation
-
Prompt, RAG or fine-tune?
Before you train anything, name the problem. If the model lacks facts or the facts change, retrieval lets you update a document instead of a model and show users the source. Fine-tuning earns its cost when you need a steady style, format or narrow skill that a prompt cannot hold. Start with the prompt, measure, then add the tool that fits the failure you see.
Reading
- OpenAI: optimizing LLM accuracy platform.openai.com
- Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs arxiv.org
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Preparing training data
A fine-tuned model copies whatever your examples show, mistakes included, so data preparation is most of the job. You will get further with a few hundred clean, correctly formatted examples than with thousands of raw logs. Mask personal details, remove near-duplicates, and split your test set by whole conversation so your scores are honest.
Reading
- Hugging Face TRL: dataset formats and types huggingface.co
- LIMA: Less Is More for Alignment arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Parameter-efficient fine-tuning (LoRA)
LoRA freezes the base model and trains a small adapter beside it, so you can tune a big model on modest hardware and store each version as a small file. Because one base model can serve many adapters, you can keep separate tunes for separate customers or tasks without paying to run full copies. Use it for style, format and narrow skills, and compare it with a full fine-tune when the task is hard.
Reading
- LoRA: Low-Rank Adaptation of Large Language Models arxiv.org
- QLoRA: Efficient Finetuning of Quantized LLMs arxiv.org
- Hugging Face PEFT documentation huggingface.co
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Preference tuning (RLHF and DPO)
Preference tuning teaches a model from pairs of answers where people picked a winner. DPO trains on those pairs directly, while RLHF first trains a reward model to score answers. You need to know that people's picks favor longer, more confident and more agreeable answers, so a rising win rate can hide a model that got wordier or less accurate.
Reading
- Training language models to follow instructions with human feedback arxiv.org
- Direct Preference Optimization (DPO) arxiv.org
- Hugging Face TRL: DPO Trainer huggingface.co
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Evaluating a fine-tuned model
A high score on a held-out split from your training source tells you less than it seems. Before you ship a tune, test it on the data it will really meet and on the other tasks your app still needs, side by side with the base model. That is how you catch distribution shift and forgotten skills before your users do.
Reading
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Distilling into a smaller model
Distillation uses a large teacher model to label lots of real inputs, then trains a small student on them, so you get much of the skill at a fraction of the cost and latency. The student learns the teacher's mistakes too, so you score it against labels people made, never against the teacher's own. That tells you exactly how much accuracy you traded for speed.
Reading
- Distilling the Knowledge in a Neural Network arxiv.org
- Distilling Step-by-Step arxiv.org
- Hugging Face TRL: Distillation Trainer huggingface.co
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 9 · Multimodal AI
-
Images as input
Vision models read photos, screenshots and charts, but most APIs shrink large images first, so a small detail can vanish. Crop to the part that matters, ask a precise question that allows an unreadable answer, and check the result against data you already have. A bigger model cannot recover detail that was never in the picture it received.
Reading
- Anthropic: Vision docs.anthropic.com
- OpenAI: Images and vision platform.openai.com
- Google Gemini API: Image understanding ai.google.dev
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Reading documents and PDFs
A digital PDF has an exact text layer; a scanned one is only pictures of pages, so a text extractor finds nothing. Check each file and route it: use the text layer when it exists, add page images when tables or layout matter, and send scans to a vision model or OCR. Then make the numbers prove themselves, because a misread digit looks perfectly normal.
Reading
- Anthropic: PDF support docs.anthropic.com
- Google Gemini API: Document understanding ai.google.dev
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Speech in and out
A voice app chains speech to text, a language model and text to speech, or uses one model that hears and speaks. On a phone call, silence feels broken, so stream every stage: transcribe while the caller talks, speak the first sentence while the rest is written, and stop when the caller cuts in. Read names and numbers back, because transcription mishears exactly the details that matter.
Reading
- OpenAI: Speech to text platform.openai.com
- OpenAI: Realtime API platform.openai.com
- Robust Speech Recognition via Large-Scale Weak Supervision (arXiv) arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Generating images
Image models are great at scenes, moods and variations, but exact text, logos and real products drift because the model redraws them every time. Let the model make the creative background and place the real logo, product photo and typed text on top with ordinary design code. Keep provenance labels such as C2PA content credentials, and have a person review images before they go public.
Reading
- OpenAI: Image generation platform.openai.com
- C2PA: Coalition for Content Provenance and Authenticity c2pa.org
- High-Resolution Image Synthesis with Latent Diffusion Models (arXiv) arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Multimodal cost and limits
Images, PDFs and audio all become tokens: image cost grows with size, PDF pages can cost text plus image tokens, and audio is billed by length. Send only the part the task needs, at the size it needs: crop screenshots, find the relevant pages with cheap text search first, and trim audio. Check file size and page limits before you send, so users get a clear message instead of an error.
Reading
- Anthropic: Vision (image size and token cost) docs.anthropic.com
- Google Gemini API: Understand and count tokens ai.google.dev
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 10 · Evaluation and testing
-
Building a golden dataset
Your golden dataset is the test every change must pass, so it has to look like real use. Build it from real questions, sampled by type, with the known hard cases put in on purpose and expected answers written or checked by people who know the subject. Freeze and version it so scores stay comparable over time.
Reading
- Anthropic: define success criteria and build evaluations docs.anthropic.com
- OpenAI: evaluation best practices platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Using a model as a judge
A model judge lets you grade thousands of open-ended outputs, but it carries position, length and self-preference biases. You control them by swapping answer order, giving a written rubric, using a different model family where you can, and checking the judge's verdicts against a sample labelled by people. Until you have done that, its win rate is a guess.
Reading
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Regression tests in CI
Model evals are noisy, so a fixed score bar in CI fails at random and teaches your team to re-run until green. Make deterministic checks such as schema, refusals and required fields a hard gate, and compare scored checks to the main branch baseline with a tolerance set from measured noise. Then a red build means something broke.
Reading
- Promptfoo: CI/CD integration for LLM evals promptfoo.dev
- OpenAI Evals framework (GitHub) github.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Measuring faithfulness
Faithfulness asks whether every claim in a RAG answer is backed by the passages you retrieved, which is a different question from whether it is correct. Similarity scores and single 1 to 10 ratings let one invented detail slip through. Break answers into claims and check each one, so you see the exact sentence that went beyond the sources.
Reading
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Online evaluation and A/B tests
Offline evals tell you a change is safe to try; an A/B test with real users tells you whether it helped. Randomize by user, fix your metric and sample size before launch so you do not stop on a lucky day, and set guardrails for cost, latency and complaints that trigger a rollback. Treat thumbs-up rates as a thin signal, since most users never vote.
Reading
- Trustworthy Online Controlled Experiments (Kohavi, Tang, Xu) experimentguide.com
- Google: Rules of Machine Learning developers.google.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Human review loops
Your reviewers can only check a small share of output, so decide where their time goes. Route high-risk and low-confidence items to people, add a random sample of the rest to catch confident mistakes and measure the real error rate, and log every edit. Those edits become your next test cases and training data.
Reading
- Google PAIR: People + AI Guidebook pair.withgoogle.com
- NIST AI Risk Management Framework nist.gov
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 11 · Security and responsible AI
-
Prompt injection, direct and indirect
Indirect prompt injection hides instructions in content your app reads for the user, such as a web page or an email, so the attacker never talks to your app at all. Filters and prompt warnings lower the success rate but do not reach zero. Find the three legs of real damage (private data, untrusted content, a way to send data out) and remove one in code, so a steered model has nothing to work with.
Reading
- OWASP GenAI: LLM01 Prompt Injection genai.owasp.org
- Greshake et al.: indirect prompt injection (arXiv) arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Least privilege for tools
An agent can do whatever its tool credentials allow, not whatever its prompt says. Give each tool a narrow job, a login that can only reach the data that job needs, and limits on rows, rate and time. Ask what a fully hijacked model could do with its current access, and shrink the access until the answer is small. Save human approval for the few high-impact actions that remain.
Reading
- OWASP GenAI: LLM06 Excessive Agency genai.owasp.org
- Model Context Protocol: security best practices modelcontextprotocol.io
- NIST glossary: least privilege csrc.nist.gov
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Protecting private data
User text in an AI feature gets copied into prompts, logs, traces, caches, vector stores and eval sets, and every copy can leak. Map those flows, redact personal details before storage, set retention, and choose provider settings that fit your data. A line in the prompt asking the model to forget protects nothing: the controls that work live in your systems and your contracts.
Reading
- OWASP GenAI: LLM02 Sensitive Information Disclosure genai.owasp.org
- Microsoft Presidio: detect and redact personal data microsoft.github.io
- NIST Privacy Framework nist.gov
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Jailbreaks and red teaming
A jailbreak is one example of a family of attacks, such as role play or a request split across turns, so patching the exact prompt leaves its siblings open. Turn every red-team finding into many variants, run them as an automated suite, and rerun it whenever the prompt or model changes. You cannot prove a model has zero jailbreaks, but you can stop known ones from coming back.
Reading
- Anthropic: mitigate jailbreaks and prompt injections docs.anthropic.com
- Perez et al.: Red Teaming Language Models with Language Models arxiv.org
- PyRIT: open-source red-teaming toolkit github.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Content moderation
A moderation classifier gives you a score per category; your app decides what each score means. Pick thresholds per category using your own labeled data, and choose an action for each: block, warn, route to a special flow, or send to a human. In some products the right response to a flag is care rather than a block, so design each action around the person who sent the message.
Reading
- OpenAI: moderation guide platform.openai.com
- Llama Guard: LLM-based input-output safeguard (arXiv) arxiv.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Checking for bias
LLMs can treat people differently based on names, pronouns or proxies like schools and gaps in work history, and overall averages can hide it. Measure with counterfactual pairs that change one group signal and nothing else, and compare outcomes per group with enough examples to trust the gap. Asking the model to be fair is not a test, so keep the test set and rerun it after every change.
Reading
- NIST SP 1270: managing bias in AI doi.org
- Tamkin et al.: evaluating discrimination in LLM decisions (arXiv) arxiv.org
- Fairlearn: assess and improve fairness fairlearn.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
-
Phase 12 · AI application engineering in production
-
Evaluation
You cannot improve what you do not measure. A labeled evaluation set of representative inputs with expected outputs lets you compare prompt or model versions on defined metrics before shipping, catching regressions that spot-checks and self-assessment miss.
Reading
- Anthropic: define success and eval docs.anthropic.com
- OpenAI: evals platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Safety and guardrails
Production agents need input/output guardrails. Treat retrieved and tool content as untrusted data isolated from instructions, apply least privilege, and gate high-impact actions behind confirmation or policy checks. These defenses mitigate prompt injection and data exfiltration.
Reading
- OWASP: LLM prompt injection (LLM01) genai.owasp.org
- Anthropic: mitigate jailbreaks docs.anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Observability and deployment
Once live, you need to see what the system does. Logging each request's prompt, model, response, latency, token usage, and errors, with privacy handling, lets you reproduce bad answers, monitor cost, and iterate. Instrument observability before, not after, your first incident.
Reading
- OpenAI: production best practices platform.openai.com
- Anthropic: Messages API docs.anthropic.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Tracing LLM calls
One user request can pass through query rewriting, search, reranking, several model calls and tools. A trace ties them together as spans under one id, with timing and details on each, so you can see which step was slow and whether the system fetched the wrong documents or the model misused the right ones. Store the trace id with user feedback so every complaint leads straight to the evidence.
Reading
- OpenTelemetry: traces and spans opentelemetry.io
- OpenTelemetry: semantic conventions for generative AI opentelemetry.io
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Caching responses
Response caching saves money and time, but a cache that returns the wrong answer is worse than none. Cache only answers that are the same for everyone, or scope the key to the user; include the prompt and model version in the key; and give entries an expiry so changes reach users. Track how often cached answers are wrong, not just how often the cache hits.
Reading
- RFC 9111: HTTP caching (keys and freshness) rfc-editor.org
- GPTCache: semantic cache for LLM responses github.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Making it faster
Before you speed anything up, trace a slow request and map which steps depend on which. Steps that only need the original input can run at the same time, so the wait becomes the slowest call instead of the sum of all of them. Streaming helps when a person is reading, not when a program needs the whole result, and raising a time limit hides slowness rather than fixing it.
Reading
- Anthropic: reducing latency docs.anthropic.com
- OpenAI: latency optimization platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Cost monitoring and budgets
Token bills jump from agent loops, retries, growing chats and single heavy users, and the monthly invoice reports it weeks too late. Tag every request's cost by feature and customer, alert when spend jumps above its normal level, and put hard caps in your own code, such as retry limits and daily budgets per customer. Caps act at 3 a.m. when nobody is watching.
Reading
- Anthropic: usage and cost API docs.anthropic.com
- OpenTelemetry: generative AI metrics opentelemetry.io
- FinOps Foundation: what is FinOps finops.org
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Versioning prompts and models
A model alias like 'latest' lets the provider decide when your feature's model changes, and a newer model can still break your parser with a new date format or a missing field. Pin the exact model id, log it with the prompt version on every call, and treat each upgrade as a change you test on your eval set before release. Watch retirement notices so you move on your schedule, not in a rush.
Reading
- Anthropic: model deprecations docs.anthropic.com
- OpenAI: deprecations platform.openai.com
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Gradual rollout and feature flags
An offline eval win is not proof the new model is better for real users. Put the change behind a feature flag, send a small and stable share of users to it, compare errors, latency, cost and quality against the old path, and widen in steps. Write your rollback rules before you start, so a bad sign leads to action rather than debate, and remove the flag once the rollout is done.
Reading
- Google SRE Workbook: canarying releases sre.google
- Martin Fowler: feature toggles martinfowler.com
- OpenFeature: open standard for feature flags openfeature.dev
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Handling AI incidents
AI incidents rarely crash anything: the model just says something wrong, fluently, to many people. Stop the harm first with a kill switch or rollback, save the traces and the versions that were live, and tell support and the people who own the decision. Find the cause after the harm has stopped, then turn the bad cases into eval tests so the same failure cannot ship again.
Reading
- Google SRE Book: managing incidents sre.google
- Google SRE Book: postmortem culture sre.google
- AI Incident Database incidentdatabase.ai
Start the 3 questionsTest yourself on this topic
3 graded questions · scored out of 100 with feedback · free
-
Practise the AI Engineer roadmap
274 questions, each graded on the server out of 100. Free · no card.
Other AI careers
- Agent Engineer
- AI Alignment Researcher
- AI Data Engineer
- AI Evals Engineer
- AI Governance Analyst
- AI Infrastructure Engineer
- AI Integration Engineer
- AI Product Manager
- AI Red Team Specialist
- AI Reliability Engineer
- AI Research Engineer
- AI Safety Engineer
- AI Security Engineer
- AI Solutions Architect
- AI Strategist
- Computer Vision Engineer
- Context Engineer
- Conversational AI Designer
- Forward-Deployed Engineer
- Inference Optimization Engineer
- ML Engineer
- Multimodal AI Engineer
- Post-Training Engineer