Building a Local LLM-as-Judge Pipeline for Image Dataset Curation

· Source: HackerNoon · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering, Data Science & Analytics · Depth: Intermediate, long

Summary

A local LLM-as-judge pipeline, named MonkeyEatingMango, was developed to curate image datasets for a travel app, specifically addressing errors like "celebrity matches" in automatically sourced photos. This system uses a Lambda Architecture, separating a fast, approximate "hot path" from a slower, corrective "cold path" that runs locally on an NVIDIA GeForce RTX 3060 with 12GB vRAM. The cold path employs `gemma3:12b` for two tasks: classifying place names as photographable venues and judging if candidate images correctly represent them. A `qwen2.5vl, 3B` model handles initial coarse visual checks, running three times faster for simple "place or not" decisions. The pipeline re-evaluated ~17,000 unchecked photos, recovering correct images for about 30% of initially photoless entries, improving accuracy from 36% to 65% for findable photos. It also features a "negative cache" and an "andon cord" for manual review. String hygiene issues, not photo scarcity, were the primary cause of initial lookup failures.

Key takeaway

For MLOps Engineers building robust data curation pipelines for visual assets, consider adopting a Lambda Architecture with local LLMs. This approach allows your live systems to remain fast while a batch process systematically corrects errors, significantly improving data quality. Implement distinct models for coarse and fine-grained judgments, and prioritize fixing root causes like string hygiene over individual data points. This strategy enhances accuracy and reduces manual intervention.

Key insights

Combining local LLMs with a Lambda Architecture effectively curates image datasets, improving accuracy and user experience.

Principles

Method

Implement a cold path using local LLMs for text classification and vision-based image judging. Parallelize image downloads while a single GPU processes judge calls.

In practice

Topics

Best for: AI Engineer, Machine Learning Engineer, MLOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by HackerNoon.