Remix.run Logo
seanmcdirmid a day ago

You can reduce hallucinations with appropriate grounding checks. You can’t really get rid of them though, so feedback loops with verification are essential.

JeremyNT 17 hours ago | parent | next [-]

Doing a loop and having the model review its own earlier output tends to solve this stuff, and for code requiring good test coverage catches them before they even hit that phase.

So while you can't remove "hallucinations" they're corrected before the process is complete, albeit at the cost of more tokens for verification.

6 hours ago | parent [-]
[deleted]
camgunz a day ago | parent | prev [-]

Error percentages compound. Having an LLM do something with a 5% hallucination rate, then having an LLM (same or different) with a 5% error rate check it means there's a 10% chance of error, not .25%. Prompting can't save you here; it's the fundamental math.

kolinko a day ago | parent | next [-]

Your fundamental math is wrong

camgunz a day ago | parent [-]

no ur wrong

faeyanpiraat 21 hours ago | parent [-]

Well you both seem like well educated people, so can we bring in some thinking here and determine whether it is 2.5% or 10%?

How could this be verified?

I don't think I'm good enough at math and ai research to find a reliable way.

juvvel 19 hours ago | parent | next [-]

This reminds of sensitivity vs. specificity for medical tests. You essentially have a 2x2 matrix: Error vs. non-error on one axis, and detected vs. not detected on the other. If we assume that a reviewer LLM has 95% accuracy, meaning that it produces the correct result 95% of the time it (identifying errors as errors, and identifying non-errors as non-errors), you get the following: Of 100 cases, the output of 5 is wrong, and the output of 95 is correct. Of the 5 wrong outputs, the LLM correctly identifies 4.75 (95%) as wrong. But it will also create 4.75 false positives (5% of 95). Of the 95 correct ones, the LLM correctly identifies 90.25 (95%) as correct. Therefore it creates 0.25 false negatives. So the positive predictive value is low: When the reviewer LLM flags an error, it's actually only an error 50% of the time. On the other hand, the negative predictive value is high, so in ~99.7% of cases, there will be no error if the reviewer LLM didn't catch one. All of that is assuming that the actual accuracy of the reviewer LLM is truly a flat 95% and that the base error rate is truly only 5%. I think that in reality, LLMs perform better with a certain type of tasks / errors and 5% error rate is just an average.

19 hours ago | parent | prev | next [-]
[deleted]
19 hours ago | parent | prev [-]
[deleted]
SkyBelow 18 hours ago | parent | prev [-]

How errors add depend upon how you treat them.

Two independent task? You have a 95% chance of each task being correct, so total success is .95^2 = 90.25% correct.

Having two AIs verify the same task with each being 95% correct? That's a 5% error per each, so 1-(.05^2) = 99.75% correct.

That is assuming fully independent error rates, which is the real issue. If it is pure hallucinations, then that is an okay assumption, but if there are issues in the underlying prompt/data causing the error rates, then it becomes a very dangerous assumption and I think more human involvement is recommended to better understand and resolve the underlying data problem.

The real interesting bit is that more AI's mean the 2 in the above equations gets bigger, so the error rate gets worse or better depending upon which equation is in play. So if you are in an in-between landscape where you aren't sure there is independence or not (or how much independence between errors), it also becomes unclear if more AI makes the error rate better or worse.

seanmcdirmid 6 hours ago | parent | next [-]

This. The math of coincident errors is why we can get reliable AI, but it really is a matter of how the errors manifest and how they are detected.

I’ve written a bit about this and my approach is based on clean room and N-versions.

camgunz 30 minutes ago | parent [-]

Reliable AI is an oxymoron and deeply misleading. Even if you can stack models the efficiency tanks. Also, just looking at the Wikipedia page (https://en.wikipedia.org/wiki/N-version_programming#:~:text=...), don't LLMs already have all these problems?

camgunz 13 hours ago | parent | prev [-]

Upvoted for real math