Simon Willison: have LLMs hallucinate tags, then match via embeddings

Simon Willison writes that his blog carries 1,856 tags, too many to hand an LLM in one pass and ask it to pick matches from the list. He credits Doug Turnbull with a workaround: instead of constraining the model to the existing vocabulary, tell it to output novel tags it thinks fit the content, with no knowledge of what tags already exist. Those invented tags are then compared against the existing corpus using vector embeddings, and the system pulls the concrete, real tags whose embeddings sit closest to the model's invented ones. Turnbull's example prompt, aimed at classifying furniture and home goods, shows the model a handful of sample category paths (such as "Furniture / Living Room Furniture / Coffee Tables & End Tables / Coffee Tables") so it learns the shape and granularity of a good tag before generating its own guesses for a new item, in his example a query for "brown coffee table". Willison does not report having run this technique on his own 1,856-tag blog archive, nor does he give any results or accuracy figures for the method; the post presents it as a technique worth sharing rather than a completed experiment.

Key facts

  • Willison's blog has 1,856 tags, which he says is too many to feed an LLM in one go for direct tag selection.
  • Doug Turnbull's technique: let the model invent new, unconstrained tags for the content rather than pick from a fixed list.
  • The invented tags are then matched to real tags in the existing corpus using vector embeddings, pulling the closest concrete matches.
  • Turnbull's example prompt shows the model sample category paths (from a furniture and home goods domain) to guide the shape of its guesses, then asks it to classify a "brown coffee table" query.
  • No performance results or accuracy figures for the technique are given in the post.

Why it matters

Classifying content against a large, evolving tag vocabulary is a common problem for anyone running a blog, a support system, or a product catalog with hundreds or thousands of categories: the list is too big to paste into a prompt, and asking a model to pick blind from a huge enumeration wastes context and degrades accuracy. Turnbull's approach sidesteps the constraint entirely by not showing the model the vocabulary at all, then reconciling its guesses against the real list afterward with embeddings, a technique that trades a classification problem for a nearest-neighbor search problem.

Who it affects

Anyone maintaining a large, freeform tagging or categorization system backed by an LLM, including bloggers like Willison himself, and builders of product catalogs or support-ticket classifiers where the category list is large or changes over time.

How to use it

The recipe: prompt the model to invent plausible tags or category labels for a piece of content without giving it the existing vocabulary, optionally showing it a few example tags or category paths so it learns the expected shape and specificity. Then take the model's invented output and run a vector-embedding similarity search against the real, existing tag corpus to find the closest actual matches. Turnbull's example prompt applies this to furniture and home-goods classification, feeding the model sample category paths before asking it to classify a "brown coffee table" query.

How solid is it

The post is a short write-up relaying someone else's idea rather than a benchmarked study. No accuracy numbers, comparison against a baseline (such as feeding the model a trimmed or chunked vocabulary), or evidence that Willison has applied it to his own 1,856-tag archive are given. It reads as a promising technique worth trying, not a validated result.

Risks and caveats

Because the technique is untested in the post itself, its real-world accuracy, failure modes, and behavior on ambiguous or edge-case content are unknown. An embedding match is only as good as the embedding model and the density of the existing tag corpus; a genuinely novel topic with no close existing tag could still be misassigned to the nearest available label rather than flagged as needing a new one.