CURIOUSMINDS / AI ENGINEERING / CLARA WREN
00:00 / 10:00

Ten slides with reading pauses, for high-school learners. This presentation is silent. Open “Clara’s script” below each slide to read the teaching narration. No code or advanced math required. The timer pauses while this tab is hidden.

01 / 10

How AI connects words

From perceptrons to self-attention A first look inside a language model
Artistic metaphor: language fragments pass through a computation core.

Sources: [1]. Original illustration, shown as a metaphor.

Clara’s script, 00:00–00:57

Hi, I’m Clara Wren. You type a question, press Enter, and a paragraph appears. What happened between those two moments? Today we’ll build a useful picture of that process without advanced math. We’ll follow words as they become numbers, see how a model connects information, and ask what its answer actually proves. By the end, you should be able to explain attention to a friend using an ordinary sentence. You do not need to code along. You only need multiplication, curiosity, and a willingness to pause before accepting a convincing answer. One boundary before we start: we’re looking at a common kind of language model called a Transformer. Other designs exist. The glowing machine in this illustration is an artistic metaphor, rather than a picture of the actual software.

02 / 10

Text becomes numbers

Text Token pieces Number IDs Lists of numbers called vectors
StageIllustrative example
TextA sentence you type
TokenA word piece or punctuation
IDA vocabulary lookup number
VectorA list such as [0.2, −0.4, 0.7]

Sources: [2], [3].

Clara’s script, 00:57–01:56

A computer does not receive a sentence as an idea. First, a tokenizer breaks the text into pieces called tokens. A token might be a whole word, part of a word, or punctuation. Different tokenizers can divide the same sentence differently, so counting words is not a reliable token count. Each token gets a number ID, a little like a book’s location in a catalog. The model uses that ID to look up a vector, which is simply a list of numbers. Those numbers give the model something it can calculate with. Here is our simplified route: text, token pieces, IDs, then vectors. Later layers change those vectors using the surrounding text. The number assigned to a token is an address. A larger ID does not mean a more important word.

03 / 10

A neuron makes a weighted calculation

Inputs: 2 and 1 Weights: 0.5 and −1 Bias: 0.25
(2 × 0.5) + (1 × −1) + 0.25 = 0.25

Sources: [3].

Clara’s script, 01:56–02:57

Let’s make one small piece of a neural network less mysterious. Imagine two input numbers, two and one. Give the first input a weight of one half, and the second a weight of negative one. Multiply each input by its weight, add the results, then add a bias of one quarter. Two times one half is one. One times negative one is negative one. Those cancel, leaving one quarter. An activation function then transforms the result. A simple example called ReLU keeps positive values and replaces negative values with zero. Our result stays one quarter. These numbers are invented for arithmetic practice. They are not a real language detector. A classical perceptron uses a threshold. Modern networks commonly use other activations and many connected calculations.

04 / 10

Training and answering are different jobs

Training adjusts the model’s weights. Ordinary answering uses the weights it already has.
TrainingOrdinary inference
Practice on examplesProcess the current request
Measure a training objectiveCompute possible next tokens
Update parametersUse existing parameters

Sources: [3], [4].

Clara’s script, 02:57–03:57

Where do useful weights come from? During training, a model makes predictions, measures how far those predictions are from a target, and adjusts its parameters. Weights and biases are examples of parameters. Think of practicing a musical instrument and changing how you play after feedback. During ordinary answering, often called inference, the model uses the parameters it already has. Adding a sentence to a chat changes the information available in that conversation. It does not, by itself, retrain the model. An application can also save messages or retrieve documents, which is a separate operation. Here is a quick check: if you tell an assistant your favorite color, has that automatically changed its neural-network weights? No. It may use the message while it remains available in context.

05 / 10

Context changes what a word suggests

“We sat beside the river bank.” “She deposited money at the bank.”
A riverbank beside a financial bank building, illustrating two meanings of bank.

Sources: [1], [3]. Original illustration, shown as a metaphor.

Clara’s script, 03:57–04:59

Look at these two scenes. A riverbank and a financial bank share a word, but suggest very different things. In the first sentence, river helps us interpret bank. In the second, deposited and money provide different clues. A language model needs a way to connect information across a sentence rather than treat every word as isolated. In older recurrent designs, a hidden state travels along the sequence one step at a time. That creates a dependency between steps. Transformers introduced a different architecture built around attention, allowing more parallel work across positions during training. Attention lets a position combine information from other allowed positions. Our picture illustrates the two meanings. It does not show the model’s actual internal representations, which are numbers rather than miniature landscapes.

