Back to Home
Embeddings & Search

KNN Search

KNN means K Nearest Neighbors, where K is just a number you choose (like 3 or 10). It finds the K most similar items to your query, the same way you might ask "who are the 5 people most like me?"

Known words use preset semantic positions. Unknown words get a character-based estimate.

Interactive Playground
3
1 5
Statistics
8
Dataset Size
3
K Value
8
Comparisons
Top Neighbor
How It Works
🔍 Query
📐 Compare All
📊 Sort
🏆 Return K
Live Visualization
2D Map  (D1 = X · D2 = Y)
Ranking
K is your choice. K=1 returns only the single closest item. K=5 returns the 5 closest. Larger K = more results but potentially more noise.
Brute-force KNN checks every item, it's exact but slow at scale. Real systems use Approximate Nearest Neighbour (ANN) for millions of vectors.
💡
Key Takeaway

KNN compares the query with every item and returns the nearest ones no training needed.