Artificial Intelligence Lesson 1 of 4
Mental Models: How LLMs Actually Process Information
16:40 AI for Everyday Problem Solving
Break down the illusion of AI magic. Understand tokens, embeddings, next-token prediction, and why context windows are precious working memory.
Lesson notes
When you write to an LLM, it does not 'think' like a human being. It converts your text into mathematical vectors (tokens) and calculates the highest probability subsequent token based on billions of parameters. Understanding this mental model helps you write prompts that guide probability toward desired outcomes.
What you'll learn
- LLMs are probabilistic token predictors, not conscious search engines
- Why temperature and top-p dictate creativity versus determinism
- How context limits shape prompt structure
1. The Token Economy
Text is broken into sub-word chunks called tokens (roughly 4 characters or 0.75 words). Punctuation, capitalization, and formatting all consume tokens. Keeping prompts concise saves cost and reduces attention dilution.
2. Controlling Output with Temperature
Temperature controls randomness: 0.0 produces predictable, deterministic answers (ideal for code, JSON extraction, and classification), while 0.7 to 1.0 increases variance (ideal for brainstorming and creative writing).
Quick check
Which temperature setting is best suited for extracting clean JSON data from invoices?
- A.Temperature 1.5 for maximum creativity
- B.Temperature 0.0 or 0.1 for high determinism and adherence to schema
- C.Temperature -1.0
- D.Temperature 0.9
Low temperature (0.0 to 0.1) reduces randomness and strictly aligns output with your requested schema.