The Improviser · Lesson 7 — By Meaning ← Course

By meaning — embeddings & semantic search.

How the search finds the right record even when not one word matches.

Page 1 promised the search finds records “by meaning”. Here is the trick. Every piece of text — each record's description, and your query alike — is turned into a position in a space of meaning. Related meanings sit close together; unrelated ones sit far apart. That position is called an embedding.

The position comes from meaning, not spelling. “Modal opener” and “dorian vamp” share no words, yet they land side by side, because they describe the same sound. “Blues shuffle” sits in another neighbourhood, and “studio chatter” further off still.

So searching turns into geometry. Drop your query into the same space and grab its nearest neighbours — the handful of closest points. No keyword matching, just whatever sits nearest in meaning.

The real space isn't two dimensions but hundreds or thousands — each embedding is a long list of numbers, produced by a dedicated embedding model. But the picture below holds exactly: near means similar, far means different.

Pick a query and watch it drop onto the meaning map. The nearest records light up — even the ones that share none of the same words — and you can hear how they sound.

Each dot is a take, placed by meaning. Pick a query and see which sit closest.
meaning map · near = similar

Turn text into a point, then find the nearest.

Embedding is done once and stored. At query time you embed the query and take its closest neighbours — that is the whole of “search by meaning”.


      

Near in meaning, not in words.

An embedding is a position that captures what text means, so similar ideas sit close together no matter what words they use. Search then becomes geometry: turn the query into a point and take its nearest neighbours.

This is why RAG can find the right record even when your query and the record share not a single word — it is matching meaning, not spelling.

Next: the same step →
Go deeper — what an embedding really is optional

It's a long list of numbers

The 2D map here is a flattened picture. A real embedding is a vector of hundreds or thousands of numbers — a position in a very high-dimensional space. Closeness is measured with a distance or, more often, the angle between the two vectors (cosine similarity — the maths, on the next page).

Where the positions come from

A separate embedding model, trained on huge amounts of text, learned to place text so that similar meanings land nearby. You run each document through it once, up front, and store the results — so the heavy lifting happens before any query is ever made.

Same space for both

The query and the documents have to be embedded by the same model, or their positions are not comparable — like plotting two maps on different scales and trying to measure the distance between them.

Why keyword search isn't enough

Plain keyword search misses synonyms and paraphrases — “montuno” never matches “vamp”. Semantic search catches them, because it works on meaning. Many real systems run both and blend the results, which is called hybrid search.