Home Chinland InfoTech Academy
Ready
All Courses

How AI Works — concept library

A set of quick, interactive explainers. Open whichever you have time for. The Foundations group is the core story; “Reality checks” and the optional deep-dive are great if time allows.

The big idea

AI learns by example — not by rules

Nobody writes down “a cat has pointy ears.” We show the machine thousands of examples and it finds the pattern itself. Drop your own examples and watch it learn where the line goes.

Try it

Pick a colour, then click the board to drop examples. It redraws the dividing line every time — it was never told the rule.

Drop a few of each colour

Then switch to “Test a point” and click anywhere — it guesses the colour from what it learned.

What a neural net is

Inside the “brain”: signals & weights

An AI is a web of simple units — “neurons” — wired in layers. Every wire carries a weight it learned from examples. A neuron adds up what reaches it and passes the signal on. Flip the clues and watch the answer flip.

Give it clues

Toggle what the network “sees.” Signals flow left → right and the output leans toward an answer.

Pick some clues

Cat
Dog

The point

No rule says “pointy ears = cat.” It learned the weights from examples. That’s all a neural net is: weighted connections turning inputs into an answer.

Where the words come from

It taught itself by filling in blanks

Before it could chat, it read a huge slice of the internet and played one game billions of times: hide a word, guess it, peek at the answer, adjust. Do that enough and it learns how language works.

It read billions of words from:
Press “Train one step” to begin

The fill-in-the-blank game

Hide a word → guess → reveal the truth → nudge its settings. Repeat at scale and accuracy climbs.

Progress

Examples seen0
Accuracy8%
Why it can’t spell

It reads in chunks, not letters

AI doesn’t see individual letters — it breaks text into chunks called “tokens.” Common chunks stay whole; rare ones get split smaller. That’s why it writes essays easily but trips on “how many R’s in strawberry.”

Try these

Watch how a word splits. The AI never sees the separate letters inside a chunk.

Why are the chunks uneven?

The chunks aren’t fixed-size. The tokenizer learned them from how often letter-sequences appear in training text: common sequences (“the”, “ing”, “play”) become a single token, while rare ones get chopped into smaller pieces — sometimes single letters. Hit “Colour by commonness” to see it.

Prediction isn't new

You already predict — like a farmer

A farmer forecasts tomorrow's weather from past seasons and today's signs, to decide when to plough, plant and harvest. AI does the very same thing: learn from the past, read the present, predict what's next.

🌾 Farmer's forecast
8%chance of rain
tomorrow

What the farmer notices

This month
Rained last 3 days?
Sky right now
Wind

The plan

Same trick — meet AI

Show it as
Past seasonstraining data
Today's sky & windnew input
Years of experiencethe trained model
“Rain tomorrow”the prediction
Plough / plant / harvestthe decision
How it generates anything

It predicts the next word — it doesn’t “know”

Chatbots, captions, code — same trick underneath: guess the next word, then the next. Because it’s a guess, the same start can finish differently every time.

The weather today is

Watch it guess

The bars are how likely each word is. Predict rolls the dice, weighted by the bars.

Predictability

focusedwild

Balanced — sometimes surprising

Ready

Run it a few times from the same start. Different endings = why it’s never boring, and why it sometimes makes things up.

How it grasps meaning

Meaning is a map

The AI turns every word into a point in space, so related words sit near each other. The wild part: directions have meaning too. Run the classic “king − man + woman” and watch where it lands.

Word arithmetic

The arrow from one word to another is a “meaning direction.” Apply it elsewhere and you land on the matching word.

Pick an example

Similar words cluster; the “gender” and “capital-of” directions are consistent across the whole map.

The whole toolbox

What AI can actually do

It’s not just chat. The same core idea now powers six big things — tap each to see it move. We’ll go deep on these all week.

Why now?

It got good by getting big

For years AI was clumsy. Then we fed it far more data and computing power — and new abilities emerged on their own. Drag the slider to grow the model.

tiny

A handful of “neurons”. Output is basically noise.

Confident… and wrong

Why it makes things up

It’s built to produce a plausible answer, not a true one — and it has no built-in “I don’t know.” Ask about something that doesn’t exist and it’ll confidently invent details. Always verify.

Tell me about the explorer Marco Delgado.

Try a made-up thing

None of these exist. Watch it answer anyway, fluent and sure of itself.

Confidence

Notice it stays high even when the answer is invented. Confidence ≠ correctness.

Frozen in time

It has no live knowledge

A model only knows what it read during training — everything after its “cutoff” date is a blank. That’s why modern tools bolt on web search. Flip the switch to see the difference.

What happened in the news this week?

Training cutoff

Think of a wall: it learned everything up to a date, then stopped. New events fall on the far side of the wall.

Why it matters

Off = it can’t know recent events. On = it searches, reads, then answers. That search step is doing the heavy lifting.

It learned from us

Bias in, bias out

It mirrors its training text — including our lopsided habits. If the data mostly pairs “nurse” with “she” and “engineer” with “he,” the model picks that up. Cleaner data, fairer output.

Prompt: “The nurse picked up their bag, and ___ left.”

Switch the training data

Same model, different diet of examples. Watch the “she / he” guess shift.

The lesson

The model isn’t “sexist” on purpose — it copied a pattern from us. That’s why who curates the data matters, and why we check outputs.

