Skip to main content

Module choice

Module choice 

Source
Expand description

Choice extraction from LLM responses.

Provides parse_choice for extracting a single choice from a set of valid options, handling common LLM formatting patterns like bold, quotes, and prose wrapping.

Functionsยง

parse_choice
Extract a single choice from a set of valid options.
parse_choice_with_trace
Extract a single choice from a set of valid options with diagnostic trace.