MCPcopy Index your code
hub / github.com/exa-labs/exa-hallucination-detector

github.com/exa-labs/exa-hallucination-detector @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
39 symbols 83 edges 19 files 0 documented · 0% updated 7mo ago★ 330
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🔍 Hallucinations Detector

Powered by Exa.ai - The Search Engine for AIs

Screenshot

🎯 What is Hallucinations Detector?

Hallucinations Detector is a free and open-source tool that helps you verify the accuracy of your content instantly. Think of it as Grammarly, but for factual accuracy instead of grammar. It analyzes your content, identifies potential inaccuracies, and suggests corrections backed by reliable web sources.

✨ Key Features

  • Real-time fact checking of your LLM generated content
  • Source-backed verification
  • Detailed explanations for identified inaccuracies
  • Suggestion-based corrections

🛠️ How It Works

  1. Claim Extraction: When you input your content, the tool uses an LLM (Claude 3.5 Sonnet) to break down your text into individual claims.

  2. Source Verification: Each claim is checked using Exa’s search tool to find reliable sources online that either support or refute it.

  3. Accuracy Analysis: The claims and their corresponding sources are analyzed by our LLM to determine their accuracy.

  4. Results Display: Finally, we show the results in a simple, clear way, pointing out any mistakes and offering suggestions to fix them.

💻 Tech Stack

🚀 Getting Started

Prerequisites

  • Node.js
  • API keys for Exa.ai and Anthropic

Installation

  1. Clone the repository
git clone https://github.com/exa-labs/exa-hallucination-detector.git
cd exa-hallucination-detector
````

2.  Install dependencies


npm install

or

yarn install


3.  Set up environment variables Create a `.env.local` file in the root directory and add your API keys:


EXA_API_KEY=your_exa_api_key ANTHROPIC_API_KEY=your_anthropic_api_key


4.  Run the development server


npm run dev

or

yarn dev ```

  1. Open http://localhost:3000/hallucination-detector in your browser

🔑 API Keys

⭐ About Exa.ai

This project is powered by Exa.ai, a cutting-edge search engine designed specifically for AI applications. Exa provides:

  • Advanced semantic and keyword-based search capabilities

  • Instant retrieval of clean web content

  • Customizable search parameters

  • Similarity search using URLs or text

  • Superior search capabilities compared to traditional search APIs

Try Exa search


Built with ❤️ by team Exa

Extension points exported contracts — how you extend this code

Claim (Interface)
(no doc)
components/PreviewClaimCard.tsx
Claim (Interface)
(no doc)
components/PreviewBox.tsx
Claim (Interface)
(no doc)
components/FactChecker.tsx
ClaimsListResult (Interface)
(no doc)
components/ClaimsListResult.tsx
TagPillProps (Interface)
(no doc)
components/ui/TagPill.tsx
PreviewClaimCardProps (Interface)
(no doc)
components/PreviewClaimCard.tsx
PreviewBoxProps (Interface)
(no doc)
components/PreviewBox.tsx
ClaimsListResultsProps (Interface)
(no doc)
components/ClaimsListResult.tsx

Core symbols most depended-on inside this repo

getAssetPath
called by 4
lib/utils.ts
cn
called by 2
lib/utils.ts
highlightClaims
called by 1
components/PreviewBox.tsx
scrollToLoading
called by 1
components/FactChecker.tsx
adjustTextareaHeight
called by 1
components/FactChecker.tsx
extractClaims
called by 1
components/FactChecker.tsx
exaSearch
called by 1
components/FactChecker.tsx
verifyClaim
called by 1
components/FactChecker.tsx

Shape

Function 31
Interface 8

Languages

TypeScript100%

Modules by API surface

components/FactChecker.tsx9 symbols
components/PreviewBox.tsx6 symbols
components/ui/ShareButtons.tsx4 symbols
components/ClaimsListResult.tsx4 symbols
components/PreviewClaimCard.tsx3 symbols
lib/utils.ts2 symbols
components/ui/TagPill.tsx2 symbols
middleware.ts1 symbols
components/ui/skeleton.tsx1 symbols
components/ui/animated-gradient-text.tsx1 symbols
components/ui/LoadingMessages.tsx1 symbols
app/page.tsx1 symbols

For agents

$ claude mcp add exa-hallucination-detector \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page