10 points · by QueensGambit · 1y ago · 7 comments
This tool looks simple — it just converts OpenAI’s logprobs into field-level confidence scores — but that changes how you use AI in production. It lets you mark low-confidence fields, send them for human review, or retry with better grounding. In high-volume systems, you can also track low-confidence patterns to improve prompts or fine-tune with better data. Its a lightweight npm and has no dependencies, so its easy to integrate it into your AI workflows. Would love to hear your thoughts!
const jsonOutput = JSON.parse(response.choices[0].message.content);
const result = calculateConfidenceScores(jsonOutput, response.choices[0].logprobs.content);