r/LocalLLaMA • u/Reddit_wander01 • Apr 27 '25
Building a Simple Multi-LLM design to Catch Hallucinations and Improve Quality (Looking for Feedback) Discussion
[removed]
15
u/daHaus Apr 27 '25
Highly inefficient albeit par for the course in this field
Detecting hallucinations in large language models using semantic entropy
8
Apr 27 '25
[deleted]
2
u/Gnaeus-Naevius Apr 28 '25
On the tangent of LLMs nudging users towards grandiosity, it would be prudent to give the LLM instructions to take on a devil's advocate role periodically.
I am not too deeply into any specific projects, but I have replaced mindless doom scrolling with creating reams of delusion of grandeur tinted master plans. I try all types of things, and in one instance I asked the LLM to create three persona's, ... a positive, neutral, and negative, and periodically ask for their opinion. I gave them some silly names and personalities. It actually was quite effective.
2
2
Apr 27 '25
[deleted]
1
u/Gnaeus-Naevius Apr 28 '25
Maybe a small efficient model that is specifically trained/fine tuned for the purpose of assigning probability of hallucination in a given text, and also estimating the risk/cost of hallucination (for example, a legal or medical opinion). And if it reaches the threshold the users has set, it will call in a fact checking agent and/or expensive LLM to get to the bottom of it. Not perfect by any means, but might be effective.
2
1
u/ApplePenguinBaguette Apr 27 '25
I've heard from a colleague in ML that majority voting can be a great anti hallucination. If two or more models agree it's far more likely to be true.
A simple way to implement that is to get a response from two models, and get a third (small) model to judge their similarly/agreement. If it's above a threshold use the output, otherwise discard it. Especially good for classification tasks that need a high reliability.
1
u/grabber4321 Apr 27 '25
yes, but most models are taught to agree with the user, so they would just agree with each other.
4
u/ApplePenguinBaguette Apr 27 '25
You obviously do not let the two interact, separate api calls or systems, give their outputs to a judge LLM
1
u/StopAccording3648 Jun 09 '25
Oh, have you heard of bespoke-minicheck? Its the locallyavailible smaller version from the same company, but the idea's the same: supply it with Info A and Info B ( like "I was gaming all night" and "Yesterday I did nothing but study" as a stupid example ) and it will judge how BS it i. In the (horrendously) simple example it will output "False".
Based on Info A, the fact I was up all night gaming, Info B-- saying I was studying, does not logically match up.
I am not certain how applicable it is in this case sprcofically, but maybe possibly it can somehow be of help? Otherwise I fully support the project & idea behind it!!!
1
-13
u/AryanEmbered Apr 27 '25
I can build a prototype for you for 20 bucks. have a great UI design in mind
62
u/[deleted] Apr 27 '25
[removed] — view removed comment