TLDRocket
Sign in

Code Generation

111 summarised stories about Code Generation, each linking back to the original source. Browse all topics →

Thursday, 16 January 2025

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.