# Embeddings

Embeddings are learned numerical representations that encode characteristics of data as vectors so that meaningful relationships can be compared mathematically.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/embeddings

> An embedding model maps inputs such as text or images into a vector space where related inputs are intended to have similar representations. Embeddings support semantic search, recommendations, clustering, and retrieval-augmented generation by helping applications find relevant information beyond exact keyword matches.

Practice exams covering Embeddings: [AIB-C01 (beta) AWS Certified AI Business Strategist](https://blowstack.com/practice-exams/aws-certified-ai-business-strategist), [AIF-C01 AWS Certified AI Practitioner](https://blowstack.com/practice-exams/aws-certified-ai-practitioner), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [AIP-C01 AWS Certified Generative AI Developer - Professional](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional), [MLA-C02 (beta) AWS Certified Machine Learning Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate).

## 6 key aspects of Embeddings

Effective embedding systems combine suitable learned representations, compatible similarity search, careful input preparation, and explicit quality and security controls.

1. **Learned vector representations**: An embedding model converts supported inputs into numerical vectors that capture characteristics learned during training. The representation is useful for computation even though individual dimensions usually lack an obvious human interpretation.
2. **Similarity-based retrieval**: Applications compare embeddings to find related content without requiring identical wording. Select a similarity measure supported by the model and validate retrieval quality rather than treating a high score as proof of correctness.
3. **Compatible embedding spaces**: Queries and indexed content must use the same embedding space, typically through the same model or explicitly compatible encoders. Equal vector lengths do not make different models interchangeable.
4. **Chunking and input preparation**: Chunk boundaries, text cleanup, and model input limits influence which information an embedding captures. Test chunk size and overlap against realistic questions, especially when answers span multiple passages.
5. **Retrieval rather than generation**: Embeddings help locate information; they do not themselves produce a natural-language answer. In RAG, retrieved source passages become prompt context for a separate generative step.
6. **Operational and security trade-offs**: Vector dimensions, index design, and update frequency affect storage, latency, and cost. Treat embeddings as potentially sensitive derived data, preserve source permissions, and version the embedding pipeline.

## Cloud services for Embeddings

A cloud embedding pipeline separates model inference from vector storage and retrieval. Amazon Bedrock or Amazon SageMaker AI can generate embeddings, while Amazon OpenSearch Service or Amazon Aurora PostgreSQL-Compatible Edition can store and search them. The application retains source references and authorization metadata, embeds incoming queries with a compatible encoder, and retrieves relevant passages. For RAG, it supplies those passages to a generative model as prompt context. Knowledge Bases for Amazon Bedrock can manage supported parts of this workflow, but engineers still need to evaluate retrieval quality, permissions, update behavior, and cost.

- **[Amazon Bedrock](https://blowstack.com/tools/cloud-services-hub/amazon-bedrock)**: Amazon Bedrock provides access to embedding models that convert supported inputs into vectors. Knowledge Bases for Amazon Bedrock can orchestrate document ingestion, embedding generation, and retrieval using a supported vector store for RAG.
- **[Amazon OpenSearch Service](https://blowstack.com/tools/cloud-services-hub/amazon-opensearch-service)**: Amazon OpenSearch Service can index and search embedding vectors using vector search capabilities. Applications can combine vector similarity, keyword queries, and metadata filters to retrieve relevant content.
- **[Amazon Aurora](https://blowstack.com/tools/cloud-services-hub/amazon-aurora)**: Amazon Aurora PostgreSQL-Compatible Edition supports the pgvector extension for storing and searching vectors alongside relational data. Applications can associate externally generated embeddings with business records and apply SQL predicates and joins during retrieval.
- **[Amazon SageMaker](https://blowstack.com/tools/cloud-services-hub/amazon-sagemaker)**: Amazon SageMaker AI can host compatible embedding models on inference endpoints or run batch inference jobs. This supports custom model selection and deployment when a team needs control over model artifacts, inference configuration, or domain-specific training.

## Embeddings exam questions

Real practice exam questions on Embeddings, with the correct answer and its explanation.

### Question 1 (AIB-C01 (beta))

**Question:**

A furniture retailer is building an Amazon Bedrock assistant that accepts a customer's photograph of a chair, finds visually similar chairs in the retailer's approved catalog, and drafts a comparison using those products' specifications. Catalog photographs have automatically generated filenames and no descriptive captions. Many chairs share the same category but differ significantly in shape and style. The retailer must keep the response-generation model unchanged. Which approach BEST supports the required product retrieval?

**Correct answer:** Use an image-capable embedding model to represent both customer and catalog photographs in the same vector space, retrieve similar catalog images, and supply their product specifications to the response-generation model.

**Explanation:** Compatible image embeddings allow the application to compare learned visual characteristics and retrieve similar products. Supplying the associated specifications then grounds the generated comparison in approved catalog information without changing the generation model.

### Question 2 (MLA-C02 (beta))

**Question:**

A company is evaluating a compressed vector index for a semantic-search application on Amazon OpenSearch Service. The existing index contains 20 million embeddings, each with 1,024 float32 coordinates. A pilot replaces each embedding's full-precision in-memory search representation with a 128-byte code. The new index persists all these codes on disk and also retains every original float32 embedding on disk for full-precision rescoring.

Document metadata and all other index structures require a combined 16 GB of disk storage in either configuration. Codebook storage is negligible for this estimate. Use decimal GB, exclude replicas, and assume no other storage compression. The pilot meets the retrieval-quality target, but production-scale latency testing is not complete.

Which conclusion should an ML engineer use when forecasting infrastructure costs?

**Correct answer:** Forecast approximately 100.48 GB of disk storage. Evaluate lower-memory node configurations, but benchmark rescoring I/O and end-to-end latency before projecting node-cost savings.

**Explanation:** The original embeddings occupy 20 million × 1,024 × 4 bytes = 81.92 GB. The persisted codes add 20 million × 128 bytes = 2.56 GB. Adding 16 GB of other index data gives 100.48 GB. Quantization can reduce the in-memory search footprint even though total disk storage increases. Rescoring adds I/O and computation that must be tested before downsizing.

### Question 3 (AIP-C01)

**Question:**

A manufacturer uses Amazon OpenSearch Service to retrieve evidence for a generative AI maintenance assistant. Each equipment manual contains hundreds of passages. With one OpenSearch document per passage, the 10 nearest-neighbor hits frequently come from a single manual, excluding other useful manuals.

The retrieval contract must return up to 10 distinct manuals, ranked by the similarity of each manual's best-matching passage, and include that passage's text and source reference. Passage embeddings must remain individually searchable because averaging them loses narrowly focused procedures. The application cannot retrieve an oversized flat passage result set and group it afterward. Approximate nearest-neighbor retrieval is acceptable.

The company can rebuild the index. Its OpenSearch version supports nested k-NN search with Lucene HNSW and inner hits.

Which design BEST meets these requirements?

**Correct answer:** Create one parent document per manual with passages represented as nested objects containing text, source references, and knn_vector fields. Use a nested k-NN query with maximum-score aggregation to retrieve 10 parent manuals, and request the highest-scoring matching passage through inner_hits.

**Explanation:** Nested k-NN search can search individual passage vectors while diversifying results at the parent-document level. Maximum-score aggregation ranks each manual using its best-matching passage, and inner_hits returns the matching nested passage with its text and source reference. This avoids a flat candidate list being consumed by passages from one manual.

### Question 4 (AIF-C01)

**Question:**

A global company is building a support portal with Amazon Bedrock. Its approved help articles are written in English, but employees submit questions in several languages. The portal must find articles with meanings relevant to each question, even when the question and article use different languages. The company does not want to translate questions or articles into a common language. Which approach best meets these requirements?

**Correct answer:** Use a multilingual text embedding model that supports the required languages to represent both questions and articles, and retrieve articles by vector similarity.

**Explanation:** A suitable multilingual embedding model places semantically related text from supported languages into a shared vector space. Comparing question and article embeddings can therefore identify relevant English articles without translating the source text.

### Question 5 (DEA-C01)

**Question:**

A software company is building semantic search for support articles from multiple customer organizations. Articles are divided into chunks and stored in a shared Amazon OpenSearch Service index. Users must be able to find relevant chunks even when their questions use different words than the articles. Each search must return the 10 nearest chunks belonging to the user's organization, provided that organization has at least 10 chunks. Chunks from other organizations must not affect which eligible chunks are selected. The application obtains a trusted organization ID from the user's authenticated session. Which index design and retrieval approach best meet these requirements?

**Correct answer:** Store chunk embeddings in a knn_vector field and organization IDs in a keyword field. Use a supported Lucene-based vector index and include an exact organization-ID filter inside the k-NN query, with k set to 10.

**Explanation:** Embeddings support retrieval based on meaning rather than shared words. A keyword field supports exact organization matching. OpenSearch supports efficient filtering within a Lucene k-NN query, so nearest-neighbor selection is constrained to the authenticated user's organization rather than selecting global neighbors and discarding them afterward.

## Practice Embeddings in a full exam

Questions on Embeddings in each practice exam, with every answer option and an explanation for each:

- [MLA-C02 (beta)](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate): 17 questions
- [AIP-C01](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional): 13 questions
- [AIF-C01](https://blowstack.com/practice-exams/aws-certified-ai-practitioner): 9 questions
- [AIB-C01 (beta)](https://blowstack.com/practice-exams/aws-certified-ai-business-strategist): 4 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 4 questions

## What is Embeddings

An embedding is a numerical representation produced by a machine learning model. It commonly takes the form of a fixed-length vector: an ordered sequence of numbers that represents learned characteristics of an input. Depending on the model, that input might be a token, a passage of text, an image, or another supported data type. The individual numbers usually do not have simple, human-readable meanings; useful information is encoded across the representation.

For a semantic text embedding model, passages with similar meanings should have similar vectors. For example, a search for “recover access to my account” can retrieve a document titled “Resetting a forgotten password” even when the wording differs. Applications compare vectors using measures such as cosine similarity, dot product, or Euclidean distance. The appropriate measure depends on the model and index configuration. A similarity score indicates a mathematical relationship, not a probability that a document is correct or relevant.

Tokens, chunks, vectors, and embeddings are related but distinct concepts. Tokens are units used by a model to process text. Chunking divides a larger document into smaller passages. An embedding model can convert each passage into a vector. A vector is the mathematical structure that holds the numbers; an embedding is a learned representation expressed using that structure. Token embeddings used inside a transformer are also distinct from passage embeddings designed for document retrieval.

In a typical cloud retrieval workflow, an application extracts text from source documents, divides it into chunks, and submits those chunks to an embedding model. It stores the resulting vectors with document identifiers, source text or references, and metadata in a searchable index. When a user asks a question, the application embeds the query using the same model or a compatible query encoder and retrieves nearby document vectors. Matching vector dimensions alone does not make outputs from unrelated models compatible.

Retrieval-augmented generation, or RAG, adds the retrieved passages to a generative model's prompt. For example, a support assistant might retrieve relevant troubleshooting instructions before generating an answer. The embedding model supports retrieval; the generative model writes the response. Indexing documents this way does not retrain the generative model or update its weights. Retrieval can improve grounding, but it does not guarantee factual answers or eliminate hallucinations.

Engineering choices affect both quality and cost. Small chunks can improve precision but lose surrounding context, while large chunks can mix unrelated topics. Overlap can preserve context while increasing processing and storage. Higher-dimensional vectors require more storage and computation and do not automatically provide better results. Approximate nearest-neighbor indexes improve search speed at scale but may miss some relevant matches. Hybrid retrieval combines vector search with keyword search to handle both meaning-based queries and exact identifiers.

Evaluate embedding models against representative queries, including domain terminology and supported languages. Track the model version and preprocessing configuration, and plan to regenerate stored embeddings when changing to an incompatible model. Multimodal models can place supported input types into a shared space, but unrelated text and image models cannot automatically be compared. Finally, embeddings are not encryption or anonymization: protect them and their source content with access controls, and enforce document authorization during retrieval rather than relying on the generative model to hide restricted information.

## Learn Embeddings in lessons

12 short lessons on Embeddings in 5 certification courses.

- AIB-C01 (beta): Embeddings: semantic retrieval (Premium), https://app.blowstack.com/lessons/embeddings-semantic-retrieval-aib-c01
- MLA-C02 (beta): Tokenization versus embeddings (Premium), https://app.blowstack.com/lessons/tokenization-versus-embeddings-mla-c02
- AIP-C01: Embeddings: model selection tradeoffs (Premium), https://app.blowstack.com/lessons/embeddings-model-selection-tradeoffs-aip-c01
- AIF-C01: Embeddings: meaning in vector space (Premium), https://app.blowstack.com/lessons/embeddings-meaning-in-vector-space-aif-c01
- DEA-C01: Embeddings: representing meaning as vectors (Premium), https://app.blowstack.com/lessons/embeddings-representing-meaning-as-vectors-dea-c01
- MLA-C02 (beta): Embeddings: generating compatible representations (Premium), https://app.blowstack.com/lessons/embeddings-generating-compatible-representations-mla-c02
