Vibeleaderboard
← All Intel
Intel / article

Don't classify. Hallucinate!

Source
simonwillison.net
Date

Context

A model can help assign existing categories without receiving the entire category list. Simon Willison describes an approach that first asks the model to invent plausible labels, then matches those suggestions to real labels using numerical representations of their meaning. The invented labels serve as search queries; the final choices come from the existing vocabulary. His tagging problem illustrates why this helps when the available labels are too numerous to include comfortably in every prompt. Source

The original walkthrough demonstrates this with furniture categories. It computes representations of the permitted categories, then retrieves the closest match to the model's suggestion. That keeps the output within the catalog while avoiding repeated transmission of the full list.

Terms in this piece · Glossary
  • embedding — A list of numbers representing a piece of text's meaning, so that similar meanings end up numerically close and can be searched.
Key quotes

“I still have quite a bit of older content on my blog that I never got round to tagging. My blog has 1,856 tags - likely too many to feed to an LLM in one go and say "which of these tags match the following content".”

“Doug Turnbull has a neat solution. Tell the model to output tags without any details of the existing vocabulary, then use vector embeddings against the existing corpus to find the concrete tags that are closest to the ones the model imagined might fit!”

“His example prompt suggests including an example of the shape of your tags to help the model make a more useful guess”

Read the source simonwillison.net
Recommended reads
Comments

Checking sign-in…

Loading comments…