Technology & AI
What is Embedding (Semantic Vector)?
An embedding is the numeric representation (vector of 768-3072 dimensions) capturing the meaning of a text chunk — the base of semantic search and RAG.
Models like text-embedding-3 (OpenAI), text-embedding-004 (Google) and Cohere transform sentences into vectors. Texts with similar meaning sit close in vector space — cosine similarity measures distance.
Cost is extremely low (cents per million tokens) and the base is static (generate once, store in vector DB). It's what enables "meaning search" instead of exact word match.
Frequently asked questions
Are embedding and LLM the same model?
No. Embedding model turns text into vector; LLM generates text. RAG pipelines use both together.
How to know if 2 texts are "semantically similar"?
Compute cosine similarity between vectors. > 0.8 = very similar; 0.5-0.8 = related; < 0.3 = different.