Sefism AI Engineering Roadmap
A seven-stage path for developers who can already ship a web or backend app and want to build products on large language models, in Python or TypeScript: tokens and context, prompting and model APIs, RAG with citations, evals in CI, tool calling and MCP servers, agents with durable execution, and running AI features in production. One project grows through every stage. By the end you can build, evaluate and run an LLM feature with retrieval, tools and agents, and explain what it costs, how you measured it and where it fails.
7
Sefism · Oct 2026
60
Sefism · Oct 2026
About 205
Sefism · Oct 2026
4 to 5 per language
Sefism · Oct 2026
Python, TypeScript
Sefism · Oct 2026
Roadmap
AI & Machine Learning
Sefism
About 205 hours, 17 weeks at 12 hours a week
Intermediate
Free
What this roadmap is
The AI engineering roadmap is Sefism's path for developers who can already ship a web or backend app and now want to build products on large language models. It does not teach you to train models. It teaches you to build on them properly: how tokens and context drive cost and quality, prompting and model APIs, retrieval over your own documents, evaluation, tool calling and MCP, agents that survive crashes, and running all of it in production.
You choose your language when you set it up: Python (most libraries and examples) or TypeScript (if you ship web products). The stages and topics are the same; milestones, libraries and suggested projects change with the language. In Python the milestones use an official provider SDK and Pydantic; in TypeScript they use the AI SDK, Next.js or Node.js, and Zod.
What you can do at the end
The roadmap sets five outcomes:
- Estimate the token cost of a feature and decide what earns a place in the context window.
- Build a RAG service over your own documents that cites its sources and refuses when retrieval finds nothing.
- Measure every prompt, model or retrieval change with an eval suite that runs in CI.
- Design tools and an MCP server a model uses reliably, and an agent that resumes after a crash.
- Run a feature in production with tracing, guardrails, caching and model routing at a known cost per request.
Put simply, you can build, evaluate and run an LLM feature with retrieval, tools and agents, and explain what it costs, how you measured it and where it fails.
Who it suits, and who should start elsewhere
It suits backend, full stack and web developers who want to add AI features to real products or move into AI engineer roles.
It is not a first programming course. If you cannot yet build and deploy a small app with a database, start with the Backend development or Full stack development roadmap. If you want to train and evaluate models from data rather than build on hosted ones, the Machine learning roadmap is the right path. If agents are your main interest, follow this roadmap first and then AI agents and MCP; for deploying and operating models, see MLOps and LLMOps.
Time and pace
The seven stages total about 205 hours. The first stage is a foundation you can skim if you already understand tokens, context and model pricing.
| Weekly time on Sefism | Roughly how long |
|---|---|
| 10+ hours (planned as 12) | about 17 weeks |
| 6 to 10 hours (planned as 8) | about 26 weeks |
| 3 to 6 hours (planned as 5) | about 41 weeks |
A student or someone between roles (10 to 12 hours): one session on the stage's reading, two building sessions on the running project, and one session reading real outputs and updating your eval set. From stage 3 onwards every stage builds on the same RAG project, so keep it in one repository.
Someone working full time (about 5 hours): one evening for reading and a weekend block for building. Keep API spending low with a local model through Ollama for experiments, which stage 2 sets up.
Stage by stage
1. How LLMs work: tokens and context (about 15 hours, foundation)
What a model does (predicting the next token), tokens and tokenisation, the context window as a budget, token pricing and rate limits, temperature and sampling, why models hallucinate, choosing a model on quality, cost and latency, and optionally reasoning models and effort settings.
Milestone: take one real prompt, count its input and output tokens, work out its cost per 1,000 requests on two models, and write down which parts of the context earn their place.
2. Prompting and model APIs (about 25 hours)
The chat messages API, specific instructions and output format, system prompts, few-shot examples, prompts in version control, streaming, timeouts, retries and backoff, and hosted versus local models.
Milestone: a small tool (a Python command-line tool, or a Next.js or Node.js endpoint) that turns messy text such as a job post into a fixed output format, streams its reply, retries on timeouts, and runs against both a hosted model and a local one through Ollama.
3. RAG: embeddings, chunking and retrieval (about 35 hours)
What RAG is, embedding models, semantic search and cosine similarity, chunking strategies, vector search with pgvector, hybrid search, reranking, grounded answers with citations, refusing when retrieval finds nothing, and RAG versus fine-tuning.
Milestone: a question answering service over a real document set, such as your university handbook, that cites the passage it used, says it does not know when retrieval finds nothing, and logs what was retrieved for every question.
4. Evals: measure before you add more (about 25 hours)
The step most people skip. What an eval is and why vibes fail, error analysis on real outputs, a test set of 20 to 50 questions, code-based assertions, LLM-as-judge checked against your own labels, retrieval metrics, regression runs in CI, and prompt injection test cases.
Milestone: an eval suite for your RAG project with at least 20 questions, a retrieval check, an LLM-as-judge score and five prompt injection cases, run in CI on every prompt change, with the score recorded before and after one change.
5. Tool calling, structured output and MCP (about 30 hours)
The tool calling loop, tool names, descriptions and parameters, structured output with schemas, validating and repairing model output, tool errors a model can recover from, MCP hosts, clients and servers, tools, resources and prompts, MCP transports, building and testing an MCP server, and tool-selection evals.
Milestone: your RAG search wrapped as a tool and as an MCP server built with the official SDK for your language, tested with the MCP Inspector and a real client, structured output validated with Pydantic or Zod, and ten tool-selection cases added to your evals.
6. Agents and durable execution (about 35 hours)
Workflows versus agents, the agent loop written by hand, context engineering across steps, step, time and cost limits, checkpoints and resumable runs, human approval before risky actions, and optionally when multiple agents are worth it.
Milestone: an agent that uses your MCP tools, has a step limit and a cost cap, pauses for approval before any write action, and continues from its last completed step after you kill the process mid-run.
7. Running AI systems in production (about 40 hours)
Tracing model, retrieval and tool calls, prompt injection defence, input and output guardrails, prompt caching, semantic caching, model routing and fallbacks through an LLM gateway, latency, cost and rate-limit budgets, AI system design end to end, and optionally fine-tuning and self-hosted inference.
Milestone: one project deployed with a trace on every request, guardrails that pass your injection cases, a cache and a cheaper model for easy queries with a fallback, and a one-page design doc covering cost per request, latency and failure modes.
Projects to build
Suggested projects from the Sefism library, matched to your language:
- Retrieval assistant for university regulations: RAG with citations, where refusing to answer is the hard part.
- Evaluation harness for language model applications: proves you can measure LLM quality.
- LLM gateway with semantic cache and model routing: the production stage as one service.
- Multi-step agent workflow runner with cost tracking (Python).
- Model Context Protocol server for university systems and Campus lost and found with visual search (TypeScript).
How it works on Sefism
The public page at /roadmaps/ai-engineering/ shows the full stage list, with the first two stages open to read. Everything on Sefism is free to learn from. A few actions use credits, such as adding a roadmap to your dashboard; new members get starting credits, the first roadmap is free, and if you are learning seriously and run out you can ask for more.
Adding the roadmap opens every stage in your dashboard. You choose Python or TypeScript and your weekly hours, track progress topic by topic, and each topic has an explanation, a check question to answer without notes, and a prompt that makes an AI assistant quiz you instead of doing the work. Following the roadmap also unlocks the companion cheat sheet. For questions about a stage or your project, send Tauseef a query or book a 1:1 session.
The companion cheat sheet
The AI engineering cheat sheet follows the same order in eight chapters, with Python and TypeScript editions and snippets for each. Use it after each stage and before a technical conversation.
Related on Sefism
- Should I become an AI engineer or stay a full stack developer?
- Everyone talks about agents, RAG, MCP and LLMs. How do I know what is actually worth learning?
- What is MCP, and do I need to learn it?
- How do I prove my AI agent project actually works?
- Building Effective Agents and Applied LLMs: what we learned from a year of building, both used in the later stages.
- OWASP Top 10 for LLM Applications for stage 7.
What you can do afterwards
You will have one project that grew from a prompt into a traced, evaluated, guarded service with tools, an MCP server and an agent, plus numbers for its cost, latency and quality. That is what AI engineering roles look for: not a demo, but a feature you can measure and run.
Frequently asked questions
How long does it take to become an AI engineer? This roadmap is about 205 hours on top of existing web or backend skills: around 17 weeks at 12 hours a week, or around 41 weeks at 5.
Do I need machine learning or maths first? No. Stage 1 gives you the mental model of tokens and context you need, and the roadmap's advice is to leave the attention maths until you have shipped something. If you want to train models, follow the machine learning roadmap.
Python or TypeScript for AI engineering? Python has the most libraries and examples; TypeScript suits you if you ship web products. Both editions cover the same topics.
Do I need a framework like LangChain to build agents? The roadmap asks you to write the agent loop by hand once before picking a framework, so you know what it hides, and to prefer a fixed workflow when the steps can be known in advance.
Ready to start?
Opens on Sefism in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.