How models work · wrap-up
Cheat sheet & self-check
Every command from this section on one page.
The terms
Artificial intelligence (AI) | Any technique that makes a computer do something we would call intelligent |
Machine learning (ML) | AI that learns patterns from examples instead of following hand-written rules |
Deep learning | Machine learning with large neural networks of many layers |
Generative AI | Models that create new content: text, images, audio, code |
Large language model (LLM) | A generative model trained on huge amounts of text to predict the next piece of text |
Foundation model | A large general-purpose model that many products are built on |
Model | A file of learned numbers (parameters) plus the program that uses them |
Training | Adjusting the parameters from examples; slow and expensive, done rarely |
Inference | Using a trained model to get an answer; done every time you ask |
Terms
Token | A piece of text the model reads and writes: a word, part of a word, or punctuation |
Tokenizer | Turns text into token numbers and back |
Next-token prediction | The model's only basic skill: given the text so far, score every possible next token |
Parameters (weights) | The learned numbers inside the model; billions of them |
Transformer | The neural-network design behind modern LLMs |
Attention | How the model weighs every earlier token when predicting the next one |
Pre-training | Learning to predict text from a huge general collection |
Fine-tuning / instruction tuning | Further training on examples of good instructions and answers |
RLHF | Reinforcement learning from human feedback: people rank answers, the model learns their preferences |
Reasoning model | A model trained to work through steps before giving its final answer |
Terms
Prompt | Everything sent to the model for one request |
System prompt | Instructions from the application, sent first: role, rules, tone, format |
Context window | The maximum number of tokens the model can consider at once (input plus output) |
Input / output tokens | Tokens sent to the model / tokens it writes; both are usually billed |
Temperature | How much randomness is used when choosing the next token |
Few-shot prompting | Including a few worked examples in the prompt |
Stateless | The model keeps nothing between requests; the app re-sends the history |
Prompting habits that work
Say who and why | Who the answer is for and what it will be used for |
Give the material | Paste the log, document or data instead of describing it |
Show the format | An example of the output you want |
Allow 'I don't know' | Tell it to say so when the material does not contain the answer |
Failure modes
Hallucination | Fluent, confident output that is false or invented |
Knowledge cut-off | The model knows nothing after its training data was collected |
Bias | Patterns in training data (including unfair ones) show up in answers |
Sycophancy | Tendency to agree with the user, even when the user is wrong |
Non-determinism | The same question can produce different answers |
What reduces them
Grounding (RAG) | Give the model the source documents and ask it to answer only from them |
Tools | Let it look things up or calculate instead of guessing |
Citations | Ask for the source of each claim so a person can check |
Verification | Tests, policy checks and human review before anything important |