Skip to content

deepanshu83/HalluciScan

Repository files navigation

🔍 HalluciScan

Detect AI Hallucinations in Real-Time

Live Demo Next.js TypeScript Tailwind CSS

🚀 Live Demo📖 How It Works⚙️ Setup


🧠 What is HalluciScan?

HalluciScan is an AI-powered hallucination detection tool that analyzes AI-generated content and identifies factual errors, unsupported claims, and hallucinations in real-time. Paste any AI response and let HalluciScan verify it using Google Gemini and Groq's LLaMA models.


✨ Features

  • 🔬 Real-time Hallucination Detection — Analyze any AI-generated text instantly
  • 🌐 Multi-Model Analysis — Uses Google Gemini + Groq LLaMA for cross-verification
  • 📄 PDF Upload Support — Scan documents for AI-generated misinformation
  • 📊 Confidence Scoring — Get a hallucination confidence score per sentence
  • 🔦 Sentence Highlighting — Visual breakdown of flagged vs. verified claims
  • 📋 Evidence List — See the reasoning behind each flagged claim
  • 📱 Browser Extension — Detect hallucinations directly in your browser
  • 🌙 Dark Mode — Sleek dark-first design

🚀 Live Demo

👉 https://halluciscan.vercel.app


🛠️ Tech Stack

Technology Purpose
Next.js 16 Full-stack React framework
TypeScript Type safety
Tailwind CSS v4 Styling
Framer Motion Animations
Google Gemini API Primary AI analysis model
Groq (LLaMA) Secondary AI model for cross-verification

⚙️ Getting Started

1. Clone the repository

git clone https://github.com/deepanshu83/HalluciScan.git
cd HalluciScan

2. Install dependencies

npm install

3. Set up environment variables

Create a .env.local file in the root directory:

# Google Gemini API Key (get it from https://aistudio.google.com/app/apikey)
GOOGLE_API_KEY=your_google_api_key_here

# Groq API Key (get it from https://console.groq.com/keys)
GROQ_API_KEY=your_groq_api_key_here

# Optional: Override Gemini model (default: gemini-2.0-flash)
# GEMINI_MODEL=gemini-2.0-flash

4. Run the development server

npm run dev

Open http://localhost:3000 in your browser.


🔑 Getting API Keys

Key Where to Get
GOOGLE_API_KEY Google AI Studio
GROQ_API_KEY Groq Console

📁 Project Structure

halluciscan/
├── app/                  # Next.js App Router
│   ├── api/analyze/      # API route for hallucination analysis
│   ├── analyzer/         # Analyzer page
│   ├── dashboard/        # Dashboard page
│   ├── blog/             # Blog page
│   └── page.tsx          # Landing page
├── components/           # Reusable UI components
│   ├── landing/          # Landing page sections
│   ├── ResultPanel.tsx   # Analysis result display
│   ├── TextAnalyzer.tsx  # Text input analyzer
│   └── UploadPDF.tsx     # PDF upload component
├── lib/                  # Utility libraries
│   ├── geminiClient.ts   # Google Gemini API client
│   └── llamaClient.ts    # Groq LLaMA API client
├── extension/            # Browser extension source
└── public/               # Static assets

🌍 Deployment

This project is deployed on Vercel.

Deploy your own instance:

npm install -g vercel
vercel --prod

Don't forget to add your environment variables in the Vercel Dashboard under Settings → Environment Variables.


📜 License

MIT License © 2025 Deepanshu

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors