Course menuAIF-C01

Exams / AIF-C01 / RAG, knowledge bases and vector stores / Question 3

AIF-C01 practice question: RAG, knowledge bases and vector stores (3 of 4)

Applications of Foundation Models A free question from our original AIF-C01 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 software company already runs Amazon Aurora PostgreSQL-Compatible Edition for its product catalog, and its database team knows it well.

A new RAG application needs embeddings stored and searched by similarity, and the company wants to avoid adopting a new database service.

Which option BEST meets these needs?

Choose one answer.

  1. A. Aurora PostgreSQL-Compatible Edition with the pgvector extension to store embeddings
  2. B. Amazon DynamoDB, with each embedding stored as a number list and retrieved by its partition key
  3. C. Aurora MySQL-Compatible Edition, with a full-text index built over the embedding text column
  4. D. Amazon S3, with each embedding saved as a separate JSON object in a bucket with versioning on
Show the answer and explanation

Answer: A

  • A. Right: Correct. Aurora PostgreSQL supports the pgvector extension, which stores vector embeddings and runs similarity search in the database the team already operates. This meets both the search need and the no-new-service constraint. Learn more: Amazon Aurora PostgreSQL now supports pgvector (opens in a new tab)
  • B. Wrong: Queries by partition key return exact key matches, not the nearest vectors. Similarity search would need extra design, and DynamoDB would be a new service for the team to learn.
  • C. Wrong: A full-text index finds documents that contain the query's words, not ones with similar meaning. It is not a vector search, so it would miss documents that express the same idea in different words.
  • D. Wrong: S3 stores objects durably but cannot search them by vector similarity. The application would have to load and compare the files itself.

Explanation

A vector store holds embeddings and finds the nearest ones to a query vector. Aurora PostgreSQL-Compatible Edition can do this with pgvector, so the team can keep its existing database and skills. Options that only store data or match keywords do not perform similarity search.

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 RAG, knowledge bases and vector stores? The 5 full-length practice sets have 20 more RAG, knowledge bases and vector stores questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets