Lesson 1.1 — What an AI model actually does
ReadStep 1 of 3
It predicts text
An AI coding assistant is built on a language model. The model has learned patterns from a huge amount of text and code.
When you send it words, it predicts what is likely to come next, one small piece at a time. Those pieces are called tokens.
That is the whole trick. It is very good at it, which is why the answers read so well.
Prompt pad0 words
The four ingredients
- Task. What you want done, as a clear action.
- Context. The language, the code, the error.
- Constraints. What must not change. What to avoid.
- Format. The shape of the answer you want.
Use this space to try a prompt for your own project, then copy it into the AI tool you use.