Bitpath

Lesson 1 · Unit 02

Embeddings and search

Text becomes a vector; search becomes geometry

13 exercisesabout 3 min

What you practise

  • Text to vector, cosine similarity computed by hand, top-k, why a vector index trades exactness for speed

Try a question from this lesson

Pick one

A user searches the help centre for "how do I get my money back". The right article, "Refund policy", never says "money back". Why does keyword search miss it?

The ideas

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

Text as a point in space

An embedding model turns a text into a list of numbers, a vector, usually hundreds or thousands of entries long. Texts with similar meaning get vectors that point in similar directions.

Search becomes geometry: embed the question, then find the stored vectors closest to it. Here are three texts in a toy space of two dimensions.

"refund policy"     -> [0.8, 0.6]
"get my money back" -> [0.7, 0.7]
"office hours"      -> [-0.6, 0.8]

Concept

Exact or fast

Exact search compares the question with every stored vector. That is fine for thousands of chunks and slow for hundreds of millions.

A vector index searches approximately: it looks only at a small, promising part of the collection. It is far faster, and now and then it misses a true nearest neighbour. Recall measures how often it finds them.

10 more exercises in the app

  • 3× type the answer
  • 4× multiple choice
  • 1× fill the blanks
  • 1× true or false
  • 1× match the pairs

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy