Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 18 min read How-to mediumAdept

Opinion Classification with Kili and HuggingFace AutoTrain

Kili's annotation platform and Hugging Face AutoTrain combine into an active-learning pipeline that classifies about 40,000 Google Play reviews of the Medium app into Subscription, Content, Interface and User Experience, then applies sentiment analysis to the classified reviews. The walkthrough covers creating a Kili labeling project through the web UI and the Python API, uploading data in batches of at most 100, and flagging changed samples between dataset versions for re-review. It then exports the labels to CSV and trains a model with AutoTrain and a second one without it.

Assumes: Python and pandastext classification basics

Related posts

  • Supercharged Customer Service with Machine Learning

    Hugging Face mediumAdept

    A walkthrough of building a classifier that flags very unsatisfied customer messages by framing the problem as 5-class sentiment text classification. Covers choosing a dataset on the Hugging Face Hub, settling on English Amazon Reviews Multi (1-5 star labels, 200k training examples) over GLUE, Amazon polarity, Tweet eval and Yelp, and choosing a pretrained model by checking GLUE/SuperGLUE leaderboards, landing on microsoft/deberta-v3-base. It then shows code to load and tokenize the data with Datasets and Transformers and fine-tune the model, pushing checkpoints to the Hub.

  • Data-Centric Machine Learning: Building Shopify Inbox’s Message Classification Model

    Shopify Engineering mediumAdept

    Shopify Inbox's message classifier improved from ~70% to ~90% accuracy, and from ~35% to ~80% high-confidence coverage, by investing in better training data rather than model tweaks. The v1 prototype used Universal Sentence Encoder embeddings with UMAP/HDBSCAN clustering and semi-supervised labeling on 40,000 examples. For v2, the team fine-tuned DistilBERT on 20,000 human-labeled messages. Those labels came from a 45-topic taxonomy built with support advisors and domain experts, refined through inter-annotator agreement exercises, and scrubbed of personal information with Presidio and Faker. Model predictions were then used to surface underrepresented topics for further annotation.

  • How we think about text classification in the LLM era

    Medium Engineering mediumAdept

    Medium replaced its aging NSFW story classifier with a prompt-based LLM classifier that runs inside Snowflake Cortex SQL queries. It needs only a human-labelled evaluation set, oversampled to a 50/50 split, plus curator-written guidelines. Mixtral 8x7b matched or beat the legacy model on precision and recall for about $250/month, scoring only distribution-eligible stories. The team judged LLMs a poor fit for its topic and spam models. Topic labels come free from writer tags and let that model adapt to trends, while spam is an adversarial, full-volume workload where a static model and fixed prompt fall behind and costs rise.

  • Automated merchant review summary system with integrated feedback

    Grab Engineering easyNovice

    Grab generates consumer-facing merchant review summaries with a pipeline that stratifies review samples by a sentiment-scored rating distribution, uses an LLM to produce overall and topic-based summaries (taste, packaging, portion size), and has a separate LLM check each claim against the sampled reviews before publication. Summaries are regenerated when new reviews or negative helpfulness feedback cross configured thresholds. Matching the rating distribution doesn't guarantee coverage of time periods, languages or segments, LLM validation reduces but doesn't eliminate unsupported claims, and feedback-driven regeneration needs anti-abuse controls.

  • Small models, big results: Achieving superior intent extraction through decomposition

    Google Research hardMaster

    Splitting UI-trajectory intent extraction into two stages lets small on-device multimodal LLMs match much larger models. First, each screen interaction is summarized from a sliding window of three screens, covering screen context, user actions and a speculation about the goal. Second, a fine-tuned small model turns the sequence of summaries into a single intent sentence. Three training choices drive the gains: dropping the speculations in stage two, and cleaning training labels with an LLM so they contain no details missing from the summaries, which reduces hallucination. Evaluated with Bi-Fact atomic-fact precision/recall F1, the method beats chain-of-thought prompting and end-to-end fine-tuning on Android and web data for Gemini and Qwen2, with Gemini 1.5 Flash 8B approaching Gemini 1.5 Pro.

The quest for software engineering knowledge.

Look:
Layout: