Back to Home
Embeddings & Search
Top-K Search
Top-K means returning only the best K results instead of showing everything, we filter to what matters most.
Known words use preset semantic positions. Unknown words get a character-based estimate.
Interactive Playground
3
Statistics
10
Total Items
3
Top K Value
7
Hidden Results
Best Match
How It Works
🔍
Search Query
→
📐
Score All
→
📊
Sort Results
→
🏆
Show Top K
Live Visualization
✅ Returned Results
Top 3
Full Ranking
All Items Sorted by Similarity
🎓
Tips
2 tips
K=1 means "give me the single best match", useful when you want exactly one, highly relevant result.
Top-K is used in two different places: in vector search to limit results, and in LLM generation to limit which words can be chosen next.
💡
Key Takeaway
Top-K keeps the best few results instead of returning everything this is how search engines and AI assistants stay fast and relevant.