AIF-C01 exam dumps

AIF-C01 practice question 127 of 231

AWS Certified AI Practitioner. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

AIF-C01 Question 127

Single answer

A data scientist is building a chatbot using a Large Language Model (LLM) deployed on Amazon SageMaker. The chatbot needs to handle customer queries effectively, even when it has not seen similar examples during training. Which prompt engineering technique should the data scientist use to guide the model in generating accurate responses by providing multiple examples within the prompt?

  1. A

    Zero-shot prompting

  2. B

    Few-shot prompting

  3. C

    Single-shot prompting

  4. D

    Chain-of-thought prompting

Show answer and explanation

Correct answer: B

Explanation

Few-shot prompting is the most appropriate technique in this scenario as it includes a small number of examples within the prompt, helping the LLM understand the context for generating accurate and relevant responses. This is particularly effective when handling queries that the model may not have explicitly seen during training.

  • A. Incorrect.

    Zero-shot prompting does not provide any examples in the prompt and relies on the model to infer the task directly from the instructions. This is not the best approach for guiding the model with examples.

  • B. Correct.

    Few-shot prompting involves including a few examples of the task within the prompt to help the model understand the context and generate better responses. This technique is suitable for guiding the model effectively when handling customer queries.

  • C. Incorrect.

    Single-shot prompting provides only one example within the prompt. While it can help the model, it is less effective compared to providing multiple examples as in few-shot prompting.

  • D. Incorrect.

    Chain-of-thought prompting is used to encourage the model to reason through problems step by step. It is not primarily focused on providing examples to guide the model, making it less suitable in this scenario.

Timed practice exam

Take a AIF-C01 practice test under exam conditions

65 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam