Skip to main content
SWStudyWalks Search

Artificial Intelligence / Unit 9   AI 0507 worked example, 60 to 90 seconds

Words as Rows

Captions available

The idea

An embedding gives every word a row of numbers positioned so that words used similarly get similar rows — turning "unseen but plausible" into ordinary nearness arithmetic.

In practice

Tally, for three words, how often each appears near weather-talk and near kitchen-talk: rain lands at (9, 0), snow at (8, 1), flour at (0, 7). Plot the rows as Unit 8's graph-paper points. Rain and snow sit close together; flour sits far away — pure co-occurrence, no meanings defined, no dictionary consulted. Now the payoff. A model that has seen "the snow melted" can half-trust "the rain melted," because prediction can lean on a near neighbor's statistics instead of demanding the exact string. The zero that killed the counting model becomes a small honest number borrowed from the neighborhood — which is what a similarity ruler is for.

Where people slip

Two columns made the toy work; real embeddings use hundreds — the geometry survives the width.

Your place on the trail

Every lesson rests on earlier ones and opens later ones. Tap any to jump.

Something wrong in this lesson? Flag it  ·  Sources for Artificial Intelligence