AI Fundamentals — How Modern AI Works›How models work · Cheat sheet & self-check
Learning Hub / AI Fundamentals & AI-Assisted Engineering / AI Fundamentals — How Modern AI Works

How models work · wrap-up

Cheat sheet & self-check

Every command from this section on one page.

01 · AI, machine learning and LLMs: the map

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 learningMachine learning with large neural networks of many layers
Generative AIModels 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 modelA large general-purpose model that many products are built on
ModelA file of learned numbers (parameters) plus the program that uses them
TrainingAdjusting the parameters from examples; slow and expensive, done rarely
InferenceUsing a trained model to get an answer; done every time you ask

02 · How a large language model works

Terms

TokenA piece of text the model reads and writes: a word, part of a word, or punctuation
TokenizerTurns text into token numbers and back
Next-token predictionThe 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
TransformerThe neural-network design behind modern LLMs
AttentionHow the model weighs every earlier token when predicting the next one
Pre-trainingLearning to predict text from a huge general collection
Fine-tuning / instruction tuningFurther training on examples of good instructions and answers
RLHFReinforcement learning from human feedback: people rank answers, the model learns their preferences
Reasoning modelA model trained to work through steps before giving its final answer

03 · Prompts, context windows and settings

Terms

PromptEverything sent to the model for one request
System promptInstructions from the application, sent first: role, rules, tone, format
Context windowThe maximum number of tokens the model can consider at once (input plus output)
Input / output tokensTokens sent to the model / tokens it writes; both are usually billed
TemperatureHow much randomness is used when choosing the next token
Few-shot promptingIncluding a few worked examples in the prompt
StatelessThe model keeps nothing between requests; the app re-sends the history

Prompting habits that work

Say who and whyWho the answer is for and what it will be used for
Give the materialPaste the log, document or data instead of describing it
Show the formatAn example of the output you want
Allow 'I don't know'Tell it to say so when the material does not contain the answer

04 · Why models get things wrong

Failure modes

HallucinationFluent, confident output that is false or invented
Knowledge cut-offThe model knows nothing after its training data was collected
BiasPatterns in training data (including unfair ones) show up in answers
SycophancyTendency to agree with the user, even when the user is wrong
Non-determinismThe 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
ToolsLet it look things up or calculate instead of guessing
CitationsAsk for the source of each claim so a person can check
VerificationTests, policy checks and human review before anything important