How Language Models Work

A non-technical explanation of how AI language models generate text.

Large Language Models (LLMs) like ChatGPT, Claude, and others are the technology behind modern AI assistants. Understanding how they work - at a conceptual level - helps you use them more effectively and recognize their limitations. The key insight: they predict what text should come next, one piece at a time.

Objectives

  • Understand the basic concept of next-token prediction
  • Explain why LLMs can seem knowledgeable without "knowing" anything
  • Recognize how training data shapes model behavior
  • Understand why LLMs can generate plausible-sounding false information
  • Appreciate the difference between retrieval and generation

Key Takeaways

  • LLMs predict text one piece at a time based on learned patterns
  • They do not retrieve facts from a database - they generate likely text
  • Training data determines what patterns the model learned
  • Plausible-sounding output is not the same as correct output
  • The model has no way to verify what it generates