Structured Logprobs
TLDR 1 year ago
A Python library called structured-logprobs adds token-level log probability data to OpenAI's structured outputs, allowing developers to measure confidence in each generated value. The library provides two methods: adding log probabilities as a separate field (returning values like -5.5 for "capital_of_France") or embedding them inline within the JSON response. This enables assessment of reliability for extracted data by quantifying how likely the model found each token it generated.