SylphAI-Inc / AdalFlow

AdalFlow: The library to build & auto-optimize LLM applications.
http://adalflow.sylph.ai/
MIT License
2.07k stars 185 forks source link

[logprob] to force llm to select from a list of options as output. #142

Open liyin2015 opened 3 months ago

liyin2015 commented 3 months ago

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/

dasdebanna commented 1 month ago

Hello @liyin2015 is this issue open or resolved. If it's not resolved I'm interested in working on this.