zucchetti-llm-course

Large Language Models for Developers

A 20-hour course on how large language models work and how to build with them: ten lectures of two hours, each with the theory, the papers behind it, and a hands-on lab. Taught in English at Zucchetti in July 2026 by Kamyar Zeinalipour.

The slides run in the browser: open the course site. The labs are Python scripts with a matching Jupyter notebook and a solutions.py.

Lectures

# Lecture Slides Lab
1 The Transformer Blueprint Slides Lab 01, embeddings
2 Tokenization, Embeddings and Similarity Slides Lab 01, embeddings
3 Prompt Engineering Slides Lab 02, prompt engineering
4 RAG Foundations and the Decision Matrix Slides Lab 03, inference benchmarking
5 Advanced RAG and Intelligent Routing Slides Lab 04, query router
6 Graph RAG and Knowledge Graphs Slides Lab 05, Graph RAG
7 Agentic RAG and Autonomous Systems Slides Lab 06, SQL agent
8 RAG Evaluation and Observability Slides Lab 07, the RAG mega-lab
9 Efficient Fine-Tuning (LoRA and QLoRA) Slides Lab 08, LoRA fine-tuning
10 Modern LLM Architectures and Multimodal AI Slides Lab 09, vision-language models, Lab 10, production deployment

Lecture 1: The Transformer Blueprint

What you will learn

Papers

Year Paper Venue
2013 Word2Vec — Efficient Estimation of Word Representations (Mikolov et al.) Google
2014 GloVe — Global Vectors for Word Representation (Pennington et al.) EMNLP
2016 BPE — Neural Machine Translation of Rare Words (Sennrich et al.) ACL
2017 Attention Is All You Need (Vaswani et al.) NeurIPS
2021 RoPE — Rotary Position Embedding (Su et al.) —
2022 InstructGPT/RLHF (Ouyang et al.) NeurIPS
2023 LLaMA (Touvron et al.) Meta

Slides: lecture_01_llm_embeddings.html
Lab: Lab 01, embeddings

Lecture 2: Tokenization, Embeddings and Similarity

Duration: ~1.5 hours

What you will learn

Papers

Year Paper Venue
2013 Word2Vec — Efficient Estimation of Word Representations (Mikolov et al.) Google
2014 GloVe — Global Vectors for Word Representation (Pennington et al.) EMNLP
2016 BPE — Neural Machine Translation of Rare Words (Sennrich et al.) ACL

Slides: lecture_02_tokenization_embeddings.html
Lab: Lab 01, embeddings

Lecture 3: Prompt Engineering

What you will learn

Papers

Year Paper Venue
2020 GPT-3 — Language Models are Few-Shot Learners (Brown et al.) NeurIPS
2022 Chain-of-Thought Prompting Elicits Reasoning (Wei et al.) NeurIPS
2022 Rethinking the Role of Demonstrations (Min et al.) EMNLP
2023 Self-Consistency Improves CoT Reasoning (Wang et al.) ICLR

Slides: lecture_03_prompt_engineering.html
Lab: Lab 02, prompt engineering

Lecture 4: RAG Foundations and the Decision Matrix

Duration: 90 minutes · Pure theory — hands-on lab in Lecture 5 (combined Lab 4 + Lab 5)

What you will learn

Formulas

Concept Formula
TF-IDF TF-IDF(t,d) = TF(t,d) × log(N/df(t))
BM25 BM25(q,d) = Σ IDF(tᵢ) · TF·(k₁+1) / (TF + k₁·(1−b+b·|d|/avgdl))
Cosine Similarity cos(A,B) = A·B / (‖A‖·‖B‖) ∈ [−1, 1]
Retrieval (top-k) D* = top-k_{d∈D} cos(E_q(q), E_d(d))
Hybrid score score(q,d) = α·BM25(q,d) + (1−α)·cos(embed(q), embed(d))
Semantic chunking split at i ⟺ cos(emb(sᵢ), emb(sᵢ₊₁)) < θ
RAG objective P(y\|x) = Σ_d P(d\|x) · P(y\|x, d)

Papers

Year Paper Venue
1972 A Statistical Interpretation of Term Specificity (Spärck Jones) Journal of Documentation
2009 The Probabilistic Relevance Framework: BM25 and Beyond (Robertson & Zaragoza) Foundations & Trends in IR
2019 Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (Reimers & Gurevych) EMNLP
2020 Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al.) NeurIPS
2020 Efficient and Robust ANN Search Using HNSW Graphs (Malkov & Yashunin) IEEE TPAMI
2021 Billion-Scale Similarity Search with GPUs — FAISS (Johnson, Douze & Jégou) IEEE Trans. on Big Data
2021 MS MARCO: Benchmarking Ranking Models (Craswell et al.) SIGIR

