Skip to content

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

@liyin2015

Description

@liyin2015

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions