Skip to main content

AI Fundamentals

How language models actually behave, assuming no prior AI knowledge. The prerequisite for everything else in the track.

beginner6 lessons90 min

6 lessons

What you will be able to do

Lessons

Foundations

  1. How language models workbeginner · 12 min

    Next-token prediction, what training does and does not give a model, and why that shapes everything you build on top of it.

  2. Tokens and context windowsbeginner · 14 min

    Tokenisation, why the context window is a budget rather than a memory, and how to measure both from C#.

  3. Temperature, sampling and determinismbeginner · 18 min

    The step that turns a distribution into a token: what each sampling option does, which values are policy, and what "deterministic" can honestly mean.

Working with models

  1. Embeddings vs completionsbeginner · 14 min

    Two different model calls with two different jobs — when you want a vector, when you want text, and what each costs.

  2. Choosing a model and an SDK in .NETbeginner · 15 min

    Two decisions, not one: which model answers the question, which library carries the call, and how to keep either one cheap to change.

  3. Capabilities and limitsbeginner · 17 min

    Hallucination, staleness and non-determinism as engineering constraints — and the .NET patterns that contain them.

Capstone exercise

One exercise across the whole course. You write it locally, in your own editor.

A console app that counts, calls and costs

One tool that exercises the whole course. Point it at a text file and a question. It tokenises the file with the real vocabulary, fits the prompt to a stated window with the output reserved first, sends one call against a pinned dated model version at temperature 0 asking for structured output, checks FinishReason before parsing, validates the parsed result, and prints a report: input tokens, output tokens, the cost of this call from a price table you supply in configuration, and the model id the provider actually served. Persist a CallRecord per run so a second run can be compared with the first. It calls a real model against your own key, so it costs real money — a few pence at most, and the report is what tells you exactly how much.

In the repository
exercises/ai-fundamentals/capstone-token-cost-report
Verify with
dotnet test exercises/ai-fundamentals/capstone-token-cost-report

Self-reported and not verified. Nothing runs your code or reads your repository — this records what you say you did, in this browser.