[{"data":1,"prerenderedAt":162},["ShallowReactive",2],{"project-43644708":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":32,"aspects":33,"strip":35,"post_text":29,"what":36,"said":67,"maker_in_thread":99,"shape":109,"grid":112,"attempts":125,"same_week":126,"maker_shows":111,"maker_hidden":155,"reader_version":156,"card":157},"43644708","@promptrepo\u002Fscore","Calculate confidence score for OpenAI JSON output","title","Show HN: Calculate confidence score for OpenAI JSON output","https:\u002F\u002Fgithub.com\u002FManiDoraisamy\u002Fpromptrepo-score","github.com","QueensGambit",1744298175,2025,10,7,2896,3837,76,"shown","ai","llm output confidence scoring","library",[24,25,26,27],"openai logprobs","json confidence score","llm output validation","field-level confidence","quiet",null,{"positive":31,"neutral":32,"mixed":31,"critical":31},0,3,{"execution":34},{"positive":31,"critical":31},[31,32,31,32,31,32,31],{"problem":37,"audience":44,"pricing":29,"motivation":49,"time_to_build":29,"stack":53,"openness":65,"stage":66,"team_size":66},{"value":38,"source":39,"evidence":40},"Knowing how confident an AI model is in each field of its JSON output before trusting it in decisions","maker",[41],{"id":42,"by":11,"text":43},"43644957","Hi everyone, I built @promptrepo\u002Fscore because we’re no longer using generative AI just for suggestions — we’re making decisions with it. But generative AI is probabilistic, not…",{"value":45,"source":46,"evidence":47},"Developers putting generative AI outputs into production decision-making","inferred",[48],{"id":42,"by":11,"text":43},{"value":50,"source":39,"evidence":51},"Generative AI is now used to make decisions, so output confidence per field is needed",[52],{"id":42,"by":11,"text":43},[54,58],{"value":55,"source":39,"evidence":56},"JavaScript (npm package)",[57],{"id":42,"by":11,"text":43},{"value":59,"source":39,"evidence":60},"OpenAI logprobs",[61,62],{"id":42,"by":11,"text":43},{"id":63,"by":11,"text":64},"43644872","Not yet. @promptrepo\u002Fscore relies on token-level logprobs, which OpenAI exposes for their models. But, Anthropic’s Claude currently doesn’t expose token-level confidence (like…","open_source","unknown",{"praise":68,"objections":73,"requests":74,"questions":83,"alternatives":98},[69],{"value":70,"source":39,"evidence":71},"Simple, lightweight, no dependencies, easy to integrate",[72],{"id":42,"by":11,"text":43},[],[75],{"value":76,"source":77,"evidence":78},"Support for Claude","commenter",[79],{"id":80,"by":81,"text":82},"43644808","manidoraisamy","Does it support Claude?",[84,91],{"value":85,"source":77,"evidence":86},"Does it work with current models like GPT-4o?",[87],{"id":88,"by":89,"text":90},"43648437","siva7","Wait, this doesn't work with a current-gen model like 4o? Is this a technical limitation?",{"value":92,"source":77,"evidence":93},"Does it handle nested JSON objects and arrays?",[94],{"id":95,"by":96,"text":97},"43645111","rboobesh","Can this work with nested JSON objects or arrays?",[],{"comments":100,"answered":32,"key":101},4,[102,103,106],{"id":42,"text":43},{"id":104,"text":105},"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);…",{"id":107,"text":108},"43645145","Yes, it does. It recursively walks through the JSON structure, calculating a confidence score for each individual field — whether it’s a top-level key, nested inside objects, or…",{"commenters":100,"max_depth":110,"maker_replies":100,"first_comment_mins":15,"lifespan_hours":111},2,8,[113,116,118,120,121,123,124],[42,31,31,114,11,115],"project\u002Fpositive\u002Fidea",1,[88,115,32,117,89,31],"project\u002Fneutral\u002Fexecution",[104,115,31,119,11,115],"project\u002Fneutral\u002Fdocs",[95,110,32,117,96,31],[107,110,31,122,11,115],"project\u002Fpositive\u002Fexecution",[80,32,32,117,81,31],[63,32,31,117,11,115],[],[127,132,137,142,146,151],{"id":128,"name":129,"points":130,"category":131},"43690289","Unsure Calculator",930,"dev_tools",{"id":133,"name":134,"points":135,"category":136},"43675248","SignalBloom",292,"finance_crypto",{"id":138,"name":139,"points":140,"category":141},"43667061","memEx",194,"productivity",{"id":143,"name":144,"points":145,"category":20},"43652968","Chonky",169,{"id":147,"name":148,"points":149,"category":150},"43677909","Infocom Unix Z-Machine (pez)",157,"languages",{"id":152,"name":153,"points":154,"category":150},"43682547","protobuf-ts-types",138,false,"v2",{"id":158,"name":5,"line":6,"ai":155,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":159,"maker":11,"domain":10,"tier":19,"attempts":31,"strip":160,"url":9,"mix":161,"praise":70,"objection":-1,"sub":21},43644708,[24,25,26,27],"0303030",[31,32,31,31],1794036672653]