Case Study

Designing a Consistent Polarity Classification Service Across BERT and Prompt-Completion Outputs

You are launching a company-wide “Voice of Customer” dashboard that must assign exactly one sentiment label (Positive, Negative, or Neutral) to each incoming customer comment within 200 ms. You have two models available behind a feature flag:

  • Model A: a fine-tuned BERT single-text classifier that outputs a probability distribution over {Positive, Negative, Neutral}.
  • Model B: a text-generation LLM used via prompt completion. The prompt ends with: “Sentiment (Positive/Negative/Neutral):” but the LLM sometimes returns variants like “mostly positive”, “not negative”, “mixed feelings”, or full sentences such as “Overall, the customer seems satisfied, but there’s a minor complaint.”

A recent incident report shows that when Model B is enabled, the dashboard’s weekly sentiment trend line becomes unstable because the same type of comment is sometimes mapped to different labels across runs, and some outputs fail parsing entirely. Example comment: “The update fixed my crash, but the new UI is confusing.” Example LLM outputs observed for that same comment: (1) “mixed feelings”, (2) “Overall positive with a caveat.”, (3) “Neutral.”

As the owner of the classification service, propose a concrete end-to-end decision policy that (a) uses prompt-completion classification with an explicit label-mapping step, (b) defines how to handle ambiguous or non-canonical generations so the service always returns exactly one of the three labels, and (c) explains when and how you would use Model A’s BERT probabilities as a fallback or tie-breaker to improve consistency without changing the label set. Your answer must specify the mapping rules/logic (not just “use heuristics”) and justify how the policy reduces instability while preserving the intent of polarity classification.

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