You already know how to measure "how similar" two things are — you've done it with vectors in physics class. This lab takes nine different similarity/distance tools, some from physics, some from statistics, one from biology, and runs them on sentences instead of numbers, so you can see exactly which tool AI actually uses for meaning — and why.
Pick two sentences from the bank
These 15 sentences already have vectors attached, so every score below is exact math on those numbers — not an AI guess at a score. But read the note below before trusting the numbers themselves too much.
How these 16 numbers were actually made — and how that differs from a real embedding model:
What's real: the math from this point on — norm, distance, cosine angle, dot product, and so on — is genuine, correct arithmetic applied to whatever numbers each sentence has. Nothing about the formulas is faked.
What's simulated: the numbers themselves were not produced by any embedding model. I grouped the 15 sentences into topics by hand (space, workplace policy, dinosaur rides, dinosaur books, physics, finance, the car/vehicle paraphrase pair). For each topic I picked one random starting list of 16 numbers. Every sentence in that topic then got that same starting list, plus a small random nudge to each number. That's the entire "training" — a coin-flip-style random number generator, run once, by me, in advance.
Why that's not how a real embedding model works: a real model never groups sentences by a human-assigned topic label — it has no such labels to begin with. Instead, it reads the actual words and their order, runs them through billions of trained weights (built from seeing huge amounts of real text during training, as covered in the "How the vector gets made" tab), and the closeness between two sentences emerges from that learned process — not from me deciding in advance "these two belong in the same bucket." Here, similar-topic sentences land close together because I built them that way on purpose, as a teaching shortcut; in a real model, they land close together because the model learned that those meanings behave similarly across everything it was trained on. The scores you're about to see are a faithful illustration of what a real comparison would look like — not a real comparison itself.
Type your own two sentences
The other 7 algorithms need a real embedding — a set of 1024 numbers generated by an AI model — and this site doesn't call any AI in the background, so it can't generate that vector for a sentence you just typed. That's why those 7 only run on the 15 preloaded sentences, where the vectors were pre-computed in advance. Below, you can generate a copy-paste prompt that asks an AI to estimate what those 7 scores would look like — worth remembering that's an estimate, not a real computed number.
The reveal: "The car is fast." vs. "The vehicle is quick."
Zero words in common. Same meaning. Watch two algorithms completely disagree about that — and see exactly why.
How does a sentence become 1024 numbers?
A simplified, illustrative walk-through — not the real numbers a production model would generate, but the same shape of process. Sentence used: "The satellite orbits fast."