AI Literacy for Developers·A reliable AI workflow

How language models work

A language model predicts tokens from patterns in training data; it does not look up truth.

Beginner 12 min read Lesson 6 of 300 Challenge included
What you will be able to do
  • Treat output as a draft with a confidence level you have not measured.
  • The model’s context window is limited and temporary.
  • Retrieval and tools can ground an answer, but they do not guarantee it.

In plain English

A model receives context and produces a probability distribution over next tokens. Fluency is not evidence of correctness. The model has no persistent memory of your project unless you provide it, and it cannot know what happened after training.

prompt.txtText
You are reviewing a TypeScript function.

Constraints:
- Do not invent APIs.
- Point out uncertainty explicitly.
- If the code is safe, say so and stop.

Code:
${code}
Your turn

Write a constrained review prompt

Easy

Write a prompt asking for a code review with three explicit constraints: no invented APIs, cite uncertainty, and stop if safe.

TEXT · starter
Review this code:
Check your understanding before moving on.
Knowledge checkQuestion 1

What does a language model fundamentally predict?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Lesson 6 of 300 · 0% of course