🙋🏻‍♂️Welcome to 🌟Tonic's 🥬 LettuceDetect - 🤯🧠 Hallucination Tester 🟢🔴

Powered by lettucedect-large-modernbert-en-v1 from KRLabsOrg. Detect hallucinations in answers based on context and questions using ModernBERT with 8192-token context support!

Model Details

  • Model Name: lettucedect-large-modernbert-en-v1
  • Organization: KRLabsOrg
  • Github: https://github.com/KRLabsOrg/LettuceDetect
  • Architecture: ModernBERT (Large) with extended context support up to 8192 tokens
  • Task: Token Classification / Hallucination Detection
  • Training Dataset: RagTruth
  • Language: English
  • Capabilities: Detects hallucinated spans in answers, provides confidence scores, and calculates average confidence across detected spans.
    LettuceDetect excels at processing long documents to determine if an answer aligns with the provided context, making it a powerful tool for ensuring factual accuracy.

Understanding the Output

  • Status:
    • 🟢 = No hallucinations detected
    • 🔴 = Hallucinations detected
    • ⚪ = Error occurred
  • Explanation: A brief summary of the result.
  • Highlighted Answer: Shows the answer with hallucinated parts in red, labeled with confidence scores (e.g., "hallucination (conf: 0.9944)").
  • Hallucinated Spans & Confidence: Lists each hallucinated segment with its confidence score.
  • Average Confidence: Displays the average confidence of all detected hallucinations (e.g., "Average Confidence: 0.9944").
    Use this tool to ensure your answers are grounded in reality!

How to Use LettuceDetect Tester

  1. Enter a Context: Provide the source text or document (e.g., "France is a country in Europe..."). This is the factual basis for evaluation.
  2. Enter a Question: Ask something related to the context (e.g., "What is the capital of France?").
  3. Enter an Answer: Input the response you want to check (e.g., "The capital of France is Paris. The population is 69 million.").
  4. Press Submit: Analyze the answer for hallucinations!

Join us:

🌟TeamTonic🌟 is always making cool demos! Join our active builder's 🛠️community 👻 Join us on Discord On 🤗Huggingface: MultiTransformer On 🌐Github: Tonic-AI & contribute to🌟 Data Tonic 🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant 🤗

Example

Examples
Context Question Answer