# Embedding

> A list of numbers representing a piece of text, arranged so that texts about similar things end up close together.

Computers compare numbers, not meaning. An embedding model converts a sentence into a few hundred or a few thousand numbers, and it is trained so that the distance between two of those lists reflects how related the two sentences are. "How do I cancel my subscription" lands near "where is the unsubscribe button" even though they share almost no words.

This is what makes semantic search work, and it is the reason keyword search and embedding search fail in opposite ways. Keyword search misses a customer who used different words. Embedding search finds them, and occasionally returns something that is merely about the same topic rather than actually answering the question. Production systems usually run both and combine the results.

## Related terms

- https://dfieldsolutions.com/en/glossary/rag.md
- https://dfieldsolutions.com/en/glossary/vector-database.md
- https://dfieldsolutions.com/en/glossary/llm.md

---

Source: https://dfieldsolutions.com/en/glossary/embedding
DField Solutions — Dunakeszi, Hungary — dezso@dfieldsolutions.com
Booking: see https://dfieldsolutions.com/en/contact
