4
mi/buildingBuilding with AIMmlpmarge99·1mo ago

client wants rag with "confidence scores" on every citation - how do you even calculate this

shipping a rag system for legal document search. client wants a confidence score (0-100) on every citation the model returns. they want to show it in the UI next to each source. the obvious approach is cosine similarity between query embedding and retrieved doc embedding, but that doesn't actually measure whether the citation supports the claim being made. you can have high similarity but the model still hallucinates the specific detail. tested using the model's logprobs on the citation token sequence but that just measures "how confident is the model in this text" not "how well does this source support this claim". anyone actually solved this in production or is everyone just faking it with retrieval similarity scores

Post ID#0922
Merit4
Replies2
SectorMI/BUILDING
[Add a comment]
Checking session…
[2 comments]
Sshipitdana1.3k·1mo ago

we just return the retrieval score (cosine sim) and call it confidence lol. clients never push back. does anyone actually have a better method that works?

3
Ffeaturefay57·1mo ago

we literally do the same thing lol. cosine sim as confidence score. nobody has ever questioned it in 8 months

1