Multiple Choice

A developer is using a large language model to classify customer feedback into one of three categories: 'Positive', 'Negative', or 'Neutral'. The model correctly identifies the sentiment but often generates free-form text like 'The customer seems unhappy' instead of the specific label 'Negative'. This inconsistency is causing problems for a data analysis pipeline that expects one of the three exact labels. Which of the following approaches would be the most direct and reliable way to ensure the model always outputs one of the three predefined labels?

0

1

Updated 2025-10-01

Contributors are:

Who are from:

Tags

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Analysis in Bloom's Taxonomy

Cognitive Psychology

Psychology

Social Science

Empirical Science

Science