There are all sorts of approaches
- microsoft guidance
- llama.cpp grammar constraints
- someone recently made their own approach and posted it here, search for CAPPr
Community to discuss about Llama, the family of large language models created by Meta AI.
There are all sorts of approaches
The correct answer here is reading logprobs/logits over the true/false tokens after parsing the input.
Using a grammar is overkill and a classification model might not get you the fidelity you want.
Fine tune of course
I reverted to mistral-instruct