AI lab

Embedding space

Drop a query into a 2-D embedding space and rank its nearest neighbours by cosine similarity.

InteractiveCosine similarity in a toy 2-D space
Loading interactive…

Words with similar meaning point in similar directions, so the top-k by cosine usually come from the cluster the query points into.

Learn the concept

The lesson this lab comes from, with the explanation, a practice task and a quiz.

More labs

All labs