---
id: "lib-2026-11-21-from-tf-idf-to-llm-comparing-models-on-480-real"
type: "library"
title: "From TF-IDF to LLM: comparing models on 480 real reviews (От TF-IDF до LLM: сравниваю модели на 480 реальных отзывах)"
lang: "RU"
org: "Habr author (TanuaVers)"
source_type: "Practitioner post"
date: "2026-11-21"
week: "2026-W47"
url: "https://nosov.ai/library/lib-2026-11-21-from-tf-idf-to-llm-comparing-models-on-480-real/"
original_url: "https://habr.com/ru/articles/1110590/"
tier: "B"
tier_name: "Useful, limited"
tier_reason: "Carefully documented solo pilot with fixed splits, constant-answer baselines, bootstrap intervals and published code and data; it measures agreement with a 0.6B model's pseudo-labels on 65 test texts, so it says little about true emotion detection."
summary_basis: "full-text"
original_minutes: "10"
tags: ["ai technology", "evals"]
frames: ["verification-capacity"]
---

# From TF-IDF to LLM: comparing models on 480 real reviews (От TF-IDF до LLM: сравниваю модели на 480 реальных отзывах)

Tier B (Useful, limited): Carefully documented solo pilot with fixed splits, constant-answer baselines, bootstrap intervals and published code and data; it measures agreement with a 0.6B model's pseudo-labels on 65 test texts, so it says little about true emotion detection.

Summary based on the full text.

## In short

A Habr post (21 November 2026) testing whether cheap classifiers can learn emotion labels produced by a small local LLM. The author took 480 real product reviews from the RuReviews corpus, had Qwen3-0.6B label five emotions zero-shot, trained word TF-IDF, character TF-IDF and frozen ruBERT-tiny2 classifiers on those labels, and compared how well they reproduce Qwen on held-out texts. TF-IDF and ruBERT are statistically tied; a constant answer comes close on micro-F1; and the LLM labels themselves look doubtful.

## Key numbers

- 85 of 480 (17.7%): Qwen3-0.6B labelling answers rejected as invalid, mostly unknown categories
- 0.566 vs 0.581: macro-F1 of word TF-IDF versus frozen ruBERT-tiny2 against the LLM labels
- -0.058 to 0.091: 95% bootstrap interval for the ruBERT minus TF-IDF difference, which includes zero
- 0.719: micro-F1 of a constant answer that ignores the text, versus 0.723 for word TF-IDF
- 0.48 ms vs 319.50 ms: median latency per review, word TF-IDF on CPU versus the local LLM

## What it reports

- 480 reviews, 160 per sentiment class, split 320/80/80 before labelling, seed 42.
- Qwen3-0.6B (4-bit, Apple M1 with 8 GB): 85 answers (17.7%) invalid, 84 with categories outside the list. Rejections were uneven: 52 of 160 positive reviews, 11 neutral, 22 negative. None of the 395 valid answers was an empty list, although the prompt allowed it.
- Test set after filtering: 65 reviews. Macro-F1: word TF-IDF 0.566, character TF-IDF 0.484, ruBERT 0.581, constant baselines 0.445 and 0.468. Exact set match: ruBERT 20 of 65, word TF-IDF 10, character 5.
- Micro-F1: word TF-IDF 0.723, constant answer 0.719, ruBERT 0.680.
- Rare classes: 4 fear and 6 anger labels in the test set, too few for conclusions.
- Latency medians: 0.48 ms word TF-IDF, 0.57 ms character TF-IDF, 2.69 ms ruBERT (all CPU), 319.50 ms Qwen (MLX on Metal). Labelling all 480 reviews took 156.2 s of generation.
- Examples where Qwen tagged a complaint about a pyjama ruining laundry with joy and surprise, and classifiers reproduced questionable labels.

## How they got it

Strict JSON validation with no repair or retries; a single fixed prompt; thresholds chosen on validation only; paired bootstrap on test reviews. Code, raw LLM answers, splits, predictions and a script that recomputes metrics are published; the source file is pinned by SHA-256.

## Limits

- All metrics measure agreement with Qwen's labels, which have no human check.
- 65 test texts and one product category (women's clothing and accessories).
- Filtering changed the sample composition; latency compares different runtimes, not architectures.
- ruBERT encoder was not fine-tuned; only one small LLM tested.

## Why it matters for companies

Teams that distil LLM labels into cheap classifiers for review or ticket triage get a clear warning: a high agreement score can come from frequent labels alone, and a classifier can faithfully copy a wrong teacher. Constant-answer baselines and a human-checked sample are cheap to add before trusting the pipeline. The latency gap (under 3 ms versus about 320 ms per text) is the case for distillation once labels are validated.

## Key passages in translation

> Поэтому F1 в таблицах показывает совпадение классификаторов с её ответами.

So the F1 in the tables shows how well the classifiers match its [Qwen's] answers.

> Более того, постоянный ответ по частым меткам дал micro-F1 около 0,719 — почти столько же, сколько словесный TF-IDF.

Moreover, a constant answer of the frequent labels gave a micro-F1 of about 0.719, almost the same as word TF-IDF.

> Здесь и проявляется ограничение обучения на псевдометках: классификатор может успешно воспроизводить спорный ответ Qwen.

This is where the limit of training on pseudo-labels shows: a classifier can successfully reproduce a questionable Qwen answer.

Original: https://habr.com/ru/articles/1110590/