From raw to helpful

It was taught manners

Straight out of training, a model just continues text — often unhelpful or unsafe. People then rate its answers 👍/👎 until it learns to be helpful, polite, and to refuse harmful stuff. Press to train it.

Raw model
How do I make friends?
…friends romans countrymen friends list friends with benefits friends s02e04…
After human feedback
How do I make friends?
Start small: join a club around something you enjoy, ask people questions, and follow up. Shared activities make it easy.

Two stages

Stage 1: predict text (raw). Stage 2: humans reward good answers until it behaves like an assistant.

Why it matters

This stage is why assistants are polite, helpful, and decline dangerous requests. It’s a layer of human values on top of raw prediction.

The context window

Its memory has limits

It can only “see” a limited window of recent text. In a long chat, the earliest things scroll out of view — and it genuinely forgets them. Add messages and watch the window slide.

Window size

Remembers the last 4 messages

Faded messages are forgotten

Bigger windows remember more but cost more. This is why very long chats start to “lose the thread.”

Tokens, in depth

Who decides the chunks?

Nobody picks them by hand. The tokenizer starts with single letters and repeatedly glues together the most common neighbouring pair. Frequent combos become chunks — which is why “play” ends up whole but rare strings stay in pieces.

Build the vocabulary

Each step merges the most common adjacent pair into a new chunk and saves it to the vocabulary.

Learned chunks

The payoff

Do this across billions of words and common ones (“the”, “ing”, “play”) become single tokens, while rare words break into pieces. That’s why chunk sizes come out uneven.

The paradigm shift

Old way vs AI way

The old way: a human writes exact rules — fine until something unusual shows up. The AI way: show it thousands of examples and it learns to handle the messy real world. Send test cases through both and watch.

Press “Send a test case”
Old way · hand-written rules
if pointy_ears
and has_whiskers:
  → "cat"
accuracy
AI way · learned from examples
saw 100,000s of labelled
cats, dogs, foxes…
→ learned the pattern
accuracy

Send cases through both

Same input to each. Watch the rigid rules trip on anything unusual.

The shift

Rules are clear but brittle — every exception needs a new rule, forever. Learning from examples bends to the real world. That flip is why modern AI took over.

How it improves

It learns from its mistakes

Training isn’t magic — it’s a downhill walk. The AI measures how wrong it is, then nudges its settings in the direction that lowers the error. Repeat millions of times and it slides to the bottom.

Roll downhill

Each step moves the setting toward less error. The slope tells it which way is “downhill.”

Step size (learning rate)

tiny stepsbig steps

Current error: . Too big and it overshoots; too small and it crawls.

One trick, any input

Everything becomes numbers

Text, images, sound — before the AI can use anything, it’s turned into a long list of numbers. That’s why one kind of AI can handle words, pictures and audio: underneath, it’s all just numbers.

Pick an input

See it converted into the numbers the AI actually reads.

Why it matters

Once everything is numbers, the same maths works on all of it — and the AI can mix them: describe a picture, caption a sound, draw from a sentence.

How you steer it

Anatomy of a good prompt

You control the output by how you ask. Four ingredients do most of the work — role, context, task, format. Toggle them and watch a vague answer turn into exactly what you wanted.

Your prompt
What you get back

Add ingredients

Each part you add steers the answer closer to what you need.

Answer quality: vague

Same AI, wildly different result — just from a clearer prompt. The #1 skill we’ll use all week.

AI you use every day

Why your feed feels personal

Spotify, TikTok and Netflix all do one trick: every song or show is a dot on a giant “map of taste,” and they recommend the ones nearest to what you already like. Tap a few favourites and watch your feed build.

Tap what you like

Click dots on the map. The app finds the closest ones you haven't tried — that's your feed.

Your “For You”

Same trick — meet AI

Each song's “vibe”a point on a map
What you tappedyour taste
Nearest dotsthe recommendation
How it learns to behave

Training a puppy

A puppy doesn't read a rulebook. You give a command, reward the good tries with a treat, and after enough 👍 it learns. AI assistants are taught to be helpful and polite the exact same way — people reward the good answers.

Give a command

Pick a command…

Obedience 10%

Same trick — meet AI

Your 👍 / 👎human feedback
Treats for good triesa reward signal
Learns to obeyhelpful, polite AI
Confident, not correct

The forgetful witness

Someone glimpses a street for two seconds, then swears to details they never really saw — confidently filling the gaps with what seems likely. AI does the same: it gives a fluent, confident answer even when it's guessing. Sounding right isn't the same as being right.

Press “Glance” to see the scene for 2 seconds

Be the witness

Glance, then start asking.

Its confidence

Same trick — meet AI

Gaps in memorymissing knowledge
Fills with what fitsa plausible guess
Sounds certainconfident hallucination
A limited window

The waiter's memory

A great waiter holds your order in their head — but only so many at once. As new orders come in, the earliest slips away. AI is the same: it remembers a limited window of recent messages, and older ones fade out.

🧑‍🍳 remembering the last 4 orders…

Run the café

Memory size

Holds the last 4 orders

Same trick — meet AI

Orders in his headthe context window
Oldest slips awayforgotten text
Bigger memorylonger context
Menu ← → move · Esc menu · 1–9 jump