1.2.2. Embeddings and Semantic Representations
💡 First Principle: Embeddings compress semantic meaning into dense numerical vectors — the geometric distance between two vectors corresponds to semantic similarity. This is the mechanism that makes "search by meaning" possible, and it underpins every RAG architecture.
Concretely: when you embed the sentence "How do I reset my password?" and the sentence "Steps to change account credentials," the resulting vectors will be geometrically close even though they share no common words. This is the property that makes knowledge base retrieval work.
How embeddings flow through a RAG system:
Critical rule: The same embedding model must be used at index time (when documents are stored) and at query time (when user queries are embedded). If you change embedding models, you must re-embed your entire corpus — the vector spaces are incompatible.
Amazon Titan Embeddings on Bedrock:
amazon.titan-embed-text-v2— 1024 dimensions, general purposeamazon.titan-embed-image-v1— for multimodal embeddings (text + image)
⚠️ Exam Trap: Changing the embedding model after initial deployment requires re-indexing the entire vector store. This is not a zero-downtime operation without careful blue/green index management. Exam scenarios that ask about "upgrading the embedding model" are testing whether you understand this constraint.
Reflection Question: Your RAG system's retrieval quality suddenly degrades after a scheduled Bedrock service update. No code changed. What is the most likely cause, and what should you check first?