Course menuAIF-C01

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

AIF-C01 practice question: RAG, knowledge bases and vector stores (2 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

An airline's customer assistant must answer questions about baggage and refund rules.

The rules change most weeks, answers must cite the current policy text, and the airline does not want to retrain a model each time a rule changes.

Which approach fits BEST?

Choose one answer.

  1. A. Pre-train a new foundation model on the policy documents every week
  2. B. Use RAG over the policy documents to retrieve current text
  3. C. Raise the temperature so the model explores more possible policy answers
  4. D. Fine-tune the model once on last year's policy documents
Show the answer and explanation

Answer: B

  • A. Wrong: Pre-training builds a model from large datasets at high cost, and repeating it every week is impractical. It also does not give answers that cite the current policy text.
  • B. Right: Correct. Retrieval Augmented Generation fetches the current policy passages at query time, adds them to the prompt and can cite the source. Updating the documents updates the answers without retraining the model. Learn more: Amazon Bedrock Knowledge Bases (opens in a new tab)
  • C. Wrong: Temperature changes how random the output is. It cannot give the model knowledge of policy text it has never seen.
  • D. Wrong: A one-off fine-tune fixes last year's rules into the model, so it goes out of date as policies change. It also cannot cite the current text.

Explanation

Retrieval Augmented Generation grounds a model's answer in documents retrieved at query time. Amazon Bedrock Knowledge Bases indexes the policy documents, adds retrieved passages to the prompt, and can include citations in the response. Fine-tuning and pre-training store knowledge in the model's weights, which goes stale.

Retrieval augmented generation with a knowledge base Sync: documents from S3 and other connectors are split into chunks, turned into embeddings, and stored in a vector store. Query: a user question retrieves the best matching chunks from the vector store, and the model writes an answer from them with citations. Sync Documents S3, connectors Chunk + embed embeddings Vector store managed or own Query User question from the app Retrieve best chunks Model answers with citations
RAG retrieves the current policy text at question time, so answers follow the rules without retraining the model.

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