Video brief · S01E01

Mechanics Behind Generative AI

Ready to record — the brief is approved; the video is not recorded yet.

The MEGA introduction video has to set the tone for the entire course. Its goal is to show how we can work with AI today by going through 5-10 examples, from the simplest to one that will be mind-blowing. Each example has to present a concept that the student needs to understand about AI.

  • Text Completion: Under the hood, chatML is next-token prediction. It’s autoregressive, so whatever is in the context so far affects the model’s behavior, both positively and negatively. We may show how the context can bias even the most capable models and reduce their performance.
  • Model Mechanics: Tokenization and context limits (input / reasoning / output) are mechanics common to all models that affect the way they perceive the world. The knowledge cutoff also affects a model’s performance when personal context (e.g., a codebase) or the latest knowledge is needed.
  • Context Processing: What we send to the model is not what the model gets: system instructions, developer messages, environment awareness injection, tool schemas, code mode, filesystem-based interaction, compaction, and subagents.
  • Structuring Outputs and Using Tools: Models can structure data, allowing them to generate JSON payloads for function execution. Today, they are better at writing code, so this is a way for them to interact with the world. + intro to agentic loop
  • Steering a Model: Everything that happens in a chat steers a model. We may also help a model steer itself better by having it generate associations and questions before jumping to conclusions.

We may want to showcase scenarios such as:

  1. Same Task, Different Context
  2. Confident Answer about Yesterday
  3. Asking the model what it actually sees
  4. Messy e-mail to structured output
  5. Agent spawning multiple worker waves for the same task
  6. An agent is woken up automatically by an external event and runs the flow