Bitzu

AIF-C01 ยท Designing foundation model applications

Where can you store and search embeddings on AWS?

Amazon OpenSearch Service, Aurora, Neptune and RDS for PostgreSQL as places to store and search embeddings.

Key points

  • A vector store holds embeddings and finds the nearest ones to a query vector.
  • On AWS that can be Amazon OpenSearch Service (k-NN search, also full-text), Amazon Aurora PostgreSQL and RDS for PostgreSQL (the pgvector extension, embeddings next to relational data), and Amazon Neptune Analytics (graph plus vector index, used for GraphRAG).
  • Amazon Bedrock Knowledge Bases can use several of these as its vector store.

Source: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup.html

Practice questions

Single choice

What does a vector store do in a RAG application?

  1. It generates the final natural-language answer
  2. It trains the embedding model on user questions
  3. It finds stored chunks whose embeddings are most similar to the query
  4. It encrypts prompts before they reach the model
Show answer

Answer: C. It finds stored chunks whose embeddings are most similar to the query

It stores embeddings and returns the chunks whose vectors are closest to the query vector. It does not generate text, and it is not a training service.

Select all that apply

Which AWS services can store embeddings for vector search?

  1. Amazon Polly
  2. Amazon OpenSearch Service
  3. Amazon CloudFront
  4. Amazon Aurora PostgreSQL
  5. AWS Budgets
Show answer

Answer: B. Amazon OpenSearch Service, D. Amazon Aurora PostgreSQL

Amazon OpenSearch Service supports k-NN vector fields, and Amazon Aurora PostgreSQL can hold vectors through pgvector. Amazon Polly (speech synthesis), Amazon CloudFront (CDN) and AWS Budgets (cost alerts) are not vector stores.

True or false

A relational database such as Aurora PostgreSQL cannot store embeddings, so a dedicated vector database is always required for RAG.

Show answer

Answer: False

False. With the pgvector extension, Aurora PostgreSQL and RDS for PostgreSQL store embeddings and run similarity search. A dedicated store is a choice, not a requirement.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AIF-C01 topics in this module