Constrained Decoding: Forcing LLMs to Respect Your Taxonomy
A structural guarantee for LLM classification outputCode: https://github.com/SachinKalsi/constrained-decodingThe ProblemWhen you use an LLM for classification across many categories, it sometimes returns a label that was never in your input list. The o…