How we tested large language models for review moderation

Roman Milovanov12 Apr 2024

Problem

The Magnit app lets shoppers review products. A review is published only if it describes consumer properties of the product; complaints about price tags, store service or storage, and irrelevant texts are rejected. A set of dictionary robots, pattern rules and one ML model handles 67% of incoming texts, and people moderate the rest.

The team wanted an LLM to take over more of the manual work, which meant setting a target accuracy and choosing a model.

Example from the article: the review "the price on the receipt does not match the price on the store shelf" is rejected as a price complaint.

Solution in brief

Set the target at human level. Moderators agree on only 90% of reviews, so 90% accuracy against the reference set equals a staff employee. Then test several LLMs on the same labeled set with few-shot prompts. ChatGPT 3.5 Turbo reached about 80%, and 85% with several requests per review and a consensus rule. YandexGPT fine-tuned on 800 pairs reached 81%.

Questions this case answers
  • How to replace manual moderation of short noisy user texts with an LLM classifier when human moderators agree on only about 90% of the items
  • How to compare several hosted and open LLMs for a text-classification task before building anything, when access, output format and cost differ between them
  • How to automate moderation of customer product reviews with an LLM when rules and small ML models cover only two thirds of the texts?
  • How to set a target accuracy for an automatic moderator when human moderators disagree with each other?

Tools and methods

  • Few-shot prompting — a short plain-language instruction, ten random labeled examples, a required output format.
  • Consensus of several requests ("multi-agent") — the same review is sent several times; a decision is accepted only if the answers agree.
  • Fine-tuning YandexGPT — 800 prompt-answer pairs uploaded through Yandex DataSphere.
  • ChatGPT, YandexGPT, GigaChat, LLaMA — the models compared.
Continue reading — it's free

Google or a one-time email code. No password.