Skip to content
Optimal Lab

AI Engineering

Open up the model and tune the knobs yourself.

Tokens, attention and sampling show how the model reads and writes. Then the context window, search and retrieval decide what it sees, and evals tell you if it worked.

Sessions

Go in order. Each session is one idea you can drag, step and break.

01Machine learning foundations

3 live · 2 coming

What a model is and how it learns.

  1. Interactive

    Coming soon

    What a model is

    Parameters in, prediction out: a model is a function you tune.

  2. Interactive

    Live

    Training: loss and gradient descent

    Nudge every parameter downhill until the error stops falling.

    Open session →

  3. Interactive

    Live

    Overfitting and train/test splits

    A model that memorizes the training set and fails on new data.

    Open session →

  4. Interactive

    Live

    Neural networks, layer by layer

    Weights, activations and how stacking layers learns features.

    Open session →

  5. Interactive

    Coming soon

    Supervised, unsupervised and reinforcement learning

    Learn from labels, from structure, or from rewards.

02How LLMs work

10 live · 0 coming

Inside the model, one piece at a time.

  1. Interactive

    Live

    How text becomes tokens

    Train a tiny BPE tokenizer merge by merge, then type your own text and count the tokens.

    Open session →

  2. Interactive

    Live

    Token embeddings and positions

    Look up each token's row, add a vector for its position, and see why “dog bit man” needs it.

    Open session →

  3. Interactive

    Live

    Attention, one head

    Pick a word and see which words it looks at: score, scale, mask, softmax, blend.

    Open session →

  4. Interactive

    Live

    A transformer block

    LayerNorm, attention, feed-forward and residual adds on real numbers. Turn residuals off and the tokens blur together.

    Open session →

  5. AI #02

    Live

    How an LLM picks the next token

    Drag temperature, top-k and top-p. Watch the odds move, then sample.

    Open session →

  6. Interactive

    Live

    The KV cache

    Why the first token is slow, the rest are fast, and long chats cost memory.

    Open session →

  7. Interactive

    Live

    Pretraining

    Clean the text, guess every next token, measure the loss, nudge the weights. Train a tiny model batch by batch.

    Open session →

  8. Interactive

    Live

    Instruction tuning and RLHF

    One prompt through pretraining, SFT and RLHF. Loosen the KL leash and watch reward hacking set in.

    Open session →

  9. Interactive

    Live

    Scaling laws

    More data, parameters and compute: what improves, and how fast.

    Open session →

  10. Interactive

    Live

    Why models hallucinate

    Rare facts get thin probabilities but fluent answers. Try retrieval, “not sure”, and grading that stops rewarding guesses.

    Open session →

03Prompting

2 live · 4 coming

Getting the model to do what you mean.

  1. Interactive

    Coming soon

    System, user and assistant messages

    What each role is for, and what the model actually sees.

  2. Interactive

    Coming soon

    Zero-shot and few-shot prompting

    Show a few examples and watch the output format lock in.

  3. Interactive

    Coming soon

    Chain of thought and reasoning models

    Let the model think before answering, and when that helps.

  4. Interactive

    Coming soon

    Prompt patterns

    Delimiters, checklists, personas and asking for a plan first.

  5. Interactive

    Live

    The context window, turn by turn

    Play a long chat and watch the prompt fill the window. Then trim it, and see what it costs.

    Open session →

  6. Interactive

    Live

    Long context vs retrieval

    Paste the whole document, or fetch only the relevant parts?

    Open session →

04Embeddings and retrieval

5 live · 1 coming

Finding the right information to give the model.

  1. Interactive

    Live

    Embeddings and similarity search

    Move a query in vector space and see which notes come back.

    Open session →

  2. Interactive

    Live

    Chunking strategies

    Fixed size, overlap or by heading: see which one cuts the answer in half.

    Open session →

  3. Interactive

    Live

    Hybrid search and reranking

    Keyword search, vector search, rank fusion and a reranker. See which one finds the right note.

    Open session →

  4. Interactive

    Live

    RAG, step by step

    Chunk, retrieve and prompt, and see what the model actually gets.

    Open session →

  5. Interactive

    Live

    Query rewriting and HyDE

    Rewrite a vague question before searching, so retrieval finds more.

    Open session →

  6. Interactive

    Coming soon

    GraphRAG and knowledge graphs

    Retrieve through relationships, not just similar text.

