To validate automated sentiment labels on AI answers, have people label a sample of the same passages. Then compare the two sets of labels with a confusion matrix, per-class precision, recall and F1, and a chance-corrected agreement score such as Cohen's kappa. Do this before you put any sentiment trend in a report. A chart built on unvalidated labels shows how your classifier behaved, not how AI engines describe your brand.
What you are validating
The unit is a passage from an AI answer that refers to your brand, plus a label for how it refers to it. The automated labeler can be a rule set, a classifier or an LLM prompt. The check is the same for all three: do its labels match what a careful human reader would assign?
Entity-level labeling is harder than whole-text labeling. An answer can be neutral overall and negative about one brand in it. One ACL paper on entity-level sentiment annotation reports a Cohen's kappa of 0.425 between the best LLM-generated labels and curated gold labels, which the authors read as not high-quality agreement [8]. Treat that as a reason to test your own labeler, not as a verdict on any particular tool.
Step 1: Fix the label scheme and the unit
Write the scheme down before anyone labels anything. A workable minimum:
| Label | Definition | Example signal |
|---|---|---|
| Positive | The passage recommends or praises the brand | "a strong option for…" |
| Neutral | The passage states facts with no evaluation | "offers a free plan" |
| Negative | The passage criticizes, warns against or ranks the brand as a poor fit | "users report problems with…" |
| Mixed | Both praise and criticism of the brand in one passage | "powerful but expensive" |
| Not about the brand | The brand is named but is not the subject, or the match is a different entity | a same-name company |
Decide in advance:
- Unit of labeling. One passage per brand mention, not one label per whole answer.
- Target entity. Label sentiment toward your brand only, not toward the category or a competitor in the same sentence.
- Tie rules. What happens with hedged language, comparisons and sarcasm.
Every ambiguity you leave open becomes disagreement later.
Step 2: Draw a review sample you can defend
Pull passages from a fixed set of prompts so the sample is not shaped by whatever happened to be convenient. How to build an AI visibility prompt set covers choosing those prompts. For the validation sample specifically:
- Stratify by the automated label, not only by random draw. If negative labels are rare, a plain random sample may contain almost none, and you cannot measure what you cannot see.
- Include every engine and prompt group you plan to report on.
- Keep the raw passage text, the engine, the prompt, the date and the automated label together in one row.
- Hold the sample fixed. Do not relabel passages after seeing the automated output.
Also draw a smaller random slice of passages the automated system labeled neutral or "not about the brand". Missed negatives hide there.
Step 3: Label by hand, twice
Have two reviewers label the sample independently, without seeing the automated labels. Then measure how well the two humans agree before you measure the machine.
Cohen's kappa for two annotators is (p_o − p_e) / (1 − p_e), where p_o is observed agreement and p_e is the agreement expected by chance [6]. It corrects for the fact that some agreement happens by luck, which matters when one label dominates.
Human agreement on sentiment is often imperfect. An ACL sentiment annotation study reports a multi-rater kappa of 0.686, showing that even trained annotators reach only moderate agreement on sentiment [7]. That sets a practical ceiling: if two careful people disagree on a class, the automated labeler cannot be judged fairly against a single person's answer for that class.
Then:
- List the passages where the two reviewers disagree.
- Resolve each one by discussion or a third reviewer, and record the rule you used.
- Fold the rule back into the label scheme.
- Use the adjudicated label as the reference.
OpenAI's evaluation guidance says human judgment is the highest-quality evaluation method but is slow and expensive, and it suggests multiple rounds of detailed human review to refine the scorecard [4]. Expect to revise your scheme at least once.
Step 4: Compare automated labels with the reference
Build a confusion matrix first. Rows are the human reference, columns are the automated label. It shows which classes get confused, which a single summary number hides. A typical pattern is "mixed" collapsing into "positive". That pattern is invisible in an overall score, but it inflates positive sentiment in your report.
Then compute per-class metrics:
- Precision is TP/(TP+FP). Google recommends it when false positives are especially costly [1]. For you: of the passages labeled negative, how many really are?
- Recall is TP/(TP+FN). Google says it is more meaningful than accuracy when positives are rare and missing them is costly [1]. For you: of the truly negative passages, how many did the labeler find?
- F1 is the harmonic mean of precision and recall, and Google's glossary says it is preferable to accuracy for class-imbalanced datasets [2].
- Accuracy is (TP+TN)/(TP+TN+FP+FN). Google calls it a coarse measure that suits balanced datasets, and says imbalanced datasets need other metrics [1].
Brand sentiment in AI answers is usually imbalanced, with many neutral passages and few negative ones. A labeler that calls everything neutral can post a high accuracy and be useless. Look at per-class recall and F1.
scikit-learn's classification_report returns per-class precision, recall, F1 and support, plus macro, weighted and micro averages [3]. A minimal script:
from sklearn.metrics import (
classification_report,
confusion_matrix,
cohen_kappa_score,
)
labels = ["positive", "neutral", "negative", "mixed", "not_about_brand"]
# human: adjudicated reference labels; auto: automated labels, same row order
print(confusion_matrix(human, auto, labels=labels))
print(classification_report(human, auto, labels=labels, zero_division=0))
print("kappa:", cohen_kappa_score(human, auto, labels=labels))
Read the support column first. A per-class score based on a handful of passages is not stable, so do not lean on it. Either review more passages for that class or report it as unvalidated.
Step 5: Use kappa for the machine too
Per-class precision and recall tell you where errors fall. Kappa between the automated and reference labels tells you whether overall agreement is above chance. Report both. The same formula applies, with the automated labeler as the second annotator [6].
No source in this research gives a universal pass mark for sentiment labels, and the two studies above show real variation in what is achievable [7][8]. Set your own thresholds before you look at results, and write them down. Base them on what a wrong label costs you:
| If you report… | Watch most closely |
|---|---|
| "Share of negative mentions" | Precision and recall of the negative class |
| "Share of positive mentions" | Precision of positive, and the mixed-to-positive confusion |
| Net sentiment score | Per-class recall across all classes, plus kappa |
| Change over time | Whether the labeler or its prompt changed between periods |
Step 6: If an LLM does the labeling
An LLM labeler needs the same test. OpenAI's evaluation guidance recommends validating LLM-as-a-judge systems against human labels before optimizing for cost or latency [4]. OpenAI's eval documentation describes label_model graders that assign labels from a specified set and support structured outputs and reference text [5]. A closed label set and structured output make the confusion matrix straightforward, because every output maps to one of your labels.
Practical rules:
- Keep the label definitions in the prompt identical to the human scheme.
- Version the prompt and the model name with every labeled row.
- Re-run the validation sample whenever either changes.
- Do not mix labels from different versions in one trend line unless you have re-labeled the earlier period.
Step 7: Gate the report
Before a sentiment trend goes out, check:
- Two humans labeled the sample independently, and their kappa is recorded.
- Disagreements were adjudicated and the rules written down.
- The confusion matrix has been read, not only the summary scores.
- Per-class precision, recall and F1 for every class you report meet your pre-set thresholds, with enough support to trust them.
- The labeler version is the same across the periods being compared.
- Classes that failed the gate are reported as unvalidated or left out.
If the gate fails, the options are to fix the labeler, narrow the report to classes that passed, or fall back to human labeling for the failing class.
What this process does not settle
- It validates the labeler, not the engines. A well-validated label says an AI answer was negative toward your brand. It does not say why, or whether the claim is accurate.
- A human reference is itself imperfect. The agreement figures in the research show that [7][8]. Report your reviewer kappa next to the machine's scores.
- Samples age. AI answers change, and a sample from one period may not represent the next. Refresh part of it on a schedule and re-check.
What to do next
- Write the label scheme and tie rules on one page.
- Pull a stratified sample from your fixed prompt set, keeping text, engine, prompt, date and automated label together.
- Have two reviewers label it without seeing the automated labels, then adjudicate.
- Run the script above and read the confusion matrix before the summary numbers.
- Set thresholds, apply the report gate, and re-validate whenever the labeler changes.
More guides on measuring AI visibility are on the blog index.