- Published on
Don't classify. Hallucinate!
- Authors

- Name
- DeepHorus
A novel approach to content tagging has emerged from the blog of a developer, proposing to 'hallucinate' tags rather than classify them. The method, described in a 14th August 2026 post, leverages large language models to generate imaginative labels, then uses vector embeddings to map them to an existing taxonomy. This technique turns a tedious organizational task into a fast, scalable process.
The author, who runs a blog with 1,856 tags, faced the challenge of older content that never got tagged. Feeding all those tags to an LLM in one go would be impractical, likely causing errors and excessive token consumption. So they adopted a strategy from Doug Turnbull, a search and relevance specialist, to let the model freely propose new tags without seeing the existing vocabulary.
The core prompt instructs the model to create novel, never-before-seen classifications that best fit a query. To guide the output, the prompt includes examples of the desired tag shape, such as 'Furniture / Living Room Furniture / Coffee Tables & End Tables / Coffee Tables' and 'Décor & Pillows / Decorative Pillows & Blankets / Throw Pillows.' This helps the model produce tags that are structurally similar to the ones in the blog's own list.
Once the LLM generates a hallucinated tag, the system computes a vector embedding for that tag and compares it against embeddings of all 1,856 existing tags. Using cosine similarity, the closest matches become the concrete tags assigned to the content. For instance, the query 'brown coffee table' might yield tags like 'Furniture / Living Room Furniture / Coffee Tables' after matching.
This approach fundamentally changes the tagging workflow: instead of forcing a model to pick from a massive list, it first generates a creative suggestion and then grounds it in semantic retrieval. The result is a more reliable and efficient system, especially for blogs or e-commerce catalogs with large, messy taxonomies. It also reduces the need to craft expensive few-shot prompts with hundreds of examples.
The impact is significant for content managers and digital archivists who struggle with inconsistent tagging. By combining LLM generation with vector search, non-technical users can quickly tag decades of untagged posts while maintaining consistency with established categories. The technique also lowers the barrier for smaller organizations that cannot afford custom fine-tuning.
Industry observers have called the solution 'neat' and 'clever,' noting that it embraces LLM hallucination as a feature rather than a bug. Instead of treating hallucinations as a problem, the method uses them as a creativity engine, with embeddings acting as a safety net. This pragmatic view is gaining traction in the AI community.
Looking forward, this hybrid approach could inspire more systems where generation and retrieval work in tandem. It also suggests a broader shift: Rather than battling hallucination, developers may design workflows that harness it for exploratory tasks. Vector databases are maturing quickly, making such techniques accessible to mainstream developers.
In a broader context, this is part of the trend of grounding AI outputs in external data sources. As knowledge bases grow, taxonomy management must become more human-friendly and scalable. This method offers a practical blueprint for using LLMs to maintain structure without sacrificing flexibility, potentially becoming a standard tool in the AI developer's kit.