Essay

Debugging a Sentiment Pipeline: When Prompt-Completion and Label Mapping Disagree with a BERT Classifier

You are rolling out a polarity classification feature (labels: Positive, Negative, Neutral) for internal customer-feedback triage. To reduce risk, you run two models in parallel on the same incoming text: (1) a fine-tuned BERT single-text classifier that outputs a probability distribution over the three labels, and (2) an LLM prompt-completion approach where the prompt ends with a cue like "Overall sentiment:" and the model generates a short completion that your system maps to one of the three labels.

In a pilot, you observe a recurring failure mode: for many clearly negative comments (e.g., "The update broke my workflow and support hasn’t responded"), the LLM often completes with phrases like "not great" or "pretty disappointed" or even full sentences like "This sounds frustrating for the user," and your current label-mapping logic sometimes maps these to Neutral (because it only looks for exact label words). Meanwhile, BERT assigns high probability to Negative.

Write an essay that (a) diagnoses why this disagreement is happening in terms of how text classification differs between a BERT [CLS]-based classifier and classification via prompt completion, and (b) proposes a concrete, production-ready redesign of the prompt and the label-mapping contract that would reduce mis-mappings without sacrificing the ability to handle Neutral. Your answer must include: the exact revised prompt you would deploy, the mapping rules/algorithm you would implement (including how you handle outputs that do not contain any label word), and how you would use BERT’s probability output during rollout (e.g., gating, arbitration, or monitoring) to detect remaining mapping failures.

0

1

Updated 2026-02-06

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

Ch.2 Generative Models - Foundations of Large Language Models

Ch.1 Pre-training - Foundations of Large Language Models

Related