AI Basics

What is a language model?

════════════════════════════════════════════════════════════

6 min read

·
┌──────────────────────────────────────────────────────────┐
│  ═══════════════════════════════════════════════════     │
│  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░     │
│  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░     │
│  ────────────────────────────────────────────────────    │
│  ██████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░     │
│  █████████████████████████████████░░░░░░░░░░░░░░░░░░     │
│  ██████████████████████████████████████░░░░░░░░░░░░░     │
│  ████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░     │
│  ────────────────────────────────────────────────────    │
│  ███████████████████████████████████████░░░░░░░░░░░░     │
└──────────────────────────────────────────────────────────┘

A language model is a type of AI that understands and generates human language. It's trained on massive amounts of text to predict what words should come next in a sentence.

What Language Models Do

────────────────────────────────────────

Language models can:

  • [Understand context]: They know that "bank" means something different in "river bank" vs "bank account"
  • [Generate text]: They can write articles, stories, code, or answer questions
  • [Translate languages]: Convert text from one language to another
  • [Summarize content]: Condense long articles into short summaries

How They Work

────────────────────────────────────────

Language models learn patterns from text. When you give them a prompt like "The weather today is", they predict likely completions based on what they've learned from billions of examples.

They don't "understand" language the way humans do—instead, they recognize statistical patterns in how words appear together.

Examples

────────────────────────────────────────

Popular language models include:

  • [GPT] (Generative Pre-trained Transformer) from OpenAI
  • [Claude] from Anthropic
  • [Gemini] from Google

These models power chatbots, writing assistants, and coding tools.

Key Concepts

────────────────────────────────────────

[Tokens]: Language models break text into tokens—small pieces that can be words or parts of words. Understanding tokens helps you understand how models process text.

[Context window]: The amount of text a model can consider at once. Larger context windows let models understand longer conversations or documents.

[Prompting]: The art of writing instructions that get the best results from a language model. Good prompts are clear, specific, and provide context.