Make the nearest neighbor visible.

Run a real, local vector retrieval experiment for search, observability, and security. Change the query direction, restrict the candidate set, and inspect the score that put each document in order.

Embedding field

all domains / k=3

1 / choose a query direction

2 / constrain the corpus

3 / keep how many neighbors

cosine(q,d) = dot(q,d) / (|q| x |d|)
awaiting run

Why this order

Set a direction, then run the retrieval. Cosine similarity compares direction after normalization, so a large coordinate alone does not guarantee a match.

Transfer task: set the observability filter and explain why an otherwise similar security record is excluded.

Ranked candidates

0 results

Keep the experiment, not a vague summary.

Direction and filtering in the saved retrieval lab

Read the explanation

The saved retrieval lab contains six hand-authored three-dimensional document vectors. The default query is point nine, point one, point two. Its security incident vector is point eight eight, point one four, point one eight. Cosine similarity divides their dot product by the product of their lengths. The resulting score is about point nine nine nine, so this document closely matches the query direction. These vectors are fixed examples, not embeddings fetched from a model or proof that a document is factually correct. Metadata filtering happens before scoring. Selecting observability removes the security and search records from the candidate set. Only the two observability records can be returned, even if the requested top count is three or four. The bars show six candidates for all domains versus two for observability. Filtering changes which records can compete; it does not change the surviving vectors into new evidence or make their cosine scores measures of truth. Click a document point and the source sets the query to that exact document vector. Its self cosine becomes one because the dot product equals squared length. Choosing top two returns only the two highest surviving scores; choosing top four can include more neighbors. The exported experiment preserves query, filter, top count, run counter and each returned score. A zero query has no direction and this source does not guard its cosine denominator, so the demonstration uses nonzero actual inputs.

Super generates helpful tools and automates fact-checking across the internet proactively. If you enjoyed this tool, build your own with Super and share it with a friend.