hallucinating-labels

Solid

Assign items to a CLOSED label vocabulary that is too large to put in a prompt — product taxonomies, category hierarchies, tag vocabularies, routing tables, ICD/SIC-style code lists. A cheap model writes the label it thinks the vocabulary would use, and an embedder snaps that writing onto the nearest legal value, so the schema is never transmitted and the output is always in-vocabulary. Use for "classify these into our taxonomy", "tag these against the existing tag list", "map these queries to categories", "the enum is too big to send", or a Literal/enum that hits a provider cap. NOT for a vocabulary that fits in a prompt — structured output measured 0.701 acc@1 there against this pattern's 0.564. NOT for open-ended labelling with no fixed vocabulary, and not for ranked retrieval over documents (bm25).

DevOps & Infrastructure 148 stars 5 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
72
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# hallucinating-labels Ask a cheap model to write a plausible label for the item. Snap that label onto the real vocabulary with an embedder. The model never sees the label set. Doug Turnbull's pattern ([softwaredoug.com, 2026-08-10](https://softwaredoug.com/blog/2026/08/10/hypothetical-classifications)), with the two prompt and boundary corrections that measurement produced. ## Check the boundary first **If the whole vocabulary fits in a prompt, do not use this skill.** Ship the label list and ask for a constrained choice. Measured on WANDS (860 labels, 468 queries, one gold label each, gemini-3.5-flash-lite): | approach | acc@1 | acc@3 | input tokens/item | |---|---|---|---| | structured output, all 860 labels shipped | **0.701** | **0.744** | 5,265 | | this skill | 0.564 | 0.690 | 6 | | embed the item directly, no model | 0.417 | 0.564 | 0 | Shipping the vocabulary is 14 points more accurate and 880× more expensive. Take the accuracy unless the tokens are the problem. The tokens are the problem when the vocabulary does not fit, when a provider enum cap rejects it, or when per-call cost at volume dominates — a 5,000-label vocabulary is roughly 30k tokens on *every single call*. This skill still beats every model-free baseline by a wide margin, so it is the right tool whenever shipping the vocabulary is off the table. ## Procedure **1. Write the vocabulary to a file**, one label per line, and index it once. ```bash python3 scripts/snap.py build --vocab categories.tx...

Details

Author
oaustegard
Repository
oaustegard/claude-skills
Created
10 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

label-system

A minimal, opinionated GitHub label taxonomy for OSS / internal projects covering priority, area, issue status, PR review state, and independent reproduction. Use when setting up labels for a new repo, when triaging a backlog, when asked "how should we label issues", when reviewing whether existing labels are coherent, or when applying labels to a batch of open issues. Five orthogonal axes, ~16 labels total, every label answers a specific filter query — designed against the open-source convention of `S-waiting-on-*` (Rust) and two-stage approval (Kubernetes), but kept small enough for a solo / small-team repo to actually maintain. Includes a bootstrap script (`scripts/bootstrap-labels.sh`) that creates the full label set in a target GitHub repo with one `gh` call per label.

3 Updated yesterday
bingran-you
AI & Automation Listed

promptcarta

Model-aware expert prompt generator and critic. Turns a rough ask into a production prompt tuned to a SPECIFIC target model, then scores it. 9-step pipeline: resolve target model, score input, extract 11 intent dimensions, gate on success criteria, max 3 clarifying questions, pick an architecture, decompose into parallel sub-agents and assign the best-fit skill to each, apply the model-specific transform, scan for dead constructs, re-score. Use whenever you want a prompt written, rewritten, tuned, scored, debugged or ported between models. Trigger on "write a prompt for", "improve this prompt", "prompt for GPT-5 / Gemini / Kimi / GLM", "system prompt for", "why is this prompt failing", "port this prompt to", "score this prompt", "promptcarta", "/promptcarta", "tune this for <model>". HARD RULE: every model fact comes from references/models/*.md and its last_verified date. Never state model behaviour from memory. NOT for authoring skills (skill-creator), routing a request to the right skill (a routing/orchestr

0 Updated 3 weeks ago
mohanraj005-dot
AI & Automation Listed

prompt-forge

INVOKE THIS SKILL BEFORE hand-crafting any image or video prompt. Even a one-line user brief ("写个 Anima 的旗袍提示词") MUST go through compile(spec, dialect_id); you may summarize or trim the returned PromptPackage for the user, but the validator MUST run. Skip ONLY when the user explicitly says "no skill, raw text only" / "no validation" / "just write the prompt, don't run anything". LLM-first prompt authoring and quality-audit for image and video models. The LLM authors typed concept objects (Subject with identity / appearance / pose / gesture / expression / gaze / micro_action / costume / props; Costume with garment / material / color / condition / fit / details; Prop with item / material / condition / details; Environment with place / spatial / immediate surroundings / ambient / atmosphere; Atmosphere with haze / particles_foreground / particles_midground / particles_background / wind / sky; Lighting with key / fill / rim / practical / quality / shadow_density / contrast; Frame with shot / camera_height / camer

0 Updated 3 weeks ago
cxin21