For models, especially open source ones with logprob available, we can potentially force model to select from a set of options such as select(["apple", "orange"). this is very helpful for using genai to do classification tasks.
This can be a parser_completion function in the model_client where user can customize.
For models, especially open source ones with logprob available, we can potentially force model to select from a set of options such as
select(["apple", "orange")
. this is very helpful for using genai to do classification tasks.This can be a parser_completion function in the model_client where user can customize.
Guidance: https://github.com/guidance-ai/guidance/