Course menuMLA-C02

Exams / MLA-C02 / Vector databases for AI / Question 1

MLA-C02 practice question: Vector databases for AI

Data Preparation for ML and AI A free question from our original MLA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A public library system stores its catalog and branch records in an Amazon Aurora PostgreSQL cluster. The search team has computed embeddings for 12 million book descriptions and wants patrons to run semantic search.

Each query must return the nearest matches in under a second, and the results must be filtered by branch and then joined to catalog tables. The team wants to avoid operating a second database to keep in sync with the catalog.

Which solution meets these requirements?

Choose one answer.

  1. A. Store the embeddings in the existing Aurora PostgreSQL cluster with the pgvector extension, and run one SQL query that combines vector distance, branch filters and joins.
  2. B. Index the embeddings in an Amazon OpenSearch Service domain with the k-NN plugin, and copy the branch records into OpenSearch for filtering.
  3. C. Store the embeddings as Amazon S3 Vectors indexes and run a Lambda function that filters results by branch and joins them to the catalog in application code.
  4. D. Store each embedding as a list attribute in an Amazon DynamoDB table and compute cosine similarity in a Lambda function for every query.
Show the answer and explanation

Answer: A

Explanation

Aurora PostgreSQL with pgvector lets the team run vector search, branch filters and joins in one SQL query against the data it already has. OpenSearch and S3 Vectors are capable vector stores, but each adds a second system that must be kept in sync with the catalog. Scanning vectors in DynamoDB cannot meet the latency target at this scale.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Vector databases for AI? The 5 full-length practice sets have 9 more Vector databases for AI questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets