# Embedding

> An embedding is a fixed-length vector of numbers that represents a piece of text, or another input, so that inputs with similar meaning have vectors that are close together, typically measured by cosine similarity.

- Identifier: PTL-0123
- Category: Retrieval & Tool Use
- Canonical URL: https://protologue.com/t/embedding/
- Also known as: text embedding, vector embedding, embedding vector
- Introduced: 2019

## Description

Embeddings are produced by an embedding model, which is usually separate from the generating model. They underpin semantic search, dense retrieval for RAG, clustering, deduplication, and the selection of similar few-shot examples. Quality depends on the embedding model and on how text is chunked, and embeddings capture topical similarity better than exact facts such as numbers, names, or negation.

## Related terms

- [Dense Retrieval](https://protologue.com/t/dense-retrieval/)
- [Vector Database](https://protologue.com/t/vector-database/)
- [Chunking](https://protologue.com/t/chunking/)
- [Retrieval-Augmented Generation](https://protologue.com/t/retrieval-augmented-generation/)
- [Exemplar Selection](https://protologue.com/t/exemplar-selection/)

## Sources

- Reimers and Gurevych (2019). Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. https://arxiv.org/abs/1908.10084
- Karpukhin et al. (2020). Dense Passage Retrieval for Open-Domain Question Answering. https://arxiv.org/abs/2004.04906

## Cite this entry

Protologue. (2026). Embedding. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0, PTL-0123). https://protologue.com/t/embedding/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
