AIF-C01 practice question 9 of 25

A company is building a chatbot to improve user experience. The company is using a large language model (LLM) from Amazon Bedrock for intent detection. The company wants to use few-shot learning to improve intent detection accuracy. Which additional data does the company need to meet these requirements?

Full set: 397 questions

Domain Explain modeling in AI/ML

Answer options
A: Pairs of chatbot responses and correct user intents
B: Pairs of user messages and correct chatbot responses
C: Pairs of user messages and correct user intents Correct answer
D: Pairs of user intents and correct chatbot responses
Correct Answer:
C. Pairs of user messages and correct user intents
Explanation

Few-shot learning is a technique used to guide a Large Language Model (LLM) by providing a small number of examples (shots) within the prompt. For the task of intent detection, the goal is to correctly classify a user's intention based on their message. Therefore, the examples provided to the model must demonstrate this specific input-to-output mapping. The required data format is a set of pairs, where each pair consists of a sample user message (the input) and its corresponding correct user intent (the desired output). This allows the model to learn the pattern and accurately predict the intent for new, unseen user messages.

Why Incorrect

A. This data links the system's output to the user's goal, which is useful for evaluating response appropriateness but not for training the initial intent detection from the user's message.
B. This data is for training or evaluating a response generation model, which is a different task from intent detection. It maps what the user says to what the bot should say.
D. This data is used for the dialogue management or response generation phase, which occurs after an intent has already been successfully identified. It maps a known intent to a system action.

References

1. Amazon Web Services (AWS) Documentation

Amazon Bedrock User Guide. Under "Prompt engineering guidelines

" the guide explains few-shot prompting: "In few-shot prompting

you provide a few examples in the prompt to help the model understand the context... Few-shot prompting is useful for complex tasks..." For intent detection

these examples would consist of user utterances and their corresponding intents. (Reference: Amazon Bedrock User Guide

Section: "Prompt engineering

" Subsection: "Prompting techniques").

2. Stanford University

CS224N: NLP with Deep Learning | Winter 2023. Lecture notes on "Prompting and In-Context Learning" explain that for classification tasks (such as intent detection)

few-shot learning examples are provided as (input

output) pairs. In this context

the input is the user message

and the output is the intent class label. (Reference: Stanford CS224N Course Materials

Lecture on "Prompting

Instruction Finetuning").

3. Amazon Web Services (AWS) AI Blog. In the post "Build a powerful question-answering bot with Amazon Bedrock..."

the principles of prompt engineering are demonstrated. The prompt is structured with context and examples to guide the model's output. For intent detection

this structure would require providing example pairs of user messages and their intents to guide the classification. (Reference: AWS Machine Learning Blog

"Build a powerful question-answering bot with Amazon Bedrock

Amazon Kendra

and LangChain

" section on Prompt Engineering).

Scroll to Top