The Builder’s Road

From using AI to making with it: what this track will have you build, what to install, how to keep your keys safe, and a first seventeen-line program that guesses the next word.

Every chat assistant you have used is, underneath, a program sending text to a model and printing what comes back. The surprising thing is how little code that takes. The hard parts — choosing what to send, checking what returns, keeping it safe and affordable — are craft, not magic. This track is where you stop being only a user and start being a builder. You do not need to be a programmer yet. You need patience, a computer, and a willingness to read error messages slowly.

Who this track is for

The Builder track is for three kinds of reader. The first has finished the Practitioner track and keeps thinking “I wish I could make it do this automatically.” The second is a developer who writes software for a living but has never trained a model or called a language-model API. The third is an analyst — finance, operations, research, public service — who lives in spreadsheets and wants to go further than a spreadsheet allows.

The first pages assume no coding at all. By the end you will have written real machine learning code and a small application built on a large language model. You will not need university mathematics here; that waits for the Advanced track.

This guide’s framing We teach classic machine learning before language-model APIs on purpose. Splitting data, measuring error and spotting overfitting are the habits that keep LLM applications honest too; skipping them is how people ship demos that fall over in real use.

What you will build

The track has eleven more pages. Here is the road, in order — tap a title to open it:

  1. Python essentials for AIJust enough Python — variables, lists, dictionaries, loops, functions and reading files — to follow every later page.
  2. Working with dataNumPy for arrays of numbers, pandas for tables, and the unglamorous art of cleaning messy, real-world data.
  3. The machine learning workflowSplit your data, train, evaluate on a held-out test set, and iterate — the loop behind every model.
  4. Classic modelsLinear and logistic regression, decision trees, nearest neighbours and clustering, using scikit-learn.
  5. Measuring modelsAccuracy, precision, recall and why a 99% accurate model can still be useless.
  6. Calling LLM APIsMessages, tokens, streaming responses and how to estimate and control cost.
  7. Embeddings and semantic searchTurning meaning into lists of numbers so a program can find “similar” text.
  8. Retrieval-augmented generationGrounding a model’s answers in your own documents, with citations you can check.
  9. Tool use and agentsLetting a model call functions you write — safely, with limits and logs.
  10. Shipping an AI appA simple interface, deployment, monitoring and guardrails.
  11. Builder capstoneDesign, build and ship your own small assistant from start to finish.

Each page builds on the ones before it, so work through them in order the first time.

Setting up your workshop

You need four things. None costs money.

PyPython 3The language of AI work

Python dominates machine learning because its libraries — NumPy, pandas, scikit-learn, PyTorch — are excellent and free. Install a recent Python 3 release from python.org As of 2026. On Windows, python.org now steers you to its Python install manager; if you use the traditional installer instead, tick “Add python.exe to PATH”. Either way, the command on Windows is usually py or python rather than python3. On macOS and Linux, Python 3 may already be present: try python3 --version in a terminal.

VSAn editor: VS CodeWhere you write files

Visual Studio Code is a free editor from Microsoft with a Python extension that adds colouring, error hints and a run button. Any decent editor works; this one is simply very widely used, so most tutorials assume it.

NBJupyter or Google ColabExperiment cell by cell

A notebook lets you run a few lines, see the result, and keep notes beside it. Jupyter runs on your own computer; Google Colab runs in your browser with nothing to install and offers limited free access to a GPU As of 2026. Colab is the gentlest start; local Jupyter is better once your data is private.

.venvVirtual environmentsOne box per project

A virtual environment is a folder holding the exact packages one project needs, so upgrading a library for project B cannot break project A. Make one per project; it costs seconds and saves hours.

Here is the whole set-up in a terminal. Lines beginning with # are comments.

# make a project folder and a virtual environment inside it
mkdir ai-builder
cd ai-builder
python3 -m venv .venv
# on Windows:  py -m venv .venv

# switch it on (macOS / Linux)
source .venv/bin/activate
# on Windows PowerShell instead:  .venv\Scripts\Activate.ps1
# (if PowerShell refuses to run scripts, see the venv documentation linked below)

# install the libraries this track uses
pip install numpy pandas scikit-learn jupyter

# store an API key for this terminal session (never in a file you share).
# Typed commands are also saved in your shell's history file, so for regular
# use keep keys in a .env file that is listed in .gitignore.
export MY_LLM_API_KEY="paste-key-here"
# Windows PowerShell:  $env:MY_LLM_API_KEY = "paste-key-here"

Handling API keys safely

Later pages call language models through a paid service. The service gives you an API key: a long secret that proves who you are and charges your account. Anyone who has it can spend your money. Keys pasted into code end up on GitHub, where automated scanners find them within minutes. So follow three rules from day one:

Your Python code then reads the key from the environment:

import os

api_key = os.environ.get("MY_LLM_API_KEY")
if api_key is None:
    raise SystemExit("Set MY_LLM_API_KEY first - never write the key in this file.")
print("Key loaded, ending in", api_key[-4:])   # show only the last 4 characters
At work

If you build with company data, check your organisation’s rules on which AI services are approved before sending anything to an external API. Test with made-up data until you are sure.

Your first AI-flavoured program

Before touching any API, let us build a tiny language model ourselves. It is a bigram model — an n-gram model with n = 2: it learns which word tends to follow which, then guesses the next word by rolling weighted dice. This is, in miniature, the same job a large language model does: predict the next token. The difference is that an LLM looks at thousands of previous tokens with billions of parameters; ours looks at one word with a table of counts.

import random
from collections import Counter, defaultdict

text = """the cat sat on the mat . the dog sat on the rug .
the cat saw the dog . the dog chased the cat ."""

words = text.split()
followers = defaultdict(Counter)
for current, nxt in zip(words, words[1:]):
    followers[current][nxt] += 1

print(followers["the"].most_common(3))

def guess_next(word):
    counts = followers[word]
    return random.choices(list(counts), weights=counts.values())[0]

word, sentence = "the", ["the"]
while word != "." and len(sentence) < 12:
    word = guess_next(word)
    sentence.append(word)
print(" ".join(sentence))

Line by line:

That nonsense is the lesson. With one word of memory, the model is locally fluent and globally confused. Give it a longer memory, far more text and learned representations instead of raw counts, and you are on the road that led to GPT. Try swapping text for a few paragraphs of your own writing, or a public-domain book, and watch the output become more stylish and no more sensible.

Quick check

Where should your API key live while you develop?

Code gets shared and chats get logged; environment variables stay on your machine and out of version control.

In the bigram program, what counts as “training”?

The counts are the model’s learned knowledge; sampling uses them afterwards.

Why make a virtual environment for each project?

Isolation is the point; speed is unchanged and Python runs fine without one — until two projects disagree.

How to practise

People who learn to build with AI tend to share a few habits.

Key point

The goal is not to type code quickly. It is to be able to look at a program — yours, a colleague’s or an AI’s — and say with confidence what it does and how you would check it.

Free resources to lean on

These pair well with this track; all are free to use.

For a longer list sorted by level, see Courses, Books and Resources.

Try this

Set up a project folder with a virtual environment, run the bigram program, then change it so it starts from a word you choose and prints five different sentences. Bonus: make followers remember the previous two words (a trigram model) and compare the output.

// Pause and reflect

  1. What is one small, boring task in your work or study that a twenty-line program could do for you?
  2. Which of the three API-key rules would you have been most likely to break, and how will you remind yourself?
  3. How will you use an AI coding assistant without letting it do your understanding for you?

Your notes are saved privately in this browser.

Key terms on this page

Sources & further reading