Re:Show HN: Calculate confidence score for OpenAI JSON output
by siva7 on Thursday April 10, 2025 @05:59PM
(#43648437)
Wait, this doesn't work with a current-gen model like 4o? Is this a technical limitation?
[ Parent
| on HN ]
Re:Show HN: Calculate confidence score for OpenAI JSON output
by QueensGambit on Thursday April 10, 2025 @07:11PM
(#43648819)
Yes, it does. Updated the doc. Thanks for pointing it out! As long as you have the logprobs, it should work:
const jsonOutput = JSON.parse(response.choices[0].message.content);
const result = calculateConfidenceScores(jsonOutput, response.choices[0].logprobs.content);