Powered by Exa.ai - The Search Engine for AIs
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.
- Real-time fact checking of your LLM generated content
- Source-backed verification
- Detailed explanations for identified inaccuracies
- Suggestion-based corrections
-
Claim Extraction: When you input your content, the tool uses an LLM (Claude 3.5 Sonnet) to break down your text into individual claims.
-
Source Verification: Each claim is checked using Exa’s search tool to find reliable sources online that either support or refute it.
-
Accuracy Analysis: The claims and their corresponding sources are analyzed by our LLM to determine their accuracy.
-
Results Display: Finally, we show the results in a simple, clear way, pointing out any mistakes and offering suggestions to fix them.
- Search Engine: Exa.ai - Advanced web search API for AI applications
- Frontend: Next.js with App Router, TailwindCSS, TypeScript
- LLM: Anthropic's Claude 3.5 Sonnet - but you can use any LLM (ex: gpt, gemini, llama or others)
- AI Integration: Vercel AI SDK
- Hosting: Vercel for hosting and analytics
- Node.js
- API keys for Exa.ai and Anthropic
- Clone the repository
git clone https://github.com/exa-labs/exa-hallucination-detector.git
cd exa-hallucination-detector
- Install dependencies
npm install
# or
yarn install
- 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
- Run the development server
npm run dev
# or
yarn dev
- Open http://localhost:3000/hallucination-detector in your browser
-
Get your Exa API key from Exa Dashboard
-
Get your Anthropic API key from Anthropic Documentation
⭐ 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
Built with ❤️ by team Exa