05Agents

2 live · 3 coming

Models that decide what to do next.

Already live in other tracks: Call a tool, then answer, MCP: tools the model can call

  1. Interactive

    Live

    Agent patterns: workflow or agent?

    Chaining, routing, parallel calls, orchestrator-workers, evaluator loops and a true agent, side by side.

    Open session →

  2. Interactive

    Live

    The ReAct loop

    Think, act, observe, repeat, until the task is done.

    Open session →

  3. Interactive

    Coming soon

    Reflection and self-correction

    The model checks its own work and tries again.

  4. Interactive

    Coming soon

    Computer-use and browser agents

    An agent that clicks, types and reads screens.

  5. Interactive

    Coming soon

    Why agents fail

    Loops, drift, wrong tools and errors that compound over steps.

06Evaluation

3 live · 2 coming

Knowing whether it got better.

  1. Interactive

    Live

    Evals: is the new prompt better?

    Grade two prompt versions with code checks and an LLM judge, then check the judge against people.

    Open session →

  2. Interactive

    Live

    Evaluation metrics

    Exact match, similarity scores, faithfulness and when each misleads.

    Open session →

  3. Interactive

    Live

    LLM-as-judge and its biases

    A model grading a model: position bias, length bias and self-preference.

    Open session →

  4. Interactive

    Coming soon

    Benchmarks

    What MMLU-style scores measure, and why they stop meaning much.

  5. Interactive

    Coming soon

    Red-teaming

    Try hard to make the model fail before users do.

07Adapting models

1 live · 4 coming

Changing what the model knows or how it behaves.

  1. Interactive

    Coming soon

    Fine-tuning

    Train on your own examples to change style, format or behavior.

  2. Interactive

    Live

    LoRA and parameter-efficient tuning

    Train a small add-on instead of the whole model.

    Open session →

  3. Interactive

    Coming soon

    Preference tuning: RLHF and DPO

    Teach the model which of two answers people prefer.

  4. Interactive

    Coming soon

    Distillation

    A big model teaches a small one to be nearly as good, much cheaper.

  5. Interactive

    Coming soon

    Synthetic data

    Use a model to generate training and test data, and its traps.

08Choosing and running models

0 live · 7 coming

Which model, where, and for what.

  1. Interactive

    Coming soon

    Open vs closed models

    API models or open weights: quality, cost, control and privacy.

  2. Interactive

    Coming soon

    Reasoning models and thinking budgets

    Spend more tokens thinking for harder problems, and when not to.

  3. Interactive

    Coming soon

    Small and on-device models

    Fast, cheap and private, if the task is narrow enough.

  4. Interactive

    Coming soon

    Running models locally

    Download a model and run it on your own machine.

  5. Interactive

    Coming soon

    Multimodal models

    Images, audio and video in the same prompt as text.

  6. Interactive

    Coming soon

    Speech to text and text to speech

    Transcription and voices, and the latency of a voice conversation.

  7. Interactive

    Coming soon

    How image generation works

    Diffusion: start from noise and remove it step by step.

09Responsible AI

0 live · 4 coming

Using AI without causing harm.

  1. Interactive

    Coming soon

    Bias and fairness

    Where bias comes from, and how to measure it.

  2. Interactive

    Coming soon

    Alignment basics

    Getting a model to do what people actually want, safely.

  3. Interactive

    Coming soon

    Privacy and training data

    What models can memorize, and keeping personal data out.

  4. Interactive

    Coming soon

    AI regulation

    What laws like the EU AI Act require from teams shipping AI.

In production

Tools you can use

95 technologies across 26 live sessions. Same names in any language — pick a session to see how the idea maps to the real world.

Services, platforms, protocols and standards — not one stack.

Roadmap

Coming soon

A step-by-step path through the track, with sessions and practice at each stage.

  1. Stage 1

    Foundations and how LLMs work

  2. Stage 2

    Prompting and retrieval

  3. Stage 3

    Agents and evaluation

  4. Stage 4

    Adapting and choosing models

  5. Stage 5

    Responsible AI

Projects

Coming soon

Build something real to lock in the skill.

  • Build a RAG chatbot over your docs
  • Build a tool-using agent
  • Write an eval harness