Module 2: How These Tools Work

LLM mechanics, context windows, hallucinations, sycophancy, and the landscape of AI coding tools.

Slides

View slides in full screen

Outline

  • How LLMs generate code: next-token prediction and why it produces both useful code and confident nonsense
  • Context windows and attention: what happens as conversations get long
  • Hallucination patterns specific to code: fabricated APIs, invented packages, plausible-but-wrong algorithms
  • Sycophancy and user-framing bias: why the model tends to agree with you
  • Landscape of AI coding tools: autocomplete, chat interfaces, agentic CLI harnesses, autonomous agents

Learning Objectives

  • Explain, at a practical level, how LLMs generate text and why this produces both useful code and confident nonsense
  • Describe what a context window is, why conversations degrade over length, and what “lost in the middle” means for long coding sessions
  • Identify common code-specific hallucination patterns: fabricated APIs, invented library functions, plausible but incorrect algorithms, and fake package names
  • Map the current landscape of AI coding tools (autocomplete, chat, agentic) and understand the tradeoffs between them