--- title: AgenticClaimVerificationSystem emoji: 🔥 colorFrom: purple colorTo: red sdk: gradio sdk_version: 5.33.1 app_file: app.py pinned: false short_description: Multi Agentic Claim Verification System tags: ["agent-demo-track"] --- # 🔍 Multi-Agent Claim Verification System using Kognie API An intelligent, multi-agent system designed to verify claims using diverse AI models and real-time web research. This system combines the power of multiple language models with web search capabilities to provide comprehensive fact-checking and evidence analysis. Visit : https://kognie.com/api to create a Kognie API key to gain access to multiple LLMs with one single account. ## 📽️ Demo videos Showcasing the app and explaining the architecture under the hood of the claim verification system. **URL** : https://drive.google.com/file/d/10L3T1Hvie9D6XqMI7H80hCp98iVuP3Nm/view?usp=sharing ## 🎯 Purpose In an era of information overload and misinformation, this system serves as a robust fact-checking tool that: - **Verifies claims** using multiple AI perspectives - **Gathers real-time evidence** from web sources - **Provides balanced analysis** with supporting and contradicting evidence - **Makes informed decisions** based on comprehensive data analysis - **Presents results** in an intuitive, interactive web interface ## 🏗️ System Architecture The system employs a **hierarchical multi-agent architecture** with specialized roles: ### 🤖 Agent Specifications #### 1. **MultiLLM Verifier Agent** - **Model**: Claude-3.5-Sonnet (Anthropic) - **Role**: Cross-model evidence analysis - **Responsibilities**: - Coordinates multiple LLM perspectives - Runs parallel analysis across different AI models - Provides diverse viewpoints on claims - **Internal process**: The system leverages **three distinct AI models** for comprehensive analysis: | Model | Provider | Strengths | |-------|----------|-----------| | **GPT-4o-mini** | Kognie API | Fast reasoning, general knowledge | | **Gemini-2.0-Flash** | Kognie API | Multimodal capabilities, recent training | | **Open-Mistral-Nemo** | Kognie API | European perspective, specialized domains | ##### Parallel Processing Benefits - **Diverse Perspectives**: Each model brings unique training and biases - **Cross-Validation**: Multiple viewpoints reduce single-model limitations - **Speed**: Asynchronous processing ensures rapid results - **Robustness**: System continues functioning even if one model fails #### 2. **Web Evidence Retriever Agent** - **Model**: Claude-3.5-Sonnet (Anthropic) - **Role**: Real-time information gathering - **Responsibilities**: - Searches current web sources - Retrieves up-to-date information - Provides context-aware evidence - **Internal process**: ##### Real-Time Evidence Gathering - **Bing Search API** integration for current information - **News source prioritization** for recent developments - **Automated query generation** based on claim analysis - **Evidence categorization** (supporting vs. contradicting) ##### Search Strategy 1. **Query Optimization**: Transforms claims into effective search terms 2. **Source Diversification**: Gathers information from multiple web sources 3. **Recency Prioritization**: Focuses on current and relevant information 4. **Result Synthesis**: Analyzes and structures findings #### 3. **Boss Agent** (Coordinator) - **Model**: GPT-4o (OpenAI) - **Role**: Final decision maker and coordinator - **Responsibilities**: - Orchestrates other agents - Synthesizes evidence from multiple sources - Makes final verification decisions - Formats results in HTML for presentation ## 💻 User Interface ### Interactive Web Interface (Gradio) - **Chat-based interaction** for natural claim submission - **Real-time processing** with progress indicators - **Collapsible analysis sections** for detailed evidence review - **Color-coded results** (Green for TRUE, Red for FALSE) - **Responsive design** for various devices ### Key Features - **Instant verification** results - **Detailed evidence breakdown** from each agent - **Interactive expandable sections** for in-depth analysis - **Clean, professional presentation** of complex data ## 🚀 Getting Started ### Prerequisites ```bash pip install gradio llama-index python-dotenv asyncio ``` ### Environment Variables Create a `.env` file with the following: ```env KOGNIE_BASE_URL=your_kognie_base_url KOGNIE_API_KEY=your_kognie_api_key BING_SUBSCRIPTION_KEY=your_bing_api_key BING_SEARCH_URL=your_bing_search_url ANTHROPIC_API_KEY=your_anthropic_api_key OPENAI_API_KEY=your_openai_api_key MISTRAL_API_KEY=your_mistral_api_key ``` ### Running the Application ```bash gradio app.py ``` The system will launch a web interface accessible through your browser. ## 🎯 Use Cases ### Perfect For: - **Fact-checking news claims** - **Academic research verification** - **Social media post validation** - **Business claim analysis** - **Educational fact verification** - **Journalism and reporting** ### Example Claims: - "Company X reported record profits in Q4 2024" - "New scientific study proves Y causes Z" - "Political candidate made statement about policy" - "Sports team won championship in specific year" ## 🔮 Technical Advantages ### 1. **Asynchronous Processing** - Non-blocking operations for faster results - Concurrent agent execution - Responsive user interface ### 2. **Error Resilience** - Graceful handling of API failures - Fallback mechanisms for each component - Comprehensive error logging ### 3. **Scalable Architecture** - Easy addition of new AI models - Modular agent design - Configurable processing parameters ### 4. **Evidence Transparency** - Complete audit trail of analysis - Source attribution for all evidence - Detailed reasoning for decisions ## 🛡️ Quality Assurance ### Multi-Layer Verification 1. **Cross-Model Validation**: Multiple AI perspectives 2. **Real-Time Research**: Current information priority 3. **Evidence Weighting**: Web sources prioritized for recent events 4. **Transparent Reasoning**: Complete decision audit trail ### Bias Mitigation - **Model Diversity**: Different training approaches and datasets - **Source Variety**: Multiple web sources and perspectives - **Temporal Awareness**: Prioritizes recent information - **Evidence Balance**: Seeks both supporting and contradicting evidence ## 🔧 Customization Options The system is designed for easy customization: - **Add new AI models** to the MultiLLM verifier - **Integrate additional search engines** beyond Bing - **Modify decision-making logic** in the Boss Agent - **Customize UI themes** and presentation styles - **Adjust evidence weighting** algorithms