Skip to content
AI for Beginners

Embedding

A way of turning words or sentences into a set of numbers, a bit like coordinates, so a computer can measure how similar their meanings are. Things that mean much the same end up close together, like books on the same shelf in a library. These numeric coordinates for meaning are called embeddings.

Computers do not understand words the way we do. To work with meaning, they need to turn language into numbers. An embedding does exactly that: it converts a word, sentence, or document into a list of numbers that captures its meaning. Once text is expressed as numbers, a computer can compare pieces of text and see how alike they are.

The library analogy is a good one. Imagine every idea placed somewhere on a vast set of shelves, positioned so that similar ideas sit near one another. “Dog” and “puppy” would be close neighbours, while “dog” and “spreadsheet” would be far apart. An embedding is like the shelf position for a piece of text, expressed as coordinates. Nearness means similar meaning.

This quietly powers features you may already rely on. When a search understands that you meant “car” even though the page said “automobile”, embeddings are often why. They let software match on meaning rather than exact words, which feels much more natural to use.

Embeddings are usually stored in a special kind of store built for the job, a vector database, and they are a key ingredient in retrieval-augmented generation, where an AI finds relevant documents before answering. This is an intermediate idea, so if it takes a moment to settle, that is perfectly normal.

Related terms

Used in