Skip to main content
Course

LLM Engineering Foundations

From next-token prediction to your first working API call.

Beginner

Level

4

Modules

8

Lessons

4

Graded quizzes

2

Assignments

8 hours

Estimated time

What you will be able to do

  • Explain in plain language how a language model predicts the next token to build a response one piece at a time.
  • Break a piece of text into tokens and estimate how many tokens a prompt and its reply will use.
  • Write clear prompts using system and user roles, direct instructions, and a defined output format.
  • Apply few-shot examples and chain-of-thought prompting to get better results on harder tasks.
  • Adjust sampling controls such as temperature and top-p to make output more focused or more varied.
  • Fit a task inside a model's context window and budget tokens to control cost and avoid truncation.
  • Make a working chat completion API call, read the response, and handle keys, errors, retries, and streaming.

What is inside

4 modules, 8 lessons. Each module ends in a graded quiz and most carry an assignment.

  1. 01

    How Language Models Generate Text

    Build a clear mental model of what a language model actually does before you build with one. You will see how a model reads your text as tokens, predicts one token at a time, and how sampling settings such as temperature and top-p turn those predictions into the words you read. By the end you can explain, in plain terms, why a model can sound completely confident and still be wrong.

    2 lessons · 5 quiz questions

  2. 02

    Prompting Techniques That Work

    Prompting is how you steer a general model toward the exact result you want. This module breaks a prompt into its working parts (roles, instructions, examples, and output format), then layers on the techniques that reliably lift quality. You will practice moving from a vague ask to a precise, repeatable prompt an application can depend on.

    2 lessons · 5 quiz questions · assignment

  3. 03

    Tokens, Context Windows, and Cost

    Every model works inside a fixed context window, and every token you send or receive carries cost, latency, and truncation risk. You will learn to count tokens, budget them across a prompt and its reply, and manage a growing conversation so nothing important gets cut.

    2 lessons · 5 quiz questions

  4. 04

    Building with the API

    Turn theory into a working skill: call a language model from your own code. This module walks a chat completion request end to end, from the messages array and generation parameters to reading the response object, then covers the production concerns that keep it running: protecting API keys, handling errors, retrying with backoff, and streaming output to users.

    2 lessons · 5 quiz questions · assignment