Introduction to Embeddings and Vector Stores
Choosing embedding models and dimensions, selecting and deploying vector stores on AWS, designing metadata for precise retrieval and scaling vector search.
- 4 lessons
- Module quiz
Retrieval Augmented Generation depends on finding the passages that are relevant to a question, even when they use different words from the question. Embeddings make this possible. An embedding model converts text, or images and other content, into a vector of numbers such that inputs with similar meaning produce nearby vectors, and semantic search finds the stored vectors closest to the query's vector.
Those vectors must be stored and searched efficiently at scale, which is the job of a vector store. AWS offers several: Amazon OpenSearch Service for high query rates and hybrid search, Amazon Aurora PostgreSQL with pgvector for vectors alongside relational data, Amazon S3 Vectors for very large collections at the lowest storage cost, and others. Metadata recorded with each vector allows retrieval to be filtered precisely, for example to current documents about one product.
What the exam expects
Questions test choosing an embedding model and dimension, such as Amazon Titan Text Embeddings V2, which accepts up to 8,192 tokens and produces 1,024, 512 or 256 dimensions; choosing a vector store from the workload's needs; and fixing retrieval problems with metadata filters. A rule that appears often is that documents and queries must use the same embedding model and dimensions.
How this module is organised
Choosing and Configuring Embedding Models explains how embeddings work and how to generate them at scale. Choosing a Vector Store on AWS compares the vector stores. Designing Metadata for Precise Retrieval explains how to design and capture metadata, and Scaling Vector Search Performance explains how to keep searches fast as collections grow.