Skip to content
Paula Livingstone writing · projects · tools

Tool

What does the machine think you mean?

An embedding turns a piece of text into a list of numbers, a point in space, positioned so that things with similar meaning land near each other. It's the idea behind semantic search, recommendations, and most of how modern AI handles language. Here you can watch it work, on a real model, running entirely on your own machine.

Before you load it, the honest details

  • This downloads a real ML model (a sentence-embedding transformer) to your browser, roughly 25 MB the first time. After that it's cached, so it's instant on future visits.
  • It runs on your device, using your CPU/GPU. It does not touch this website's server, there is no embedding load on my end, and there's no per-use cost.
  • Nothing you type is sent anywhere. The text never leaves your browser.
  • It loads third-party code. The library (transformers.js) and the model weights come from public CDNs (jsDelivr and the Hugging Face CDN). So while no data goes out, your browser does fetch code and weights from those services.
  • It needs a modern browser and a reasonable connection for that first download.
What's really happening

The model reads each text and outputs a vector, a few hundred numbers. Texts with similar meaning produce vectors that point in similar directions, even when they share no words ("a cat sat on the mat" vs "the feline rested on the rug"). The similarity score is the cosine of the angle between two vectors: 1.0 means identical direction, 0 means unrelated. That single trick, meaning as geometry, is what powers semantic search, clustering, recommendation, and retrieval for large language models.