Vector embedding (vector embeddings). What it means.

A vector embedding is a list of numbers that represents the meaning of a piece of content, such as a sentence or an image, so that software can measure how similar two pieces of content are.

By Brady Heinrich · Updated

Definition

A vector embedding is a list of numbers that represents the meaning of a piece of content, such as a sentence or an image, so that software can measure how similar two pieces of content are.

What is an embedding?

An embedding is a way of turning content into numbers that capture what it means. A sentence, a product description, an image or a whole document is converted into a vector: a list of hundreds or thousands of numbers. Content with similar meaning ends up with similar numbers.

That gives software something it otherwise lacks, a sense of closeness in meaning. "How do I cancel my plan?" and "steps to end a subscription" share almost no words, but their embeddings sit close together.

How do embeddings work?

  1. An embedding model reads the content. This is a neural network trained so that related content produces nearby vectors.
  2. It outputs a vector. Every input gets a list of the same length.
  3. Vectors are compared. A similarity measure, commonly cosine similarity, scores how close two vectors are.
  4. The closest matches are returned.

Think of it as placing every piece of content on a map with a very large number of dimensions. Things about the same topic cluster together, and distance on the map stands in for difference in meaning.

What are embeddings used for?

UseHow embeddings help
Semantic searchFinds results by meaning, not exact keywords
Retrieval-augmented generationFinds the passages to hand to a language model before it answers
RecommendationsSuggests items similar to those a person liked
ClusteringGroups similar tickets, reviews or keywords
DeduplicationSpots near-identical records worded differently
ClassificationAssigns a label by closeness to known examples

Embeddings vs tokens

Tokens are the pieces a model splits text into. Embeddings are the numeric meaning assigned to text. A language model uses both: it breaks text into tokens, then works with embeddings of them internally. The embeddings used for search are usually one vector for a whole passage.

What should you know before using them?

  • Vectors from different embedding models cannot be compared. Change the model and everything must be embedded again.
  • Quality depends on how documents are split. A passage that is too long blurs several topics into one vector.
  • Similar does not mean correct. The nearest passage can be on the right topic and still not answer the question.

An example

An SEO team has 6,000 keywords to organise. It creates an embedding for each one and groups those whose vectors sit close together. "Invoice template", "free invoice format" and "sample invoice for freelancers" land in one cluster, although they share few words. The 6,000 keywords become 480 topics, each mapped to one page, in an afternoon instead of a week of manual sorting.

The common mistake

Assuming the top match is the right answer. Embedding search returns what is closest in meaning, which may be outdated, off by a detail or simply the least bad option. Set a minimum similarity score and let the system say it found nothing.

How people search for vector embedding

  • embedding22,200 a month
  • what is an embedding4,400 a month
  • embeddings1,900 a month
  • vector embeddings1,600 a month
  • embedding model880 a month
  • what are embeddings480 a month

US monthly searches, Google Ads keyword data.

Related terms

Go deeper

Building something ambitious? Let's talk.

We reply within one business day.