Expand description
Numeric value extraction from LLM responses.
Provides parse_number for extracting a numeric value and
parse_number_in_range for bounded extraction, handling common LLM
output patterns like “Score: 8.5”, “8/10”, and prose-wrapped numbers.
Functions§
- parse_
number - Extract a numeric value from an LLM response.
- parse_
number_ in_ range - Extract a number and verify it falls within
[min, max]inclusive. - parse_
number_ in_ range_ with_ trace - Extract a bounded numeric value with diagnostic trace.
- parse_
number_ with_ trace - Extract a numeric value from an LLM response with diagnostic trace.