Embedding

What is Embedding?

An embedding is a list of numbers representing the meaning of a piece of text, positioned so that texts with similar meanings sit close together. Storing embeddings of a website's content allows a search for 'do you fix boilers' to retrieve a passage about heating repairs even with no shared words.

In more detail

An embedding model reads a passage and outputs a fixed-length list of numbers, often hundreds or thousands of them. Each list is a point in a space with that many dimensions, and the model is trained so that passages with related meanings land near each other, whatever words they use.

Embeddings are what make semantic search work. The question is embedded too, and the system looks for stored passages whose points are nearest to it. Closeness is usually measured with cosine similarity.

They capture meaning imperfectly. Very short texts, product codes and exact figures are handled less reliably than ordinary sentences, which is why some systems combine embeddings with keyword search.

Illustration for "Embedding"GLOSSARYEmbedding
Embedding, defined in plain English.
Embedding connected to customers and the tools that serve themEmbeddingVector searchRetrieval-augment…
Related terms in this glossary.

How SpideyChat handles it

SpideyChat stores an embedding of every passage of an assistant's content and of every FAQ answer the owner writes, and compares them with the visitor's question by cosine distance. It does not currently combine this with keyword search.

We make SpideyChat. The rest of this page describes the term in general, not our product.

Questions

Is creating embeddings the same as training a model?
No. Embedding your content indexes it for search; the language model itself is unchanged.
Do embeddings work across languages?
Many modern embedding models are multilingual, so a question in one language can match a passage in another, though usually less closely than text in the same language.

All glossary terms