---
title: "What Is an Embedding?"
description: "An embedding turns text, code or images into a vector of numbers that captures meaning, so a machine can measure how similar two things are."
type: "glossary"
locale: "it"
term: "Embedding"
canonical: "https://agenticschool.dev/it/glossary/embedding"
dateModified: "2026-07-07"
---

# What Is an Embedding?

- Definition: Embedding
- Updated: 2026-07-07
- Keywords: embedding, what is an embedding, embeddings meaning, text embeddings, vector embedding
- Canonical URL: https://agenticschool.dev/it/glossary/embedding
- Locale: it

> An embedding turns text, code or images into a vector of numbers that captures meaning, so a machine can measure how similar two things are.

An embedding is a way of turning a piece of content - a word, a sentence, an image, a chunk of code - into a list of numbers (a vector) that captures its meaning, so a computer can compare meanings mathematically. Content that means similar things ends up with vectors that sit close together, and unrelated content ends up far apart. That is the whole trick: once meaning is a set of coordinates, "find the most relevant passage" becomes "find the nearest vectors", which a machine can do instantly across millions of items. Embeddings are the quiet engine behind semantic search, recommendations, clustering and, above all, retrieval-augmented generation (RAG).

## How an embedding captures meaning

An embedding model reads your input and outputs a fixed-length vector, often a few hundred to a few thousand numbers. It was trained so that inputs used in similar contexts get similar vectors, so "car" and "automobile" land near each other while "car" and "banana" do not. You never read the numbers yourself; you compare them.

- Input: any text, image or code snippet you want to make searchable by meaning.
- Output: a vector - a fixed-length list of numbers - that represents that meaning.
- Compare: closeness between two vectors (cosine similarity) tells you how related the inputs are.

## Embeddings and RAG

Embeddings are what make RAG possible. You embed each chunk of your documents once and store the vectors in a vector database. At query time you embed the user question with the same model, find the nearest chunk vectors, and hand those chunks to the language model as context. Because the match is by meaning and not exact keywords, a question phrased differently from the source text still retrieves the right passage.

## Where embeddings are used

Beyond RAG, embeddings power semantic search (results ranked by meaning, not keywords), recommendations ("more like this"), deduplication, clustering and classification. For builders the practical point is that a single embedding step converts messy human content into something you can search, group and reason over reliably, which is why almost every AI feature that touches your own data starts by embedding it.

## FAQ

### What is an embedding in simple terms?

An embedding is a list of numbers that represents the meaning of a piece of content. Similar meanings get similar numbers, so a computer can measure how related two texts, images or code snippets are just by comparing their vectors.

### What is the difference between an embedding and a vector?

A vector is just the list of numbers. An embedding is a vector produced by a model specifically to capture meaning, so that distance between vectors reflects semantic similarity. Every embedding is a vector, but not every vector is an embedding.

### How do embeddings relate to RAG?

RAG uses embeddings to find relevant context. Your documents are embedded and stored, the question is embedded at query time, and the closest chunks are retrieved and pasted into the prompt. Without embeddings, retrieval falls back to brittle keyword matching.

### Do embeddings need a vector database?

For a handful of items you can compare vectors in memory. Once you have thousands or millions, a vector database stores the embeddings and finds the nearest ones fast, which is why vector databases and embeddings almost always appear together in production.
