Databricks Certified Generative AI Engineer Associate — Question 52

A Generative AI Engineer is using an LLM to classify species of edible mushrooms based on text descriptions of certain features. The model is returning accurate responses in testing and the Generative AI Engineer is confident they have the correct list of possible labels, but the output frequently contains additional reasoning in the answer when the Generative AI Engineer only wants to return the label with no additional text.

Which action should they take to elicit the desired behavior from this LLM?

Answer options

Correct answer: A

Explanation

The correct choice is A, as few shot prompting allows the engineer to provide specific examples of the desired output format, thereby guiding the model effectively. Options B and C do not provide the additional context that few shot prompting offers, which is beneficial for this scenario. Option D, while potentially helpful, may not be as effective as few shot prompting in establishing clear expectations for the output format.