A single LLM call rarely produces perfect results. Ask an AI to organize a movie library into collections and you'll get inconsistent output—sometimes creative, sometimes missing obvious franchises, sometimes grouping unrelated films under vague themes. The solution isn't a better prompt. It's a structured pipeline that breaks the problem into focused passes, each with its own validation.

This post documents a 5-pass analysis pipeline that combines local embeddings with LLM validation. The embeddings (covered in Local Semantic Search with Transformers.js) do the heavy lifting of grouping similar movies. The LLM validates the clusters, names them, and catches what the clustering missed.