Slides: lecture_04_rag_foundations.html
Lab: Lab 03, inference benchmarking

Lecture 5: Advanced RAG and Intelligent Routing

Duration: 2 hours · Pure theory — hands-on lab in Lecture 6 (combined Lab 4 + Lab 5 + Lab 6)

What you will learn

Formulas

Concept Formula
RRF Score RRF(d) = Σ 1/(k + rank_i(d)) where k=60
Embedding Router route* = argmax_r cos(embed(query), embed(route_r))
Re-ranking score = CrossEncoder(query ⊕ document) → [0, 1]

Papers

Year Paper Venue
2019 Sentence-BERT (Reimers & Gurevych) EMNLP
2023 Precise Zero-Shot Dense Retrieval without Relevance Labels — HyDE (Gao et al.) ACL
2023 Lost in the Middle (Liu et al.) TACL
2024 Contextual Retrieval (Anthropic) Blog

Slides: lecture_05_advanced_rag.html
Lab: Lab 04, query router

Lecture 6: Graph RAG and Knowledge Graphs

Duration: 2 hours · Pure theory — hands-on lab in combined mega-lab (Lab 4 + Lab 5 + Lab 6)

What you will learn

Papers

Year Paper Venue
2024 From Local to Global: A Graph RAG Approach to Query-Focused Summarization (Edge et al.) Microsoft Research
2024 RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval (Sarthi et al.) ICLR 2024
2024 LightRAG: Simple and Fast Retrieval-Augmented Generation (Guo et al.) EMNLP 2025 Findings
2024 HippoRAG: Neurobiologically Inspired Long-Term Memory for LLMs (Gutiérrez et al.) NeurIPS 2024
2025 PathRAG: Pruning Graph-based RAG with Relational Paths (Chen et al.) arXiv

Slides: lecture_06_graph_rag.html
Lab: Lab 05, Graph RAG

Lecture 7: Agentic RAG and Autonomous Systems

Duration: 2 hours · Theory + hands-on lab

What you will learn

Papers

Year Paper Venue
2023 Toolformer: Language Models Can Teach Themselves to Use Tools (Schick et al.) NeurIPS 2023 (Oral)
2023 ReAct: Synergizing Reasoning and Acting in Language Models (Yao et al.) ICLR 2023
2024 Self-RAG: Learning to Retrieve, Generate, and Critique (Asai et al.) ICLR 2024 (Oral)
2024 Corrective Retrieval Augmented Generation (Yan et al.) NAACL 2024
2024 Adaptive-RAG: Learning to Adapt Retrieval-Augmented LLMs through Question Complexity arXiv 2024

Slides: lecture_07_agentic_rag.html
Lab: Lab 06, SQL agent

Lecture 8: RAG Evaluation and Observability

What you will learn

Slides: lecture_08_rag_evaluation.html
Lab: Lab 07, the RAG mega-lab

Lecture 9: Efficient Fine-Tuning (LoRA and QLoRA)

What you will learn

Slides: lecture_09_finetuning.html
Lab: Lab 08, LoRA fine-tuning

Lecture 10: Modern LLM Architectures and Multimodal AI

What you will learn

Slides: lecture_10_multimodal_production.html
Lab: Lab 09, vision-language models, Lab 10, production deployment

Running the labs

You need Python 3.10 or newer and a free Google AI Studio key from aistudio.google.com/apikey. Some labs can also use DeepSeek or a local Ollama model; the options are listed in .env.example.

git clone https://github.com/KamyarZeinalipour/zucchetti-llm-course.git
cd zucchetti-llm-course
python -m venv .venv && source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env                                  # then add your GOOGLE_API_KEY

Run a lab as a script from its folder, for example cd lab_01_embeddings && python lab_01_embeddings.py, or open its notebook in Jupyter from the same folder. Labs 04 to 06 and 10 share the client in common/llm.py, and read the HR policies in lab_07_evaluation/data/policies/. Lab 08 trains a model and needs a GPU; Google Colab works.

Repository

slides/        the ten lecture decks (HTML) and their images
lab_01 ... 10  one folder per lab: script, notebook, solutions, README, data
common/        the LLM client shared by several labs

Troubleshooting

Problem Fix
ModuleNotFoundError Run pip install -r requirements.txt in the activated environment
Rate limit (429) The free tier allows about 15 requests a minute; wait 30 seconds and retry
API key not accepted Check the key at aistudio.google.com/apikey and that .env is in the repository root
Slides look broken Use Chrome or Firefox

License

Written by Kamyar Zeinalipour for a course at Zucchetti S.p.A. and shared for teaching and learning. The lab datasets are small samples prepared for the course; the company policies, patient records and documents in them are invented.