AI Engineer
Roadmap 2027
The AI Engineer Roadmap 2027 is a free learning path for software engineers who want to ship AI in production. It has 8 stages and 46 modules, from tokens and evals to RAG, agents, security and operations. Each stage ends with one thing to ship.
You build the system in layers. Each layer stands on the layers below it. From stage 03, evals go through each layer.
By Tadej Polajnar ·
Phase I · Foundations
LLM mechanics and model selection
Know how a model reads tokens, generates text and fails.
| No. | Module | Lesson |
|---|---|---|
| 01.1 | Tokenization and unit cost Why character counts mislead, and how to estimate API spend. | Coming soon |
| 01.2 | Transformers: a practical intuition Embeddings, attention and context, without the math. | Coming soon |
| 01.3 | Prefill, decode and the KV cache Why the first token and the next tokens have different speeds. | Coming soon |
| 01.4 | Sampling and non-determinism Temperature, top-p, and why temperature 0 can still change the result. | Coming soon |
| 01.5 | Reasoning models and test-time compute When more thinking helps, and when it only adds latency and cost. | Coming soon |
| 01.6 | Failure modes and the model landscape Hallucination, sycophancy, lost context, and how to choose a model by workload. | Coming soon |
LLM APIs and prompting
Use the raw SDK, streaming, schemas and tools before a framework.
| No. | Module | Lesson |
|---|---|---|
| 02.1 | Raw SDKs, conversation state and streaming Direct provider calls, message arrays, and token streams that the user can cancel. | Coming soon |
| 02.2 | Schema-enforced structured outputs A schema that the API enforces, and validation in code. | Coming soon |
| 02.3 | Tool calling and tool design Narrow tools, clear parameters, and errors that help the model correct itself. | Coming soon |
| 02.4 | System prompts and few-shot examples Stable policy, untrusted input, and rules for when to abstain. | Coming soon |
| 02.5 | Concurrency, retries, timeouts and fallbacks Parallel calls, backoff on rate limits, and a second model when the first fails. | Coming soon |
| 02.6 | Prompt versions, prefix caching and basic tracing Version prompts like code, order them for the cache, and log each request. | Coming soon |
Phase II · Measure and retrieve
Evaluations first
Without an eval, each prompt change is a guess. All later stages report to this one.
| No. | Module | Lesson |
|---|---|---|
| 03.1 | Golden datasets from real failures A small test set of normal cases, edge cases and real failures. | Coming soon |
| 03.2 | Code assertions and LLM-as-judge Fast code checks first. A calibrated model judge for open answers. | Coming soon |
| 03.3 | Offline and online evaluation Regression runs before release, and samples from production after it. | Coming soon |
| 03.4 | Regression suites and side-by-side diffs The same inputs, two versions, and a pinned baseline. | Coming soon |
| 03.5 | Quality, latency and cost in one report Each run reports latency, tokens, errors and cost per query. | Coming soon |
Retrieval and production RAG
Retrieval precision decides if a knowledge product works. Prompt wording does not.
| No. | Module | Lesson |
|---|---|---|
| 04.1 | Document ingestion and dirty data PDFs, tables and HTML, with deduplication and incremental updates. | Coming soon |
| 04.2 | Structure-aware chunking and metadata Split on structure, and keep the metadata for filters. | Coming soon |
| 04.3 | Embeddings and vector databases Choose an embedding model, and know the trade-offs of the index. | Coming soon |
| 04.4 | Hybrid retrieval: BM25 and dense Keyword search finds exact IDs. Vectors find meaning. Use the two together. | Coming soon |
| 04.5 | Structured data and safe text-to-SQL Read-only queries, row-level scope, and validation before execution. | Coming soon |
| 04.6 | Reranking, citations and RAG evals Rerank the top results, cite the source, and measure retrieval and answers separately. | Coming soon |
Phase III · Agentic systems
AI agents and tool protocols
Go from fixed pipelines to loops with limits, real tools and human approval.
| No. | Module | Lesson |
|---|---|---|
| 05.1 | Manual ReAct and planning loops Write a tool loop with a step limit before you use a framework. | Coming soon |
| 05.2 | MCP: the Model Context Protocol Build and use servers that give a model tools, resources and prompts. | Coming soon |
| 05.3 | State graphs and multi-agent patterns Durable state and checkpoints, and when one agent is better than many. | Coming soon |
| 05.4 | Sandboxes and browser agents Run generated code in isolation. Use a browser when there is no API. | Coming soon |
| 05.5 | Budgets, agent UX and human approval Step and cost limits, loop detection, and approval before an action you cannot undo. | Coming soon |
| 05.6 | Trajectory and recovery evals Score the tool calls and the recovery from failures, not only the answer. | Coming soon |
Context and harness engineering
The context window is a limited resource. Engineer it. Do not only append to it.
| No. | Module | Lesson |
|---|---|---|
| 06.1 | Context window budgets A token budget for policy, history, retrieved text and tool output. | Coming soon |
| 06.2 | Compaction and rolling summaries Compact before the window fills. Keep decisions, constraints and open tasks. | Coming soon |
| 06.3 | Memory and state offloading Keep work in files or a database, and load only what the step needs. | Coming soon |
| 06.4 | Tool-context hygiene Filter long tool results, paginate, and load tool lists only when necessary. | Coming soon |
| 06.5 | Harness engineering and AGENTS.md Durable instructions, verification hooks, and work that continues across sessions. | Coming soon |
| 06.6 | Deep-research and long-horizon loops Split the question, search wide and then deep, and know when to stop. | Coming soon |
Phase IV · Trust and production
AI security and guardrails
A prompt is not a security boundary. Enforce permissions in code.
| No. | Module | Lesson |
|---|---|---|
| 07.1 | Threat models and trust boundaries Map each untrusted input: prompts, documents, web pages and tool output. | Coming soon |
| 07.2 | Direct and indirect prompt injection Instructions hidden in documents and tool results, and how to contain them. | Coming soon |
| 07.3 | Least-privilege tool authorization Separate read tools from destructive tools. Check permissions on the server. | Coming soon |
| 07.4 | Tenant isolation for RAG and memory Apply access rules at retrieval time, so no data crosses tenants. | Coming soon |
| 07.5 | PII redaction and secret hygiene Redact before the provider call. Keep credentials out of prompts and logs. | Coming soon |
| 07.6 | Adversarial red-teaming Automated attacks for jailbreaks, injection and secret extraction before launch. | Coming soon |
AI system design and LLMOps
Make the build fast, visible and cost-controlled, with a safe rollback.
| No. | Module | Lesson |
|---|---|---|
| 08.1 | Model routing and LLM gateways Route by task, latency and cost, with failover and spend caps per tenant. | Coming soon |
| 08.2 | Latency and caching architecture Streaming, parallel calls, prefix caching and safe semantic caching. | Coming soon |
| 08.3 | Evals as CI/CD release gates Run evals on each change, and block the merge when quality drops. | Coming soon |
| 08.4 | End-to-end tracing and observability Spans for retrieval, prompts, tool calls and model latency. | Coming soon |
| 08.5 | Incidents, model drift and rollbacks Detect silent model changes, and roll back a prompt or a model fast. | Coming soon |
Questions
Why do evaluations come before RAG and agents?
Without an eval, you cannot tell if a new chunk size, a reranker or a prompt made the result better. Stage 03 gives each later stage a score, a latency number and a cost per query.
Do I need fine-tuning to become an AI engineer?
No. Most production problems are solved first by better retrieval, structured outputs, caching and model routing. Fine-tuning comes after your evals show a gap.
Should I learn a framework or the raw API first?
Start with the raw provider SDK, a schema for outputs and a tool loop that you write by hand. Then a framework is easy to learn, and you know what it hides.
Start with 24 Days of Production AI
One short lesson per door. Eight stages, three doors for each stage.