Large Language Models: The Complete Course
What a large language model is, how it reads and writes, how to make it reliable, how to test it, how to secure it and how to run it, measured on one real-shaped task from the first lesson to the last.
You build one thing: an assistant for the support desk at Quillpath, a project-management software company. It triages tickets, drafts replies from the help centre for a person to review, and handles refund requests by a written policy, never moving money without a person approving. Every technique in the course is measured on the same 36 tickets, so you see exactly what it changes. Quillpath is fictional and its data is simulated; every lesson also opens with a real, cited case.
Who this course is for
You can write Python: functions, classes, dictionaries, running a notebook. You do not need a machine learning background.
| You are... | Start at |
|---|---|
| New to language models | Module 1, and go in order |
| A developer who already calls model APIs | Module 1, Lesson 4 (limits, measured), then Module 2 |
| Comfortable with prompts, weak on testing | Module 4, Lesson 2, then Module 10 |
| Building agents or tools | Modules 6 and 8, then Module 11 |
| Responsible for cost and operations | Modules 2 and 13 |
| New to Python | The AI Engineering course, Module 1, first |
Every module's README lists what you need to know before starting it, so you can check whether it is safe to skip the one before.
What you need
- A Google account, to run code in Google Colab. Nothing to install.
- One free API key, from Groq or Google Gemini, to use in Colab. Or no key at all, if you run a model on your own computer with Ollama and work in a code editor.
- For a few lessons (a container, a GPU serving engine, a CI pipeline), your own computer. Those lessons say so.
Setup takes about ten minutes: course-guide/02-setup-colab-and-llm-providers.md.
The modules
| # | Module | What you add to the support desk | Needs first |
|---|---|---|---|
| 1 | What a Large Language Model Is | The shared data, one client for three providers, a first triage call, TinyLM, a model selection | Python |
| 2 | Tokens, Context, and Cost | One token counter, one price table, a context budget, a cost per ticket | Module 1 |
| 3 | Inference and Decoding | Decoding settings chosen per task, streaming, the cost of reasoning | Modules 1 and 2 |
| 4 | Prompt Engineering | Versioned prompts, a frozen test set and a harness that scores them | Modules 1 to 3 |
| 5 | Reasoning and Advanced Prompting | Refund decisions by extract-then-rule, voting and a verifier | Module 4 |
| 6 | Structured Outputs and Tool Use | Typed triage output, repair loops, five tools and their guards | Modules 2 and 4 |
| 7 | Context Engineering | Help-centre retrieval, a context builder with budgets, memory | Modules 2, 4 and 6 |
| 8 | Agents | A traced refund agent with budgets and an approval gate, served over MCP | Modules 6 and 7 |
| 9 | Fine-Tuning and Adaptation | A LoRA trial on a small open model and a written decision | Modules 1, 4 and 6 |
| 10 | Evaluation | An eval suite with confidence intervals, human ratings, a calibrated judge, a CI gate | Module 4; Module 6 helps |
| 11 | Safety, Security, and Alignment | Measured defences against injection, redaction, a red-team set | Modules 6 and 8 |
| 12 | Multimodal Models | Intake for screenshots, PDFs and voice messages, scored field by field | Modules 2, 6 and 10 |
| 13 | Deployment, Operations, and Economics | A gateway with fallback, caching, quotas, a web service, tracing, a rollback plan | Modules 2, 6 and 10 |
| 14 | Applications, Patterns, and Frontiers | Review placement, feedback capture, a limitations memo | Modules 10 and 11 |
| 15 | Capstone | One of four tracks, with shared evidence requirements | The modules your track builds on |
Where other courses go deeper
This course stays on the model's side of each subject. For depth elsewhere:
- How the transformer inside the model works, layer by layer: the Transformers course and Module 6 of the AI Engineering course.
- Retrieval pipelines (chunking, embeddings, hybrid search, reranking): the RAG course. Module 7 here covers only how much retrieved text to put in the context, and in what order.
- Agents that act unattended, with durable state and deployment: the Agentic AI Engineer course.
- Web services, databases and deployment as general engineering: Modules 10 to 13 of the AI Engineering course.
How each lesson works
Every lesson is a walk through one Quillpath example, one picture at a time:
- The situation: a specific problem at the support desk.
- A real case, first: something that really happened, from a published source, cited.
- The idea: fifteen to thirty figures, one idea each, one running example.
- Run it: code with a walkthrough of every line.
- Break it: a failure you cause on purpose.
- In production: what teams do with this at scale.
- Check yourself: questions, one exercise, key terms and sources.
Each module ends with a lab (a guided piece of the support desk) and an incident file (a real, published failure replayed at Quillpath and fixed). Every output shown in the course comes from a real run. More detail: course-guide/01-how-this-course-works.md.
The tools you will use
Python throughout. LangChain for calling models and tools and LangGraph for loops and approvals, so the same code works with Groq, Gemini or Ollama. PyTorch and Hugging Face transformers and peft where you open up or adapt a model; tiktoken for counting tokens; rank_bm25 for search; the official MCP SDK for tools; FastAPI and Docker for the service. Everything is open source apart from the hosted model services.
Course guide
| File | Read it when |
|---|---|
| 01-how-this-course-works.md | Before your first lesson |
| 02-setup-colab-and-llm-providers.md | Before you run any code |
| 03-the-quillpath-support-desk.md | To meet the company, the people, the rules, the dates and the problem |
| 06-shared-data.md | To see the Quillpath data every module reuses |
| 04-style-guide.md | Only if you are writing or editing lessons |
| 05-image-style-guide.md | Only if you are drawing the course figures |
The one measure
How often is the assistant right, how do you know, and what happens when it is wrong? Almost everything in this course exists to answer those three questions with numbers.