Meaning has
coordinates.
How a question finds its way through thousands of dimensions—and comes back with the right context.
A question enters.
Context comes back.
Explore a fictional polar station’s library. Choose a question, inspect its neighbours, then see exactly which passages reach the answer.
12D → 3D
Drag to rotate · Select a point to read it
◆ Query ○ Passage Lines connect retrieved results
Simulation: 24 fictional passages, handcrafted 12D vectors, exact cosine search. Preset questions use a simulated encoder. No model or API is called. Read the method ↗
Two points can
share a shadow.
And differ.
Imagine two objects above the same spot on a floor. Their shadows coincide, even though one object sits much higher. A flat map has discarded height.
The same happens when a 12-dimensional vector is squeezed into two dimensions. Differences in the other ten coordinates disappear from the picture. They remain in the calculation.
Here, A and B have the same first two coordinates as Q. Move B along a hidden third coordinate. Its 2D similarity stays perfect while its full-vector similarity falls.
You do not have to imagine twelve directions at once. Think of twelve simultaneous measurements. A vector is one row of twelve numbers.
The hidden-coordinate experiment
2D shadow / 3D revealCompare direction.
In every dimension.
Cosine similarity measures the angle between two vectors. Pointing the same way gives 1; perpendicular gives 0; opposite gives −1. It ignores length.
The dot product is simply q₁d₁ + q₂d₂ + … + qₙdₙ. A machine multiplies matching coordinates and adds them. Twelve dimensions or a thousand: the rule stays the same.
Try doubling the document’s length. Its dot product and Euclidean distance change; cosine stays fixed. Metric reference ↗
For unit-normalized vectors, dot product = cosine and distance² = 2 − 2cos θ. All three then produce the same nearest-neighbour ranking. ↑ Higher is closer. ↓ Lower is closer.
You need a route.
Not a world tour.
Our retrieval lab checks every eligible vector. Large collections often use approximate indexes to inspect a promising fraction instead.
A navigable graph
Follow useful connections.
In this sandbox, search starts at one point, scores its neighbours, and expands the closest discovered candidate next. Increasing the budget lets it look further. Blue points have been scored; outlined points are the true nearest three.
This is a single-layer teaching graph in 2D using Euclidean distance. It illustrates approximate search, but it is not a full HNSW implementation or a performance benchmark.
HNSW adds a hierarchy: sparse upper layers help locate a promising region; lower layers refine the search. Edges represent neighbourhood relationships in the original vector space. Original paper ↗
More search effort usually improves recall at a cost in work. In real HNSW, ef_search controls a candidate-list size, not a strict number of distance calculations. Implementation notes ↗
An index speeds up finding neighbours. It does not make a weak embedding model understand a question better.
What this picture
leaves out.
The simplifications are useful—provided you know where they stop.
Does each coordinate mean something like “cold”?
We assigned simple factors to construct the teaching vectors, then mixed them across 12 axes. A real embedding model learns distributed representations: useful information usually spans many coordinates. Individual axes need not have tidy human labels. Rotate every vector with the same orthogonal transformation and all cosine scores stay unchanged. Try “Rotate the basis” in the Embed stage.
Who puts meaning into the numbers?
The embedding model does. Training adjusts its parameters so useful pairs receive compatible representations according to a training objective. A retrieval-trained model can learn to place a question near a passage that answers it, even when they are not paraphrases. The database stores and searches these representations. Query and document encoders must produce compatible spaces; model-specific query/document prompts may differ. Training reference ↗
Is a similarity of 0.9 a 90% chance of being right?
No. A cosine score measures alignment, not truth, confidence, or answerability. Its useful range depends on the model and task. The top result still exists when nothing answers the question. Choose “An unanswerable question” in the retrieval lab: a relevant clothing passage does not tell you the author’s name. Thresholds need evaluation on representative queries.
Does a vector database contain the original text?
A record typically has an ID, a vector, and metadata such as source or access labels. Text may live in that payload or in a separate store addressed by ID. The embedding is a lossy representation, not a reversible compressed document. After search, the system resolves IDs back to passages. Record structure ↗
Why not just add more dimensions or retrieve more chunks?
More coordinates can represent more distinctions, but adding dimensions alone does not create better semantics. Model training, data, and task fit matter. Bigger vectors also cost storage and computation. Likewise, a larger top-k may bring useful evidence or irrelevant and repeated passages into a limited context window. Test retrieval quality and answer quality separately.
What does a production RAG system add?
Common additions include lexical search for exact terms, metadata and permission filters, a reranker that examines query–passage pairs, deduplication, and context selection. Generation must still handle missing or conflicting evidence. RAG supplies external context; it does not automatically retrain the language model or guarantee grounded answers. An agent can repeat the retrieval loop with a revised question. RAG paper ↗
Keep the pattern.
Use the map as a metaphor.
An embedding model turns text into a comparable pattern. A vector database finds neighbouring patterns and returns their source passages. A language model uses those passages to compose an answer.
Method & reading
The Northstar library and its policies are invented. The lab uses 24 manually specified 12-component vectors, normalized and mixed with an orthogonal cosine-transform basis. Preset queries are manually specified in the same space. Scores are computed in your browser from all 12 coordinates; the map is a linear projection of those vectors followed by a camera rotation.
The chunking panel is a separate boundary experiment on one sample paragraph; its word windows do not rebuild the fixed retrieval corpus. Real chunk limits are often measured in tokens and may respect document structure. The Augment stage uses explicit local answer rules, not an LLM. The other experiments compute their displayed geometry and scores directly.
No external fonts, libraries, models, analytics, or network calls are required. Sources open only when you follow a link. Research checked 5 September 2026.