The canonical index for guided AI notebooks and project-based AI engineering exercises.

AI exercise index

This is the only index for the AI exercise collection. It explains the sequence, prerequisites, setup, evidence requirements, and links to every lesson. Individual pages contain the detailed instructions; return here to choose the next exercise.

Choose a track

Start with the guided notebook track if you are new to model APIs. Continue with the engineering track when you can write a small Python program, save structured results, and explain how you will test failures.

  1. Prompt structure exercise — roles, instructions, and message structure.
  2. Chatbot with GitHub Models — a hosted model request with environment-based authentication.
  3. RAG document chunking — character, sentence, and section chunking without an API key.
  4. API fundamentals: requests — the first API lesson.
  5. Complete the remaining API fundamentals sequence.

Notebook lessons

Exercise Lesson Notebook API key
Prompt structure Read lesson Open notebook Anthropic-compatible key and model name
Chatbot Read lesson Open notebook GitHub Models token
RAG chunking Read lesson Open notebook None
API fundamentals Read lesson Open notebook Provider key

API fundamentals sequence

  1. Sending API requests
  2. API requests exercise
  3. System prompts
  4. System prompts exercise
  5. Temperature and sampling
  6. Streaming responses
  7. Structured data responses

Engineering exercises

These are not alternate indexes. Each module is a detailed lesson linked from this table; use the exercise numbers below to choose a project and return here for the sequence.

Exercises Detailed lesson What you will build or measure
1–5, 9–11, 14, 18 Evaluation and comparison Controlled tests for quality, evidence, cost, latency, multimodal behavior, embeddings, tokens, and model choice
6, 13, 16–17 Reliability and security Robustness tests, threat modeling, defensive red-team cases, poisoning checks, and failure investigation
7–8 Tools and agents Validated tools and a fixed workflow versus an agent workflow
12, 15, 19 Data and product systems Prompting decisions, prompt versioning, memory, privacy, and rollback design
20 Reproducibility challenge A partner-readable reproduction report and environment record

Prerequisites

  • Python functions, lists, dictionaries, files, exceptions, and virtual environments.
  • Basic pandas and plotting knowledge for the evaluation labs.
  • A text editor and either VS Code with the Python and Jupyter extensions or JupyterLab.
  • The setup and credentials guide and Jupyter notebook workflow.

Setup and evidence

  1. Create and select a project virtual environment; verify the notebook kernel with import sys; print(sys.executable).
  2. Install only the packages named by the lesson or notebook. Keep a requirements-lock.txt for engineering labs.
  3. Store provider keys in environment variables or a local secret manager. Never paste, print, commit, or upload them.
  4. Read the lesson, run the smallest sample, then change one variable at a time.
  5. Save structured results such as JSON or CSV, the prompt/model version, date, and failure notes.
  6. Submit the notebook or script, test data, results, rubric, five inspected failures where requested, and a short conclusion.

References and next steps