Some of my results from experimenting with hallucination detection techniques for LLMs 🫨🔍
text
Some of my results from experimenting with hallucination detection techniques for LLMs 🫨🔍
new_line
new_line
First, the two main ideas used in the experiments—using token probabilities and LLM-Eval scores—are taken from these three papers:
text
First, the two main ideas used in the experiments—using token probabilities and LLM-Eval scores—are taken from these three papers:
new_line
new_line
1. 
text
1. 
Looking for a Needle in a Haystack: A Comprehensive Study of
  Hallucinations in Neural Machine Translation (2208.05309)
https://huggingface.co/papers/2208.05309
2208.05309
paper
resource
https://huggingface.co/papers/2208.05309
new_line
2. 
text
2. 
SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for
  Generative Large Language Models (2303.08896)
https://huggingface.co/papers/2303.08896
2303.08896
paper
resource
https://huggingface.co/papers/2303.08896
new_line
3. 
text
3. 
LLM-Eval: Unified Multi-Dimensional Automatic Evaluation for Open-Domain
  Conversations with Large Language Models (2305.13711)
https://huggingface.co/papers/2305.13711
2305.13711
paper
resource
https://huggingface.co/papers/2305.13711
new_line
new_line
In the first two, the authors claim that computing the average of the sentence-level token probabilities is the best heuristic for detecting hallucinations. And from my results, we do see a weak positive correlation between average token probabilities and ground truth. 🤔
text
In the first two, the authors claim that computing the average of the sentence-level token probabilities is the best heuristic for detecting hallucinations. And from my results, we do see a weak positive correlation between average token probabilities and ground truth. 🤔
new_line
new_line
The nice thing about this method is that it comes with almost no implementation cost since we only need the output token probabilities from the generated text, so it is straightforward to implement.
text
The nice thing about this method is that it comes with almost no implementation cost since we only need the output token probabilities from the generated text, so it is straightforward to implement.
new_line
new_line
The third paper proposes an evaluation shema where we do an extra call to an LLM and kindly ask it to rate on a scale from 0 to 5 how good the generated text is on a set of different criteria. 📝🤖
text
The third paper proposes an evaluation shema where we do an extra call to an LLM and kindly ask it to rate on a scale from 0 to 5 how good the generated text is on a set of different criteria. 📝🤖
new_line
new_line
I was able to reproduce similar results to those in the paper. There is a moderate positive correlation between the ground truth scores and the ones produced by the LLM.
text
I was able to reproduce similar results to those in the paper. There is a moderate positive correlation between the ground truth scores and the ones produced by the LLM.
new_line
new_line
Of course, this method is much more expensive since we would need one extra call to the LLM for every prediction that we would like to evaluate, and it is also very sensitive to prompt engineering. 🤷
text
Of course, this method is much more expensive since we would need one extra call to the LLM for every prediction that we would like to evaluate, and it is also very sensitive to prompt engineering. 🤷
Some of my results from experimenting with hallucination detection techniques for LLMs 🫨🔍

First, the two main ideas used in the experiments—using token probabilities and LLM-Eval scores—are taken from these three papers:

1. https://huggingface.co/papers/2208.05309
2. https://huggingface.co/papers/2303.08896
3. https://huggingface.co/papers/2305.13711

In the first two, the authors claim that computing the average of the sentence-level token probabilities is the best heuristic for detecting hallucinations. And from my results, we do see a weak positive correlation between average token probabilities and ground truth. 🤔

The nice thing about this method is that it comes with almost no implementation cost since we only need the output token probabilities from the generated text, so it is straightforward to implement.

The third paper proposes an evaluation shema where we do an extra call to an LLM and kindly ask it to rate on a scale from 0 to 5 how good the generated text is on a set of different criteria. 📝🤖

I was able to reproduce similar results to those in the paper. There is a moderate positive correlation between the ground truth scores and the ones produced by the LLM.

Of course, this method is much more expensive since we would need one extra call to the LLM for every prediction that we would like to evaluate, and it is also very sensitive to prompt engineering. 🤷
❤️
osanseviero victor clem samusenps gsarti KasperNomm JasperV13 sbrandeis
5e7749883d77a72421292d07
https://cdn-avatars.huggingface.co/v1/production/uploads/5e7749883d77a72421292d07/M4AmBReZk_otxCIG3o0bL.jpeg
Gabriele Sarti
gsarti
user
629a173153a72d997d3f57d0
https://cdn-avatars.huggingface.co/v1/production/uploads/1657144463525-629a173153a72d997d3f57d0.jpeg
Santiago Viquez
santiviquez
user