CSC-105

LibraryEmbedding Space Lab

Embedding Space Lab

The map is frozen. Your prompt chooses where you stand on it.

An AI model's weights do not change while you talk to it. What changes is where your words send it. This lab shows a real map of meaning from an embedding model, and lets you steer your own prompts across it. New here? Select Tour for a guided walkthrough.

How a model reads your prompt

  1. Tokens. Your prompt is split into tokens.
  2. Lookup. Each token gets a starting list of numbers from a fixed table. The same token gets the same numbers every time. This table is part of the frozen weights.
  3. Mixing. Dozens of layers let every token look at the others and adjust its numbers. Next to river, “bank” drifts toward water. Next to loan, it drifts toward money.
  4. Prediction. A chat model uses the final numbers to score every possible next token. Try the Token Prediction Lab to see that step.

This lab uses an embedding model, a close cousin of a chat model. It reads the same way, then outputs one list of 256 numbers for the whole text. That list is the orange point you steer.

Things to try

  • Embed bank, then river bank, then bank loan. Where does each one land?
  • Start with Tell me about the heart. Can you move it into Medicine, Bedtime stories, or Music in three edits or fewer? Which kind of edit moves it farthest: a role, specialized vocabulary, an audience, a format, or an example? The Moved number tells you.
  • Stuff a prompt with keywords from different regions, like heart law guitar recipe galaxy football. Where does it land compared with a clear, focused prompt?
  • Switch to Axes and watch your prompts slide between Kid ↔ Expert or Casual ↔ Formal. Build your own direction, like summer ↔ winter.
  • Click any point to see its nearest neighbors. Turn on All words and zoom in to read the whole map.

What this map gets wrong

  • Map squeezes 256 dimensions into 3, so distances on screen are approximate. The similarity scores use all 256. Axes positions are exact.
  • We chose and named the signposts. The model's space has no labels.
  • An embedding model is not the chat model you use. It is a close cousin that shows how text can become a position in a space of meaning.