Index Ai Academy
Glossary · Phase 1 · Building with LLMs

Top-k search

Also written: top k

Returning the k results that score highest, such as the 3 most similar documents to a question.

Try it now

Five small steps, and this is the search behind most AI assistants.

Learn it properly

Similarity search · Find the most relevant text by comparing embeddings. About 25 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write