Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
Agent Builder
Module 3Full course9 min read

Embeddings and Semantic Search, Explained

What embeddings are, how semantic similarity works, and where vector search helps agents find the right information — explained without heavy math.

Search for "how do I get my money back" in a typical help center and you might get nothing, because the article you need is titled "Requesting a reimbursement." Keyword search matches words, and people rarely use the same words as the person who wrote the document. That gap is the reason most AI products that "search your documents" are built on embeddings.

Embeddings sound intimidating, full of talk about vectors and high-dimensional spaces. The idea underneath is simple, and you can understand it completely without any math beyond "closer means more similar." This lesson explains what an embedding is, how similarity search works, where it shines and where it quietly fails, and how agents use it. You'll also run a 25-line script that compares meanings on your own laptop, with no API key required.

What an embedding is

An embedding is a list of numbers that represents the meaning of a piece of text. An embedding model is a specialized AI model that reads text and produces that list. Feed it "Refunds are processed within 5 business days" and you get back something like this, only much longer:

[0.021, -0.113, 0.067, 0.004, -0.052, ... 379 more numbers]

No single number means anything on its own. What matters is that the model was trained so that texts with similar meanings get similar lists of numbers. "Refund," "reimbursement," and "get my money back" all land near each other, even though they share no words.

The easiest way to picture it is a map. Imagine every sentence placed as a point on a huge map, where the location is determined by meaning. Sentences about refunds cluster in one neighborhood, sentences about passwords in another, sentences about holiday opening hours somewhere else. A map has two coordinates; an embedding has hundreds or thousands (common sizes run from a few hundred to a few thousand). That's what "high-dimensional" means: a map with many more directions than north-south and east-west. You never need to visualize it. You only need to trust that nearby points mean similar things.

Embedding models are much smaller and cheaper to run than the chat models you talk to. They don't generate text; they only read it and output numbers. That makes it practical to embed millions of documents.