06 / 10

Attention combines information

Query: what is being matched? Key: what can be matched against? Value: what information can contribute?
RoleSimple description
QueryRepresentation used to compare
KeyRepresentation compared against
ValueRepresentation mixed into the output

Sources: [1].

Clara’s script, 04:59–05:57

Attention has three roles with names you will hear often: query, key, and value. They are numerical representations produced by learned calculations. A query gets compared with keys to produce matching scores. A step called softmax turns the allowed scores into nonnegative weights that add up to one. The output mixes value vectors according to those weights. You can loosely imagine looking back through notes and giving some passages more influence than others. Keep the limit of that analogy in mind: the software is performing calculations. It is not deciding what to notice the way a person does. Different attention heads can learn different patterns. A large attention weight tells us about that calculation, but it does not independently show that a sentence is true.

07 / 10

A tiny attention example

Illustrative weights add up to 100%. The output is a weighted blend.
ValueWeightContribution
860%4.8
430%1.2
210%0.2
4.8 + 1.2 + 0.2 = 6.2

Sources: [1].

Clara’s script, 05:57–06:55

Let’s use small numbers so we can check the idea ourselves. Suppose three allowed values are eight, four, and two. Suppose their attention weights are sixty percent, thirty percent, and ten percent. These weights are invented for this explanation. They did not come from a trained model. Multiply each value by its share: eight times point six is four point eight. Four times point three is one point two. Two times point one is point two. Add those contributions and we get six point two. That is a weighted blend. Real attention usually mixes whole vectors, or lists of numbers, instead of these single values. The same idea applies to each position in the output vector. Pause here if you like and check that the shares total one hundred percent.

08 / 10

The model cannot peek ahead

Causal attention allows the current position and earlier positions. Future positions stay hidden.
Current positionThecatsat
TheUseHiddenHidden
catUseUseHidden
satUseUseUse

Sources: [1].

Clara’s script, 06:55–07:52

Imagine practicing next-word prediction with the sentence The cat sat. At the position containing The, the model should not be allowed to peek at cat or sat. At cat, it can use The and cat, but it should not see sat. A causal mask enforces that restriction in attention. Read the table one row at a time. Use means the position is allowed. Hidden means the mask blocks it. During training, the full example can already be available to the computer, and the mask still restricts what each position can use. This helps explain how training can compute many positions in parallel. Ordinary generation has a different dependency: after selecting a new token, the system can use that token when it computes the next one.

09 / 10

A Transformer repeats these building blocks

Attention mixes information across allowed positions. Other network layers transform it. The model computes scores for possible next tokens.

Sources: [1], [3].

Clara’s script, 07:52–08:55

We have zoomed in on one operation, but a Transformer contains more. It uses multiple attention heads, feed-forward layers that transform representations, and other components that help information move through the network. Position information helps the model distinguish different word orders. Repeated blocks refine the representations, and a final calculation produces scores for possible output tokens. A decoding rule selects a token, appends it, and continues. Repeating that process can produce a sentence or a longer response. There is no single tiny neuron that stores every answer like a filing cabinet. Useful behavior comes from many learned computations working together. Our tour is intentionally simplified. You now have enough of the structure to ask better questions about what information the application supplies and how its answers should be tested.

10 / 10

A good answer still needs evidence

Explain: What is a token? Explain: What does attention combine? Check: Does a fluent answer prove it is correct?

Sources: [1], [3].

Clara’s script, 08:55–10:00

Let’s finish with three questions. What is a token? It is a unit from the tokenizer’s vocabulary, which might be a word piece or punctuation. What does attention do? It combines value representations using weights calculated from queries and keys, while respecting restrictions such as a causal mask. And does a fluent answer prove that it is correct? No. An answer can sound convincing while missing the evidence your task requires. Suppose a support assistant says every repair takes one hour. Ask which current policy supports that claim. Attention weights alone will not provide that verification. Today you followed text into numerical representations, checked a weighted blend, and explained why a model cannot peek ahead during causal prediction. I’m Clara Wren. Keep asking what the system used, what it computed, and how you can check the result.

Sources and credits

  1. Attention Is All You Need (Vaswani et al., 2017)
  2. Byte-Pair Encoding tokenization, Hugging Face LLM Course
  3. Google Machine Learning Crash Course: large language models
  4. Google Machine Learning Crash Course: fine-tuning and prompting

Original teaching script and examples. Two original AI-generated illustrations. Invented numerical examples explain the calculation and do not report a trained model’s measurements.