The path to AI FDE #05: AI, ML and LLMs in plain words, and how an LLM writes
Originally published on my newsletter, The Path to AI FDE. Subscribe free to get each issue by email. This is a “From Zero” issue. If you’ve never written code or used an AI API, start here. If you’re a developer, the s
Originally published on my newsletter, The Path to AI FDE. Subscribe free to get each issue by email.
This is a “From Zero” issue. If you’ve never written code or used an AI API, start here. If you’re a developer, the second half (how text actually gets generated) explains most of the weird behaviour you’ll meet later. No maths and no code: just the words people throw around, and what’s going on underneath.
Part A · The words, in plain English
1. AI is the broad umbrella. The OECD’s definition, widely cited in AI policy, boils down to this: an AI system is a machine that works out, from the input it gets, how to produce outputs such as predictions, content, recommendations or decisions. Systems differ in how independently they act and whether they keep adapting after launch.
2. Machine learning means learning from examples instead of hand-written rules. You train a piece of software called a model on data, and it learns to make predictions or generate content. Google’s crash course sorts ML into four families: supervised (learning from labelled examples), unsupervised (finding patterns without labels), reinforcement (learning from rewards) and generative AI.
3. Deep learning is ML with large neural networks. Many-layered networks learn their own features from raw input (pixels, characters) instead of humans designing them. The approach took off around 2010 and powers nearly everything that follows.
4. A large language model (LLM) is a deep network trained on a huge amount of text to predict what comes next. Do that across a large slice of the written internet, and the model picks up grammar, facts, style and a surprising amount of reasoning-like behaviour along the way.
5. A foundation model is one big model reused for many jobs. Researchers at Stanford coined the term in 2021 for models trained on broad data at scale and then adapted to a wide range of tasks. That’s why companies build products on top of a few such models instead of training their own.
6. Generative AI creates new content. Text, images, audio or code from your input, instead of just a label. Every LLM chatbot is generative AI, but not all AI is generative: a fraud detector that says “suspicious: yes/no” isn’t.
7. A hallucination is a confident answer that’s wrong. OpenAI defines it as a plausible but false statement. Part of the cause is that training and evaluation reward a good guess over “I don’t know”, and rare facts, like one person’s birthday, can’t be inferred from patterns in text. So an LLM is a brilliant pattern engine, not a database of verified facts. This is why later issues ground answers in real documents.
Part B · How an LLM writes text (no maths)
8. Text becomes tokens first. The model reads tokens: common words, word pieces and punctuation, not letters or whole words. Everything is counted in tokens, including limits and prices.
9. At each step it scores every possible next token. Given everything so far, each token in the vocabulary gets a likelihood. (The figure’s bars are illustrative, not from a real model.)
10. It writes one token at a time, in a loop. Each new token depends on all the ones before it, and the loop stops at a special end token, a stop sequence you set, or a length limit. That’s why answers stream in word by word, and why long answers take longer.
11. A little randomness is on purpose. The model doesn’t always take the top choice. Temperature is the dial (higher is more varied, lower more focused), and settings like top-p limit picks to the most likely candidates. So the same question can give different answers, and that’s normal.
12. Two training stages: read a lot, then learn to help. Pre-training is self-supervised: the model reads raw text and learns to predict the next token, no human labelling needed. Then it’s tuned on examples and feedback so it follows instructions instead of just continuing text. InstructGPT (2022) was an early public example.
13. Every call starts from zero. The model doesn’t remember your last message. Chat apps feel continuous because they resend the whole conversation with each request. (That’s the stateless API from #01: memory is the app’s job, not the model’s.)
Try it (10 minutes, no code)
In any chatbot, ask the same open question three times in fresh chats (”Give me a name for a bakery”) and compare the answers. Then ask something obscure and specific, such as a small-town council member’s birthday, and notice how confident the answer sounds. You’ve just seen points 11 and 7.
Common beginner mistakes
- Treating “AI”, “ML” and “LLM” as synonyms. They’re nested, not the same.
- Assuming the model looks facts up. By default it predicts; it doesn’t retrieve.
- Thinking the chatbot remembers you. The app resends history.
- Counting words instead of tokens when estimating limits or cost.
Takeaway
An LLM is a next-token predictor, trained on a lot of text and then tuned to be helpful. It writes one token at a time with a bit of chosen randomness, and it remembers nothing between calls.
Where this fits in my roadmap: this is on-ramp material, not part of my current study block. I already work with these ideas as a TypeScript engineer, so I’m writing it for readers starting from zero. It also gives later issues shared vocabulary. The deeper versions (tokenizers, context windows, prefill and decode, sampling, how training works) come in Section 6, once my roadmap gets there.
Over to you: which AI term did you nod along to for longest before you really knew what it meant?
Sources
- OECD.AI: Updates to the OECD’s definition of an AI system explained (2023). https://oecd.ai/en/wonk/ai-system-definition-update
- Google ML Crash Course: What is machine learning? (training a model on data; supervised, unsupervised, reinforcement, generative AI). https://developers.google.com/machine-learning/intro-to-ml/what-is-ml
- Bommasani et al., On the Opportunities and Risks of Foundation Models (Stanford CRFM, 2021): defines “foundation model”; history of deep learning. https://arxiv.org/abs/2108.07258
- Hugging Face LLM Course, Ch. 1: How do Transformers work? (self-supervised pre-training on raw text; causal language modelling; fine-tuning; InstructGPT, Jan 2022). https://huggingface.co/learn/llm-course/chapter1/4
- Hugging Face LLM Course, Ch. 1: Deep dive into text generation inference (one token at a time; temperature, top-p, top-k; stop conditions). https://huggingface.co/learn/llm-course/chapter1/8
- Hugging Face LLM Course, Ch. 2: Tokenizers (”token” + “ization”). https://huggingface.co/learn/llm-course/chapter2/4
- OpenAI: Why language models hallucinate (Sep 5, 2025). https://openai.com/index/why-language-models-hallucinate/
- Anthropic: Working with the Messages API (stateless; resend the conversation). https://platform.claude.com/docs/en/build-with-claude/working-with-messages
Sources checked Oct 18, 2026.
Free: the 5-page roadmap from Novice to AI FDE.
If this was useful, subscribe to The Path to AI FDE for the next issue.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.







