Skip to content
Harshkamdar67Public

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation

Nishpaksh

Agentic AI fact checking assistant, right in your whatsapp

Nishpaksh is an advanced fact checking system that verifies claims, images, and articles in real-time through WhatsApp. It leverages AI orchestration, multi-source verification, and visual analysis to fight misinformation.

Links :

Static Business Model Dashboard Explains our proposed business model:

  • Misinformation trending dashboard : This is to show what are the most trending topics/news that are victims of widespread misinformation, can be sold to media houses and government to tackle and respond to it swiftly
  • Trending by category : Shows what category of news have what share of misinformation and how fast it is spreading
  • Platform wide distribution : Which category of misinformation is more pertinent in which platform
  • Org level trend monenitization : We can use the trends to show organizations how much misinformation about them is being spread, to give them a insight on the percentage of mentions to their org in a particular period of time.
  • Live alerts and anomalies : Can be used to detect any shift in known patterns to suggest a misinformation campaign or propaganda, can be used by governments as a early warning system.
  • Narrative intelligence : A quick read section to give them a quick summary of the current leading narratives, can be used by a number of organizations, media houses to leverage the current trending narratives amongst people

Note : The business model we propose does not include selling user data to organizations but the patterns and trends related to misinformation and its spread collected over time.

Deplpyed Knowledge Graph Username : neo4j password : nishpaksh

This is the deployed Knowledge graph we use to ground our agents reasoning on official policy documents collected from various sources

Features

Core Capabilities

  • Text Claim Verification - Fact-check text messages using multi-source web search and AI analysis
  • Image Verification - Reverse image search, visual content analysis, and source tracking using Google Cloud Vision API
  • URL Article Checking - Scrape and verify web articles for accuracy
  • Conversational AI - Natural follow-up questions with context-aware responses
  • Multi-Source Cross-Verification - Aggregates data from multiple sources for comprehensive fact-checking

Technical Features

  • Iterative AI Orchestrator - Single agent orchestrator using Pydantic AI for intelligent fact-checking workflows
  • Session Management - Per-user conversation history and context tracking
  • Rate Limiting - Configurable query limits to prevent abuse
  • Command Interface - Built-in commands for history, status, and help
  • Real-time Analytics Dashboard - Next.js dashboard for monitoring misinformation trends

Architecture

Backend (FastAPI)

  • WhatsApp Integration - Cloud Functions-ready FastAPI webhook for WhatsApp Business API
  • AI Orchestration - Pydantic AI agent with Google GenAI/OpenAI models
  • Knowledge Graph - Neo4j-based policy and fact storage
  • Web Scraping - Crawl4AI service for intelligent content extraction
  • Search Services - DuckDuckGo integration for multi-source verification

Frontend (Next.js Dashboard)

  • Real-time Monitoring - Track misinformation trends across platforms
  • Category Analytics - Visualize distribution of misinformation themes
  • Client Reports - Organization-specific fact-check reports
  • Alert System - Live feed of emerging narratives

Services

services/
├── image_fact_checker.py      # Vision API + reverse image search
├── duckduckgo_service.py      # Web search integration
├── crawl4ai_service.py        # Intelligent web scraping
├── kg_search_agent.py         # Knowledge graph queries
├── content_relevancy.py       # AI-powered relevance scoring
├── model_utils_service.py     # LLM utilities
└── ollama_relevancy.py        # Local model support

Usage

WhatsApp Commands

Users can interact with the bot using these commands:

  • /help - Show available commands and usage instructions
  • /history - View recent conversation history
  • /clear - Clear conversation history and start fresh
  • /status - Check rate limit status and remaining queries
  • /about - Learn about Nishpaksh features

Fact-Checking Workflows

Text Claims:

User: "Is it true that Delhi had a blast near Red Fort today?"
Bot: [Analyzes claim, searches multiple sources, returns verdict with confidence score]

Image Verification:

User: [Sends image with caption: "This is from today's Delhi blast"]
Bot: [Performs reverse image search, analyzes visual content, checks publication dates]

Article Verification:

User: "https://example.com/news-article"
Bot: [Scrapes article, cross-references claims, verifies with multiple sources]

Project Structure

Nishpaksh/
├── main.py                      # FastAPI application & WhatsApp webhook
├── requirements.txt             # Python dependencies
├── Dockerfile                   # Container configuration
│
├── agent/                       # AI Orchestration
│   ├── orchestrator.py         # Main fact-checking agent
│   └── retry_utils.py          # Error handling utilities
│
├── services/                    # Core Services
│   ├── image_fact_checker.py   # Image verification engine
│   ├── duckduckgo_service.py   # Web search
│   ├── crawl4ai_service.py     # Web scraping
│   ├── kg_search_agent.py      # Knowledge graph queries
│   ├── content_relevancy.py    # Content scoring
│   ├── model_utils_service.py  # LLM utilities
│   └── ollama_relevancy.py     # Local model support
│
├── graph_builder/               # Knowledge Graph ETL
│   └── pipelines/              # Data ingestion pipelines
│
├── scripts/                     # Testing & Utilities
│   ├── test_orchestrator_agent.py
│   ├── test_image_search.py
│   └── test_gcs_upload.py
│
└── dashboard-ui/                # Next.js Dashboard
    ├── app/                    # Next.js 14 App Router
    ├── components/             # React components
    └── data/                   # Mock data

Development

Running Tests

# Test orchestrator
python scripts/test_orchestrator_agent.py

# Test image search
python scripts/test_image_search.py

# Test web scraping
curl -X POST http://localhost:8000/test-scrape

Technologies

Backend

  • FastAPI - Modern async web framework
  • Pydantic AI - AI agent orchestration
  • Google Cloud Vision - Image analysis
  • Crawl4AI - Intelligent web scraping with Playwright
  • DuckDuckGo - Privacy-focused search
  • Neo4j - Knowledge graph database
  • httpx - Async HTTP client

Frontend

  • Next.js 14 - React framework with App Router
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first styling
  • Lucide React - Icon library

AI/ML

  • Google GenAI (openai/gpt-oss-120b-maas)
  • OpenAI GPT 5.1 for high level reasoning and critique agent tasks
  • Ollama (local models)
  • GCP hosted GPT oss 120b model for main orchestration and decision making

Roadmap

  • Video verification support
  • Audio/voice message analysis
  • Document fact-checking (PDFs, Word docs)
  • Real-time trending misinformation detection
  • API for third-party integrations

Fighting misinformation, one fact at a time. 🛡️

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages