# Embeddings (Vector Embeddings)

AI Glossary · Retrieval & RAG
Canonical URL: https://aisat.uk/glossary/embeddings
Author: Lucy Gilmore, Assistant General Counsel, Product, Privacy & AI at Sprinklr | Practical Privacy, Product & AI Governance & Defensible Risk Decisions (https://www.linkedin.com/in/lucy-gilmore/)
Breadcrumb: [Glossary](https://aisat.uk/glossary) > [Retrieval & RAG](https://aisat.uk/glossary?category=rag) > Embeddings (Vector Embeddings)

## TL;DR

> **Embeddings (Vector Embeddings)** are dense numerical representations of text, images, audio, or code as fixed-length arrays of floating-point numbers. Trained so that items with similar meanings sit close together in multi-dimensional vector space, embeddings let computers measure semantic similarity mathematically.

## How Embeddings (Vector Embeddings) works in practice

Computers cannot natively tell that 'solicitor', 'barrister', and 'legal counsel' share closely related meanings, because as ASCII strings they have almost no characters in common. An embedding model, typically an encoder-only transformer trained on contrastive pairs of related passages, maps each piece of text to a coordinate in a space of 384 to 3,072 dimensions.

During training, passages that answer the same question or appear in similar contexts are pulled closer together in that vector space, while unrelated passages are pushed apart. At runtime, measuring how related two texts are reduces to a fast geometric calculation, such as cosine similarity (the angle between two vectors) or inner product. Modern embedding models also support Matryoshka Representation Learning (MRL), which packs the most critical semantic signal into the first few hundred dimensions so engineers can truncate vectors (for example, from 1,536 down to 512 dimensions) to save RAM with minimal accuracy loss.

For instance, a Glasgow e-commerce retailer embeds both product catalogue descriptions and customer support tickets, enabling semantic product search, automatic duplicate-ticket clustering, and near-instant routing to specialist support queues.

## Why it matters and trade-offs

Embeddings are the foundational building block behind semantic search, RAG retrieval, clustering, anomaly detection, and recommendation engines. Choosing the right embedding model often moves RAG retrieval recall far more than swapping the downstream language model or vector database.

The operational catch is that embeddings are model-specific and opaque: vectors generated by OpenAI's `text-embedding-3-large` cannot be compared with vectors from Cohere `embed-v4` or an open-weight `BGE` model. Switching embedding models in production requires re-embedding and re-indexing your entire document corpus. Furthermore, dense embeddings compress an entire paragraph into a single vector, which frequently loses exact product SKUs, error codes, and legal clause numbers unless paired with lexical BM25 in a hybrid search setup.

## Related AI concepts

- [Vector Database](https://aisat.uk/glossary/vector-database): A Vector Database is a specialised storage engine, such as pgvector, Qdrant, Pinecone or Weaviate, built to index high-dimensional vector embeddings using approximate nearest-neighbour graphs and execute low-latency similarity queries alongside metadata filters.
- [Retrieval-Augmented Generation (RAG)](https://aisat.uk/glossary/retrieval-augmented-generation): Retrieval-Augmented Generation (RAG) is an AI architecture that retrieves relevant passages from external documents or databases at query time and injects them into a language model's context window to generate cited, grounded answers.
- [Hybrid Search](https://aisat.uk/glossary/hybrid-search): Hybrid Search is a retrieval pipeline that executes sparse lexical keyword search alongside dense semantic vector search and merges the candidate rankings using reciprocal rank fusion or a cross-encoder reranker.
- [Quantisation](https://aisat.uk/glossary/quantisation): Quantisation is a model compression technique that converts neural network weights and activations from high-precision 16-bit or 32-bit floating-point numbers into lower-bit representations such as INT8, FP8 or INT4, reducing VRAM footprint and accelerating inference.
