← Back to Dashboard
1. Embedding Fundamentals2. Hybrid Retrieval Strategies
Embedding Fundamentals
📚 Embeddings and Vector Search⏱ 9 min⭐ 75 XP
From Text to Vector Space
Embeddings map text into dense vectors where semantic similarity is measurable as geometric distance. "Reset my password" and "I can't log into my account" land close together in vector space despite sharing almost no words - that is the property every semantic retrieval system is built on.
How Similarity Is Measured
# Cosine similarity: 1.0 = identical direction, 0 = unrelated
similarity(v1, v2) = (v1 · v2) / (|v1| � - |v2|)
"reset my password" ↔ "can't log in" → 0.87 (same intent)
"reset my password" ↔ "quarterly revenue up" → 0.09 (unrelated)
Embedding Models on Bedrock
| Model family | Notable traits | Typical use |
|---|---|---|
| Amazon Titan Text Embeddings | Configurable dimensions, strong general English | Default choice for text RAG on Bedrock |
| Amazon Titan Multimodal | Text + image in one vector space | Product search, image-aware retrieval |
| Cohere Embed | Multilingual, int8/binary compression options | Global corpora, storage-sensitive indexes |
Engineering Realities
- Same intent, different wording should cluster closely - test this with your own domain phrases, not generic benchmarks.
- Domain vocabulary matters - internal product names and acronyms may embed poorly; consider glossary expansion at ingestion.
- Dimensions trade cost for fidelity - higher dimensions = better separation but larger indexes and slower search.
- You cannot mix embedding models - vectors from different models live in incompatible spaces. Re-embed the whole corpus when you switch, and version your index by embedding model.
- Index maintenance matters as much as model quality - deleted docs must leave the index, updated docs must be re-embedded.
Gotcha: changing your embedding model without re-indexing silently breaks retrieval - queries embed into one space while documents sit in another. Similarity scores collapse and nobody gets an error.
🧪 Knowledge Check
Press 1-4 to select1 of 2
What do embeddings enable in AI systems?
DNS routing
Semantic similarity search
IAM key rotation
Code compilation