What is a text embedding?
A text embedding maps a piece of text to a vector such that paraphrases and related meanings sit near each other, regardless of exact wording. "A dog catching a frisbee" and "a puppy leaping for a disc" embed to neighboring points, which is what lets retrieval work on meaning rather than keywords.
For visual AI the interesting case is text embeddings that share a space with images, since that alignment is what turns language into a query interface for visual data.
Key takeaways
- Text embeddings encode meaning, so paraphrases land close together.
- They power semantic search over documents and metadata.
- Shared image-text spaces enable language queries over visual data.
How it works
A language encoder, typically a transformer, processes the text and pools its token representations into one vector. Sentence-level models are trained so semantic similarity maps to vector similarity, and vision-language models train text and image encoders jointly so both modalities share coordinates. Queries are embedded at search time and matched by cosine similarity.
Why it matters
Text embeddings make language the most convenient handle on any indexed content. In visual AI workflows they let anyone retrieve images, video moments, or sensor segments by describing them, which removes the need to build filters or know a dataset's schema before exploring it.
Frequently asked questions
How is a text embedding different from a token embedding?
Token embeddings represent individual pieces of text inside a model, while a text embedding summarizes an entire passage for comparison and retrieval.
Do text and image embeddings always share a space?
No, only when the model was trained multimodally. A text-only model's vectors cannot be compared with image embeddings.
Related terms
Go deeper