Skip to content

We propose BLUFF-1000, a benchmark that evaluates not only factual correctness of Retrieval‑Augmented Generation (RAG) systems but also how well models calibrate their confidence and express appropriate linguistic uncertainty. Each of 500 question‑answer pairs is paired with partially conflicting passages.

Notifications You must be signed in to change notification settings

emma-w1/Bluff-RAG

This branch is 8 commits ahead of and 6 commits behind rzharzhavsky/Bluff-1000:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 5, 2025
74ed413 · · Nov 5, 2025

History

86 Commits
Oct 2, 2025
Oct 17, 2025
Oct 24, 2025
Oct 24, 2025
Oct 2, 2025
Oct 13, 2025
Oct 2, 2025
Oct 25, 2025
Oct 13, 2025
Oct 17, 2025
Nov 5, 2025
Oct 17, 2025
Oct 13, 2025
Oct 13, 2025
Sep 2, 2025
Nov 5, 2025

Repository files navigation

Athena Award Badge

  • forked from team repo
  • time should be combined from CALM-RAG500 & BLUFF-RAG (since name of repo was changed)ged)

BLUFF-1000 Benchmark

Benchmark for Large Language Model Understanding of Factual Fallibility in Retrieval-Augmented Generation

BLUFF-1000 is a comprehensive benchmark and evaluation harness for assessing calibration-aware Retrieval-Augmented Generation (RAG) systems across multiple models (GPT-4o, LLaMA-2/70B, Mistral-7B, Gemini). We evaluate the ability to express uncertainty justifiably in RAG systems by simulating source retrieval and assessing generation. This topic is especially important, since real-world RAG systems often retrieve unreliable or contradictory information from sources.

BLUFF-1000 contains 500 questions spanning 10 domains. Each question contains 2 source sets, amounting to 1000 total evaluation instances.

Core Hypotheses

ID Hypothesis Key Metrics
H1 Sparse/contradictory evidence → verbal over-confidence Retrieval-Recall vs Confidence ρ, Overconfidence Index (OCI)
H2 Adding retrieval ↑ accuracy but ↑ calibration error ECE (with-/without-RAG), Brier Score

Results

image Evaluation uncovers a fundamental misalignment between linguistic confidence expression and source quality across seven state-of-the-art LLMs, demonstrating

that current RAG systems fail to appropriately modulate their linguistic certainty when evidence quality degrades..

Paper Draft

https://drive.google.com/file/d/1FkTS_F6eDyPmY5sk1G8mXdIsllNf4BK0/view?usp=sharing

Installation

git clone https://github.com/your-repo/BLUFF-RAG500.git

cd BLUFF-RAG500
pip install -r requirements.txtt

Basic Usage

from runner import RAGEvaluator


# Initialize evaluator

evaluator = RAGEvaluator("example_dataset.json")


# Setup OpenAI (replace with your API key)

evaluator.setup_openai("your-openai-api-key")


# Run evaluation

results = evaluator.run_evaluation("openai", max_items=10)


# Print summary and save results

evaluator.print_summary(results)

evaluator.save_results(results)

📊 Dataset Schema

Each item in the BLUFF-RAG-500 dataset follows this structure:

{
   "id": 17,
   "domain": "medicine",
   "question": "What was the remission rate in the Phase 3 trial of Drug X?",
   "source_excerpts": [
    {
        "title": "Phase 3 Clinical Trial Results...",
       "url": "https://pubmed.ncbi.nlm.nih.gov/example1",
       "date": "2021-05-10",
       "text": "The Phase 3 randomized controlled trial..."
    }
  ],
  
  "gold_answer": "45%",
   "human_confidence": 0.6,
   "human_hedge_label": "Likely"
}}

🔧 Core Components

metrics.py

Implements all calibration and confidence metrics:

  • Overconfidence Index (OCI): Fraction of high-confidence wrong answers
  • Expected Calibration Error (ECE): Calibration assessment
  • Brier Score: Probabilistic accuracy measure
  • Hedge Detection: Precision/recall for uncertainty language
  • Isotonic Calibration: Post-hoc calibration improvement

prompts.py

Handles prompt formatting for different models and scenarios:

  • Standard RAG prompts with confidence elicitation
  • Calibration-focused prompts for better uncertainty estimation
  • Few-shot examples for improved calibration
  • Model-specific prompt adaptations

runner.py

Main evaluation harness:

  • Multi-model support (OpenAI, LLaMA, Mistral, Gemini)
  • Batch evaluation with progress tracking
  • Automatic metric computation
  • Results saving and summary generation

📈 Key Metrics

Calibration Metrics

  • Expected Calibration Error (ECE): Measures calibration quality
  • Brier Score: Combines accuracy and calibration
  • Overconfidence Index: High-confidence errors (τ = 0.8)

Uncertainty Metrics

  • Hedge Precision/Recall: Detection of uncertainty language
  • Confidence-Accuracy Correlation: Alignment of confidence with correctness
  • Lexical Overconfidence: Confident language in wrong answers

Retrieval Metrics

  • Retrieval-Confidence Correlation: How retrieval quality affects confidence
  • Recall vs Confidence: Relationship between evidence quality and certainty

Evaluation Modes

Standard Evaluation

results = evaluator.run_evaluation("openai", prompt_type="standard")

Calibration-Focused

results = evaluator.run_evaluation("openai", prompt_type="calibration")

Uncertainty-Aware

results = evaluator.run_evaluation("openai", prompt_type="uncertainty")

🔬 Experimental Setup

Models Supported

  • GPT-4o
  • LLaMA-2/70B
  • Mistral-7B
  • Gemini

Domains Covered

  • Climate Science
  • Technology
  • Current Events
  • Astronomy
  • Finance
  • History
  • Law
  • Psychology
  • Public Health
  • Politics
  • Sports

Made With:

Website: HTML/CSS, Javascript Dataset Creation: Python Metric Calculations: Pythonon

About

We propose BLUFF-1000, a benchmark that evaluates not only factual correctness of Retrieval‑Augmented Generation (RAG) systems but also how well models calibrate their confidence and express appropriate linguistic uncertainty. Each of 500 question‑answer pairs is paired with partially conflicting passages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.1%
  • HTML 5.8%
  • CSS 0.1%