Level 2 — Router Pattern: The LLM Picks a Path

~10 min read

A human defines the available paths or functions in advance; the LLM's job is to make a basic decision about which one applies to a given input — the first real bit of decision-making control handed to the model.

Level 2 — Router Pattern: The LLM Picks a Path is a Pro topic

Sign in, then upgrade to Pro or Power to unlock this topic and the full AI Engineering curriculum.

Key points

  • A human defines a fixed set of paths/functions in advance; the LLM's job is deciding which one applies to a given input
  • This is the first level where the LLM meaningfully influences program flow, not just produces content within a fully-planned flow
  • The LLM's decision space is still tightly bounded — it can only pick among pre-built paths, not invent new ones or take further action
  • Router patterns are extremely common in production, capturing real routing value while keeping any single mistake's blast radius small
  • A wrong routing decision sends a query down the wrong pre-built path — it can't cause genuinely unplanned behavior