File size: 1,685 Bytes
ff3d587
 
f6f0f29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ff3d587
f6f0f29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
license: mit
task_categories:
- text-classification
- tabular-classification
- tabular-regression
- question-answering
language:
- en
tags:
- rag
- hallucination-detection
- llm-evaluation
- tabular-nlp
- transformers
pretty_name: RAG Hallucination Benchmark
size_categories:
- 10K<n<100K
---

# RAG Hallucination Benchmark

### Context
Retrieval-Augmented Generation (RAG) is the industry standard for reducing LLM hallucinations, but detecting when a RAG system fails is a massive challenge. Most existing benchmarks focus only on massive Deep Learning models and lack tabular features. 
This dataset provides a clean, engineered setup to train models (from XGBoost to RoBERTa) to detect hallucinations, predict context faithfulness, and measure answer relevance.

### Content
The dataset contains **30,000 synthetic RAG interactions** covering:

* **Text Data:** User Prompts, Retrieved Contexts, and LLM Responses.
* **Metadata:** Model Names, Temperature Settings, and Vector Similarity Scores.
* **Engineered Features:** Lexical Overlap, Entity Match Scores, and Complexity Indices.
* **Targets:**
  * Binary Hallucination flags
  * Multiclass Hallucination Types
  * Regression targets for Faithfulness

### Inspiration
This was inspired by the need for a practical ML benchmark where you can practice both feature engineering for tabular models (LightGBM, XGBoost) and text classification for NLP Transformers (BERT, DeBERTa) on the same dataset.

### Quick Load

```python
import pandas as pd

url = "https://huggingface.co/datasets/vkshdev/rag-hallucination-benchmark/raw/main/RAG_context_adherence_and_hallucination_benchmark.csv"
df = pd.read_csv(url)

print(df.head())