
Answer-first summary for fast verification
Answer: Create a chain which first uses an LLM to classify sentiment, then changes system prompt for the customer interaction LLM based upon the initial customer query sentiment.
Option D is the correct approach because it creates a chain where an LLM first classifies the sentiment of the customer's initial message, then dynamically adjusts the system prompt for the customer interaction LLM based on that sentiment. This follows best practices by using a specialized model for sentiment analysis (which LLMs excel at) and then tailoring the response strategy accordingly, ensuring appropriate de-escalation for negative sentiments. Option C is incorrect because linear regression is unsuitable for sentiment classification, as it's a regression model not designed for text classification tasks. Option A is suboptimal because encoder-only LLMs are not ideal for generative tasks like response generation. Option B (RAG) is not directly relevant to sentiment-based response adaptation, as RAG focuses on retrieving external knowledge rather than sentiment analysis.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A Generative AI Engineer is developing a customer support bot that must adapt its responses based on the sentiment of the end user's initial message. For instance, if the user's message is angry, the bot should attempt to de-escalate the negative sentiment while resolving the query. They aim to ensure this approach adheres to best practices.
Which method accomplishes this?
A
Use an encoder-only LLM model to both detect sentiment and generate replies based upon the detected sentiment.
B
Implement a RAG architecture for how to respond to users depending on detected sentiment.
C
Use linear regression model to classify sentiment and feed the result to a system prompt for the LLM to respond.
D
Create a chain which first uses an LLM to classify sentiment, then changes system prompt for the customer interaction LLM based upon the initial customer query sentiment.
No comments yet.