Skip to content

Valid8 is an AI-powered misinformation detection tool that verifies social media claims and online content. Users can input Tweet IDs, statements, or select text via a browser extension for real-time analysis. Powered by FastAPI, Pub/Sub, LLMs, and Groq, it delivers credibility scores, structured insights, and real-time updates.

Notifications You must be signed in to change notification settings

Psingle20/Valid8rs

Repository files navigation

VALID8RS

Valid8: AI-Powered Fact-Checking System

Valid8 is a fact-checking and analysis system that utilizes a completely open-source technology stack to verify information efficiently. It features a Uvicorn-powered FastAPI server that retrieves sources from DuckDuckGo, Google, and Wikipedia to provide reliable references.

The system can analyze tweets using their Tweet ID, making it easy to fact-check social media claims. Additionally, a browser extension enables users to select any text on a webpage and instantly analyze its credibility across the internet.

To process and structure retrieved data, the system leverages Groq for optimized querying. The information is then analyzed by mixtral-8x7b-32768 and llama-3.3-70b-versatile, both open-source LLMs, to determine the accuracy of the given fact.

You can check out the demo here

🌟 Features

  • Real-time Tweet Analysis: Fetch and analyze tweets instantly
  • Multi-Source Verification: Aggregate data from Google, DuckDuckGo, and Wikipedia
  • Chrome Extension : Chrome Extension For Quick Analysis throughout the Web
  • AI-Powered Analysis: Advanced claim verification using Groq AI
  • Source Credibility: Evaluate source reliability and relevance
  • Comprehensive Reports: Detailed fact-checking results with evidence
  • Engagement Analysis: Consider social context and virality
  • Async Processing: Handle multiple requests efficiently

🛠️ Architecture/System Design

Alt text

🚀 Quick Start

Prerequisites

  • Python 3.9+
  • Javascript
  • Twitter API Bearer Token
  • Groq API Key
  • GOOGLE_API_KEY
  • GOOGLE_CSE_ID
  • OCR_API_KEY
  • FastAPI
  • uvicorn
  • valkey
  • streamlit
  • Chromium Extension system

⚙️⬇️ Installation

  1. Clone the repository:
git clone https://github.com/Psingle20/Valid8rs.git
cd Valid8rs
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create .env file:
GROQ_API_KEY=your_groq_api_key
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
ENVIRONMENT=development
LOG_LEVEL=INFO
GOOGLE_CSE_ID=your_google_cse_id
GOOGLE_API_KEY=your_google_api_key
OCR_API_KEY= your OCR_API_KEY
  1. Run the application:
uvicorn app.main:app --reload

🐳💻 Docker Installation

  1. Clone the repository:
git clone https://github.com/Psingle20/Valid8rs.git
cd Valid8rs
  1. Create .env file:
GROQ_API_KEY=your_groq_api_key
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
ENVIRONMENT=development
LOG_LEVEL=INFO
GOOGLE_CSE_ID=your_google_cse_id
GOOGLE_API_KEY=your_google_api_key
OCR_API_KEY= your OCR_API_KEY

3.Build the Docker image

 docker build -t fastapi_image .
 docker run -d -p 8000:8000 fastapi_image:latest

🔗 Extension Setup

  1. Enable the Chrome Developer mode.

  2. Go to chrome extension window and click on load unpacked.

  3. From the file manager select the Valid8rs/extension folder.

  4. The extension is now enabled!

  5. Now select any text on any website and right click a menu will appear which contains Check for Misinformation option.

📖 API Documentation

Endpoints

Check Tweet

POST /api/v1/check/tweet
{
    "tweet_id": "1234567890",
    "background_check": false
}

Check Text

POST /api/v1/check/text
{
    "text": "Your text to fact check",
    "background_check": false
}

Get Check Status

GET /api/v1/check/{check_id}

Example Response

{
    "check_id": "uuid",
    "status": "completed",
    "started_at": "2024-11-24T12:00:00Z",
    "completed_at": "2024-11-24T12:00:30Z",
    "results": {
        "responses": [
            "Fact Check Results",
            "Evidence Analysis",
            "Source Analysis"
        ],
        "analysis": {
            "verdict": "True/False/Partially True",
            "confidence": "high/medium/low",
            // ... more analysis details
        }
    }
}

🏗️ Project Structure

Valid8rs/
├── app/
│   ├── api/
│   │   ├── routes.py      # API endpoints
│   │   ├── models.py      # Pydantic models
│   │   └── dependencies.py
│   ├── core/
│   │   ├── twitter.py     # Twitter integration
│   │   ├── search.py      # Search tools
│   │   ├── analysis.py    # Groq analysis
│   │   └── workflow.py    # Fact-check workflow
│   ├── services/
│   │   └── fact_checker.py
│   └── utils/
│       └── logging.py
├──frontend/
|       ├──Streamlit_app.py #frontend
|
├──extension/ #files related to extension
|
├──dockerfile # Docker setup
├── requirements.txt
├── .env.example
└── README.md

⚙️ Configuration

Environment Variables

Variable Description Required
GROQ_API_KEY Your Groq API key Yes
GOOGLE_CSE_ID Your Google CSE key Yes
GOOGLE_API_KEY Your Google API key Yes
OCR_API_KEY Your OCR API KEY Yes
TWITTER_BEARER_TOKEN Twitter API bearer token Yes
ENVIRONMENT development/production No
LOG_LEVEL INFO/DEBUG/WARNING/ERROR No
CACHE_TTL Cache time-to-live in seconds No
MAX_WORKERS Maximum worker threads No

|

About

Valid8 is an AI-powered misinformation detection tool that verifies social media claims and online content. Users can input Tweet IDs, statements, or select text via a browser extension for real-time analysis. Powered by FastAPI, Pub/Sub, LLMs, and Groq, it delivers credibility scores, structured insights, and real-time updates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •