TetSharing

AI basics tutorial

How machine learning and language models work, without the hype. 10 short chapters, one idea each, every example runnable in the page.

Who it's for: Curious beginners, students and developers who want an accurate mental model of machine learning and large language models.

Prerequisites: The Python track up to functions and lists helps. Examples are small pure-Python programs you can run in the page.

Start with chapter 1 →

An abstract blue network of connected points on a dark background
Photo: choys_ on Unsplash

How this track works

This track explains how machine learning and language models work, accurately and without hype. It starts with the core ideas every model shares (examples, features and labels, holding out test data, overfitting, honest metrics), builds a k-nearest-neighbors classifier from scratch, then moves to large language models: tokens, context windows, prompting and embeddings. It closes with responsible AI using the NIST AI Risk Management Framework.

Every example is a short pure-Python program with no external libraries, so it runs in your browser (on Pyodide) exactly as it ran in our test suite. Where a library would normally do the job, the chapter names the scikit-learn function and links to its documentation. No chapter makes claims about particular commercial models or versions; those change too fast to be useful in a tutorial.

All 10 chapters

  1. 01What machine learning is
  2. 02Features and labels
  3. 03Train, test and validation data
  4. 04Overfitting
  5. 05Accuracy, precision, recall
  6. 06k-nearest neighbors
  7. 07LLMs, tokens and context
  8. 08Prompt basics
  9. 09Embeddings and similarity
  10. 10Responsible AI (NIST AI RMF)
A flowing wave of glowing particles suggesting data
Photo: jonakoh on Unsplash
A monitor displaying data charts and histograms
Photo: lukechesser on Unsplash
A developer smiling at a multi-monitor workstation
Photo: sandisk on Unsplash

Practice and reference

Final AI basics quiz (10 questions)Official AI basics documentation