A better way to tag with LLMs: let them hallucinate, then match
Doug Turnbull has a counterintuitive trick for using LLMs to tag content, and Simon Willison thinks it is worth spreading. The usual approach is to hand the model your full list of allowed tags and ask it to pick. That breaks down when the list is large: Turnbull's furniture example has 1,856 categories, and Willison's own blog has thousands. Stuffing all of them into the prompt is expensive, and the model still picks badly.
The fix is to do the opposite. Ask the model to invent tags freely, told to create novel, never-seen-before labels for the item without ever seeing your taxonomy. For "brown coffee table" it might imagine a clean hierarchy like Furniture / Living Room / Coffee Tables. Then you take those hallucinated tags and match them to your real vocabulary with vector embeddings, snapping each invented label to its nearest existing tag. The model does what it is good at, generating fluent guesses, and the embedding step handles the part it is bad at, staying inside a fixed set.
It is a neat reminder that a hallucination is only a problem when you need the output to be grounded. Here the wrong-but-plausible guess is the raw material, and a second, cheaper step does the grounding.
Why it matters
If you build search, tagging, or catalog systems, this flips a common failure mode into a feature. Stop paying to cram huge label lists into every prompt, and let embeddings do the matching instead. It is cheaper and usually more accurate.