What does Embedding mean?
An embedding is the representation of a word, a sentence, an image, or an entire document as a fixed-length row of numbers. Content with a similar meaning receives a similar row of numbers, which makes it possible to calculate how close two pieces of content are to each other. Unlike a keyword index, an embedding compares meaning rather than spelling, which means it also finds results phrased differently.
An embedding is produced by a model trained specifically for the task, which turns a piece of text into a vector typically made up of 384 to 1,536 values. The similarity between two vectors is derived from the cosine of the angle between them. The vectors are stored in a vector database, which returns the closest entries for a given query. Because every model spans its own scale, vectors from different models cannot be compared with one another.
Embeddings pay off wherever people search in everyday language while the underlying content is written in technical language. Typical applications include searching contracts and regulations, matching incoming inquiries to the right answers, and finding similar cases in a case database. For exact matches such as reference numbers or article numbers, classic search remains the better tool.
The advantage over full-text search is that a query does not need to contain any word actually found in the document. New documents can be embedded individually without rebuilding the entire collection. Because similarity comes out as a number, a threshold can be set to filter out weak matches deliberately.
An embedding is not a form of encryption, because parts of the original text can be reconstructed from a vector. Vectors of personal documents therefore need the same protection and the same deletion periods as the documents themselves. Anyone deleting a collection must also clear the vector database.