Learn AI · Free learning track
Learn AI, from Python to production.
Every GenAI system (LLM apps, RAG pipelines, agents) is built in Python. This track takes you there step by step: solid Python and data skills, the tools to ship, how LLMs really work, then RAG, agents, MCP and running it all in production.
- Topics
- 21
- Lessons
- 136
- Stages
- 5
- Level
- Beginner → Advanced
Stage 1
Foundations
Python and data skills every AI codebase is built on.
-
Python Basics
Setup, data types, control flow, strings, data structures, functions, modules, files & JSON, classes.
Beginner · 9 topics
-
Python Advanced
Generators, decorators, Pydantic, logging, asyncio, concurrency, pytest, project structure, caching.
Intermediate · 10 topics
-
SQL for GenAI
Queries, joins, window functions — plus LLM log analysis and text-to-SQL apps and agents.
Beginner → Intermediate · 6 topics
-
Pandas
DataFrames, filtering, cleaning, groupby, joins — plus RAG chunks and LLM eval reports.
Beginner → Intermediate · 6 topics
-
NumPy
Arrays, broadcasting, linear algebra — plus embeddings, cosine similarity and top-k search.
Beginner → Intermediate · 5 topics
Stage 2
Build & ship tools
Validate data, serve models, build UIs and version your work.
-
Pydantic
Validation, nested models, settings — plus structured LLM output and tool-calling schemas.
Beginner → Intermediate · 5 topics
-
FastAPI
Routes, request models, auth, async — plus streaming LLM tokens, RAG and agent endpoints.
Beginner → Intermediate · 5 topics
-
Streamlit
Widgets, state, caching — plus chat apps with streaming and a chat-with-your-PDF app.
Beginner → Intermediate · 4 topics
-
Git & GitHub
How Git really works, branching and undoing safely, pull requests, team workflows — and leaked keys, big model files and evals in CI.
Beginner → Intermediate · 6 topics
Stage 3
How LLMs work
From text processing to the Transformer, and how to prompt and search by meaning.
-
NLP
Cleaning, tokens, TF-IDF & embeddings — plus chunking, hybrid search and RAG evaluation.
Beginner → Intermediate · 5 topics
-
Transformers
Attention from scratch, the transformer block — plus sampling, KV cache, LoRA and quantisation.
Intermediate · 5 topics
-
LLMs
Limits, choosing models, prompting, reasoning, tools, multimodal — plus cost, evals and guardrails.
Beginner → Intermediate · 9 topics
-
Prompt Engineering
Clear instructions, few-shot, reasoning, chaining, structured output, injection defence, testing and recipes.
Beginner → Intermediate · 8 topics
-
Embeddings & Vector DBs
Embedding models, ANN indexes (IVF, HNSW), filtering — plus Chroma, Pinecone, pgvector in production.
Intermediate · 6 topics
Stage 4
Build AI systems
Answer from documents, customise models, and build agents that use tools.
-
RAG
The full pipeline, parsing, chunking, query rewriting, HyDE, reranking, GraphRAG, citations and RAGAS evals.
Intermediate · 8 topics
-
Fine-Tuning
When to fine-tune vs RAG, training data, LoRA and QLoRA, API and open-model fine-tuning, and proving it's better.
Intermediate → Advanced · 6 topics
-
Frameworks
LangChain, LlamaIndex and LangGraph, each built from scratch first, plus when plain SDK code is better.
Intermediate · 4 topics
-
AI Agents
ReAct from scratch, planning, memory, tools and MCP, LangGraph agents, multi-agent, evals and safety.
Intermediate → Advanced · 9 topics
-
MCP
The Model Context Protocol: the protocol from scratch, servers, hosts, remote servers with OAuth, frameworks and security.
Intermediate → Advanced · 7 topics
Stage 5
Production
Run it reliably at scale, and design systems in interviews.
-
LLMOps / Production
Docker and deployment, serving open models, caching, Langfuse observability, evals in CI, cost and security.
Intermediate → Advanced · 7 topics
-
GenAI System Design
An interview approach, four full case studies, and the trade-offs and capacity maths behind them.
Advanced · 6 topics
All topics¶
Every lesson in every topic. Pick a tab to see what each one covers.
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Getting started | Install · first script · REPL · virtual environments |
| 2 | Variables & data types | Numbers · strings · booleans & None · conversion |
| 3 | Operators & control flow | if · for · while · match |
| 4 | Strings | f-strings · slicing · methods · split & join |
| 5 | Data structures | Lists · tuples · sets · dicts · comprehensions |
| 6 | Functions | Arguments · *args/**kwargs · scope · lambda |
| 7 | Modules & packages | Imports · standard library · pip · env variables |
| 8 | Files, JSON & errors | Files · folders · JSON · try/except |
| 9 | Classes & OOP basics | Classes · attributes · __repr__ · inheritance |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Iterators & generators | yield · lazy reading · streaming |
| 2 | Decorators | Closures · wraps · retry · lru_cache |
| 3 | Context managers | with · @contextmanager · suppress |
| 4 | Type hints, dataclasses & Pydantic | Hints · dataclasses · validating JSON |
| 5 | Error handling & logging | Custom errors · raise from · logging |
| 6 | Async programming | await · gather · semaphores · timeouts |
| 7 | Concurrency | GIL · threads · processes |
| 8 | Testing with pytest | Fixtures · parametrize · faking LLMs |
| 9 | Project structure | Layout · settings · pyproject.toml |
| 10 | Performance & caching | Measuring · caches · batching |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | SQL basics with Python | SELECT · WHERE · sqlite3 · parameters |
| 2 | Joins & aggregation | GROUP BY · HAVING · joins · subqueries |
| 3 | Advanced SQL | CTEs · window functions · JSON · indexes |
| 4 | Querying LLM logs & evals | Cost · p95 latency · prompt versions |
| 5 | Text-to-SQL | Schema prompts · validation · read-only safety |
| 6 | Text-to-SQL agents | Explore tools · self-correction · guardrails |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Series & DataFrames | Create · read CSV/JSON · head, info, describe |
| 2 | Selecting & filtering | loc / iloc · conditions · query · sorting |
| 3 | Cleaning data | Missing values · types · dates · duplicates |
| 4 | Grouping & aggregation | groupby · transform · pivot tables |
| 5 | Combining & reshaping | merge · concat · melt · explode |
| 6 | Pandas for GenAI | RAG chunks · cost reports · JSONL |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Arrays | Create · dtype · reshape · random |
| 2 | Indexing & slicing | Masks · fancy indexing · views vs copies |
| 3 | Maths & broadcasting | Vectorised maths · axis · broadcasting |
| 4 | Linear algebra | Dot product · @ · norms |
| 5 | NumPy for GenAI | Cosine similarity · top-k · softmax |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Models & validation | BaseModel · conversion · ValidationError |
| 2 | Fields & validators | Field · Literal · field_validator |
| 3 | Nested models & JSON | model_dump · JSON · aliases · unions |
| 4 | Settings & secrets | BaseSettings · .env · SecretStr |
| 5 | Pydantic for GenAI | Structured output · tool schemas · retry |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Your first API | Routes · path & query params · /docs |
| 2 | Request & response models | Bodies · status codes · errors · uploads |
| 3 | Dependencies & middleware | Depends · API keys · CORS · lifespan |
| 4 | Async & streaming | async def · SSE · background tasks |
| 5 | FastAPI for GenAI | Chat · RAG · agent loop · testing · deploy |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Streamlit basics | Rerun model · text & data · widgets |
| 2 | Layout, state & caching | Sidebar · forms · session_state · caching |
| 3 | Chat apps | chat_message · chat_input · write_stream |
| 4 | Streamlit for GenAI | PDF Q&A app · secrets · deploy |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | How Git works | Three areas · commits, trees, blobs · .gitignore |
| 2 | Branches & merging | Fast-forward · conflicts · rebase · cherry-pick |
| 3 | Undoing changes | restore · reset · reflog · revert · stash |
| 4 | Working with GitHub | Auth · fetch vs pull · rejected pushes · PRs with gh |
| 5 | Team workflows | GitHub flow · reviews · releases · bisect |
| 6 | Git for GenAI projects | Leaked keys · LFS/DVC · notebooks · evals in CI |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Text preprocessing | Unicode · HTML · regex · PII masking |
| 2 | Tokenization | BPE · tiktoken · cost · context window |
| 3 | Text representation | TF-IDF · word & sentence embeddings |
| 4 | Core NLP tasks | Classification · NER · summarisation |
| 5 | NLP for GenAI | Chunking · BM25 · hybrid search · metrics |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Why transformers | RNN limits · encoder vs decoder |
| 2 | Self-attention from scratch | Q, K, V · causal mask · multi-head |
| 3 | The transformer block | Positions · RoPE · layer norm · MLP |
| 4 | How LLMs generate text | Temperature · top-p · KV cache |
| 5 | Transformers for GenAI | SFT · RLHF · LoRA · quantisation |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | What is an LLM | Limits · hallucination · knowledge cutoff |
| 2 | Choosing a model | Open vs closed · tiers · pricing · benchmarks |
| 3 | Calling LLM APIs | Messages · parameters · streaming · parallel calls |
| 4 | Prompt engineering | System prompts · few-shot · delimiters · templates |
| 5 | Reasoning models | Thinking tokens · effort · self-consistency |
| 6 | Structured output & tool calling | JSON · tool protocol · the tool loop |
| 7 | Multimodal models | Images · PDFs · voice · image search |
| 8 | Context, memory & cost | Memory · prompt caching · routing |
| 9 | Evaluation & guardrails | Evals · prompt injection · responsible AI |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Writing clear instructions | Reasons behind rules · success criteria · ordering · prefill |
| 2 | Few-shot examples in depth | Choosing examples · order effects · retrieving examples |
| 3 | Reasoning techniques | Chain of thought · self-consistency · step-back · critique |
| 4 | Prompt chaining & routing | Chains · gates · routers · map-reduce |
| 5 | Structured output prompting | Field specs · nulls · validation · repair loops |
| 6 | Prompt injection & defensive prompting | Direct vs indirect · spotlighting · least privilege |
| 7 | Testing & versioning prompts | Eval sets · comparing versions · registries |
| 8 | Prompt recipes for common tasks | Summaries · extraction · RAG answers · agent prompts |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Embeddings in depth | Contrastive training · metrics · limits |
| 2 | Choosing embedding models | MTEB · evaluation · Matryoshka · cost |
| 3 | Vector search & indexes | Exact k-NN · IVF · HNSW · quantisation |
| 4 | Vector databases | Filtering · multi-tenancy · hybrid · options |
| 5 | Hands-on: Chroma, Pinecone, pgvector | Upsert · query · filter · delete |
| 6 | Vector DBs in production | Sync · migrations · sizing · monitoring |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | The RAG pipeline end to end | Indexing vs query · grounded prompt · failure map |
| 2 | Loading & parsing documents | Loaders · PDFs · tables · scans · metadata |
| 3 | Chunking for RAG | Size & overlap · semantic · contextual headers |
| 4 | Better retrieval | Query rewriting · HyDE · reranking · MMR |
| 5 | Parent–child & GraphRAG | Small-to-big · knowledge graphs · communities |
| 6 | Citations | Source labels · rendering · validation · quotes |
| 7 | Evaluation with RAGAS | Faithfulness · relevancy · context precision & recall |
| 8 | RAG production checklist | Security · observability · latency & cost |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | When to fine-tune | Prompting vs RAG vs fine-tuning · cost |
| 2 | Preparing training data | JSONL · validation · PII · splits |
| 3 | LoRA and QLoRA | Loss · memory · low-rank adapters · 4-bit |
| 4 | Fine-tuning with an API | Jobs · checkpoints · DPO |
| 5 | LoRA on an open model | TRL SFTTrainer · PEFT · merge · serve |
| 6 | Evaluating and deploying | Baselines · regressions · rollout |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | LangChain | Chat models · LCEL · structured output · create_agent · RAG |
| 2 | LlamaIndex | Nodes · query engines · auto-merging · chat engines · workflows |
| 3 | LangGraph | State graphs · loops · checkpoints · interrupts · multi-agent |
| 4 | When plain SDK code is better | Costs · a 40-line agent · decision table · hybrid |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | What an agent is | Workflows vs agents · the loop · autonomy levels |
| 2 | ReAct from scratch | Thought → Action → Observation · parsing · tool errors |
| 3 | Planning | Plan-and-execute · re-planning · reflection · ReWOO |
| 4 | Memory | Summaries · long-term facts · episodic memory |
| 5 | Tools and MCP | Schemas · validation · tool selection · MCP |
| 6 | Agents in LangGraph | Prebuilt agent · guard nodes · budgets · subgraphs |
| 7 | Multi-agent patterns | Supervisor · handoffs · fan-out · cost |
| 8 | Evaluating agents | Trajectories · tool accuracy · pass^k · CI |
| 9 | Safety and human approval | Policies · approvals · budgets · injection |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | What MCP is | Host, client, server · primitives · stateless spec |
| 2 | The protocol from scratch | JSON-RPC · discover · isError · input_required · stdio |
| 3 | Building servers | MCPServer · structured output · elicitation · Inspector |
| 4 | Clients and hosts | Host configs · Client · agent loop · many servers |
| 5 | Remote servers and auth | Streamable HTTP · scaling · OAuth 2.1 |
| 6 | MCP in agent frameworks | LangChain · OpenAI Agents · Claude API connector |
| 7 | Security and production | Poisoning · rug pulls · lethal trifecta · audit |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | Docker and deployment | Dockerfile · secrets · health checks · releases |
| 2 | Serving open models | API vs self-host · GPU memory · vLLM · Ollama |
| 3 | Caching and rate limits | Exact & semantic cache · token limits · 429s |
| 4 | Observability with Langfuse | Traces · what to record · feedback · alerts |
| 5 | Running evals in CI | Eval runner · release gate · GitHub Actions |
| 6 | Cost control | Attribution · budgets · savings levers |
| 7 | Security | Secrets · redaction · output handling · abuse |
| # | Topic | Sub-topics |
|---|---|---|
| 1 | An approach for interviews | 7-step framework · questions · estimates |
| 2 | Case: support chatbot | RAG + tools · handoff · cost per conversation |
| 3 | Case: document Q&A at scale | 50M docs · index size · tenants · permissions |
| 4 | Case: coding assistant | Fast completions · repo context · agent PRs |
| 5 | Case: multi-agent workflow | Invoices · durable state · approvals |
| 6 | Trade-offs and capacity | Decisions · formulas · latency · limits |