Update README.md
Browse files
README.md
CHANGED
|
@@ -9,6 +9,203 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
| 11 |
short_description: Multi Agentic Claim Verification System - Track 1
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
| 11 |
short_description: Multi Agentic Claim Verification System - Track 1
|
| 12 |
+
tags: ["mcp-server-track"]
|
| 13 |
---
|
| 14 |
|
| 15 |
+
|
| 16 |
+
# ๐ Multi-Agent Claim Verification System using Kognie API
|
| 17 |
+
|
| 18 |
+
An intelligent, multi-agent MCP server 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.
|
| 19 |
+
|
| 20 |
+
Visit : https://kognie.com/api to create a Kognie API key to gain access to multiple LLMs with one single account.
|
| 21 |
+
|
| 22 |
+
## ๐ฝ๏ธ Demo video
|
| 23 |
+
We have used Github Copilot as the MCP client for our MCP server.
|
| 24 |
+
|
| 25 |
+
**URL** : https://drive.google.com/file/d/1-vczaQAsA9-wxwzlg91fCrQT18JYkmN6/view?usp=sharing
|
| 26 |
+
|
| 27 |
+
**MCP client model** : Claude 3.7 Sonnet
|
| 28 |
+
|
| 29 |
+
## ๐ฏ Purpose
|
| 30 |
+
|
| 31 |
+
In an era of information overload and misinformation, this system serves as a robust fact-checking tool that:
|
| 32 |
+
|
| 33 |
+
- **Verifies claims** using multiple AI perspectives
|
| 34 |
+
- **Gathers real-time evidence** from web sources
|
| 35 |
+
- **Provides balanced analysis** with supporting and contradicting evidence
|
| 36 |
+
- **Makes informed decisions** based on comprehensive data analysis
|
| 37 |
+
- **Presents results** in an intuitive, interactive web interface
|
| 38 |
+
|
| 39 |
+
## ๐๏ธ System Architecture
|
| 40 |
+
|
| 41 |
+
The system employs a **hierarchical multi-agent architecture** with specialized roles:
|
| 42 |
+
|
| 43 |
+
### ๐ค Agent Specifications
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
#### 1. **MultiLLM Verifier Agent**
|
| 47 |
+
- **Model**: Claude-3.5-Sonnet (Anthropic)
|
| 48 |
+
- **Role**: Cross-model evidence analysis
|
| 49 |
+
- **Responsibilities**:
|
| 50 |
+
- Coordinates multiple LLM perspectives
|
| 51 |
+
- Runs parallel analysis across different AI models
|
| 52 |
+
- Provides diverse viewpoints on claims
|
| 53 |
+
- **Internal process**:
|
| 54 |
+
The system leverages **three distinct AI models** for comprehensive analysis:
|
| 55 |
+
|
| 56 |
+
| Model | Provider | Strengths |
|
| 57 |
+
|-------|----------|-----------|
|
| 58 |
+
| **GPT-4o-mini** | Kognie API | Fast reasoning, general knowledge |
|
| 59 |
+
| **Gemini-2.0-Flash** | Kognie API | Multimodal capabilities, recent training |
|
| 60 |
+
| **Open-Mistral-Nemo** | Kognie API | European perspective, specialized domains |
|
| 61 |
+
|
| 62 |
+
##### Parallel Processing Benefits
|
| 63 |
+
- **Diverse Perspectives**: Each model brings unique training and biases
|
| 64 |
+
- **Cross-Validation**: Multiple viewpoints reduce single-model limitations
|
| 65 |
+
- **Speed**: Asynchronous processing ensures rapid results
|
| 66 |
+
- **Robustness**: System continues functioning even if one model fails
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
#### 2. **Web Evidence Retriever Agent**
|
| 70 |
+
- **Model**: Claude-3.5-Sonnet (Anthropic)
|
| 71 |
+
- **Role**: Real-time information gathering
|
| 72 |
+
- **Responsibilities**:
|
| 73 |
+
- Searches current web sources
|
| 74 |
+
- Retrieves up-to-date information
|
| 75 |
+
- Provides context-aware evidence
|
| 76 |
+
- **Internal process**:
|
| 77 |
+
##### Real-Time Evidence Gathering
|
| 78 |
+
- **Bing Search API** integration for current information
|
| 79 |
+
- **News source prioritization** for recent developments
|
| 80 |
+
- **Automated query generation** based on claim analysis
|
| 81 |
+
- **Evidence categorization** (supporting vs. contradicting)
|
| 82 |
+
|
| 83 |
+
##### Search Strategy
|
| 84 |
+
1. **Query Optimization**: Transforms claims into effective search terms
|
| 85 |
+
2. **Source Diversification**: Gathers information from multiple web sources
|
| 86 |
+
3. **Recency Prioritization**: Focuses on current and relevant information
|
| 87 |
+
4. **Result Synthesis**: Analyzes and structures findings
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
#### 3. **Boss Agent** (Coordinator)
|
| 91 |
+
- **Model**: GPT-4o (OpenAI)
|
| 92 |
+
- **Role**: Final decision maker and coordinator
|
| 93 |
+
- **Responsibilities**:
|
| 94 |
+
- Orchestrates other agents
|
| 95 |
+
- Synthesizes evidence from multiple sources
|
| 96 |
+
- Makes final verification decisions
|
| 97 |
+
- Formats results in HTML for presentation
|
| 98 |
+
|
| 99 |
+
## ๐ป User Interface
|
| 100 |
+
|
| 101 |
+
### Interactive Web Interface (Gradio)
|
| 102 |
+
- **Chat-based interaction** for natural claim submission
|
| 103 |
+
- **Real-time processing** with progress indicators
|
| 104 |
+
- **Collapsible analysis sections** for detailed evidence review
|
| 105 |
+
- **Color-coded results** (Green for TRUE, Red for FALSE)
|
| 106 |
+
- **Responsive design** for various devices
|
| 107 |
+
|
| 108 |
+
### Key Features
|
| 109 |
+
- **Instant verification** results
|
| 110 |
+
- **Detailed evidence breakdown** from each agent
|
| 111 |
+
- **Interactive expandable sections** for in-depth analysis
|
| 112 |
+
- **Clean, professional presentation** of complex data
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
## ๐ Getting Started
|
| 116 |
+
|
| 117 |
+
### Prerequisites
|
| 118 |
+
```bash
|
| 119 |
+
pip install gradio llama-index python-dotenv asyncio
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
### Environment Variables
|
| 123 |
+
Create a `.env` file with the following:
|
| 124 |
+
```env
|
| 125 |
+
KOGNIE_BASE_URL=your_kognie_base_url
|
| 126 |
+
KOGNIE_API_KEY=your_kognie_api_key
|
| 127 |
+
BING_SUBSCRIPTION_KEY=your_bing_api_key
|
| 128 |
+
BING_SEARCH_URL=your_bing_search_url
|
| 129 |
+
ANTHROPIC_API_KEY=your_anthropic_api_key
|
| 130 |
+
OPENAI_API_KEY=your_openai_api_key
|
| 131 |
+
MISTRAL_API_KEY=your_mistral_api_key
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
### Running the Application
|
| 135 |
+
```bash
|
| 136 |
+
gradio app.py
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
The system will launch a web interface accessible through your browser.
|
| 140 |
+
|
| 141 |
+
## ๐ฏ Use Cases
|
| 142 |
+
|
| 143 |
+
### Perfect For:
|
| 144 |
+
- **Fact-checking news claims**
|
| 145 |
+
- **Academic research verification**
|
| 146 |
+
- **Social media post validation**
|
| 147 |
+
- **Business claim analysis**
|
| 148 |
+
- **Educational fact verification**
|
| 149 |
+
- **Journalism and reporting**
|
| 150 |
+
|
| 151 |
+
### Example Claims:
|
| 152 |
+
- "Company X reported record profits in Q4 2024"
|
| 153 |
+
- "New scientific study proves Y causes Z"
|
| 154 |
+
- "Political candidate made statement about policy"
|
| 155 |
+
- "Sports team won championship in specific year"
|
| 156 |
+
|
| 157 |
+
## ๐ฎ Technical Advantages
|
| 158 |
+
|
| 159 |
+
### 1. **Asynchronous Processing**
|
| 160 |
+
- Non-blocking operations for faster results
|
| 161 |
+
- Concurrent agent execution
|
| 162 |
+
- Responsive user interface
|
| 163 |
+
|
| 164 |
+
### 2. **Error Resilience**
|
| 165 |
+
- Graceful handling of API failures
|
| 166 |
+
- Fallback mechanisms for each component
|
| 167 |
+
- Comprehensive error logging
|
| 168 |
+
|
| 169 |
+
### 3. **Scalable Architecture**
|
| 170 |
+
- Easy addition of new AI models
|
| 171 |
+
- Modular agent design
|
| 172 |
+
- Configurable processing parameters
|
| 173 |
+
|
| 174 |
+
### 4. **Evidence Transparency**
|
| 175 |
+
- Complete audit trail of analysis
|
| 176 |
+
- Source attribution for all evidence
|
| 177 |
+
- Detailed reasoning for decisions
|
| 178 |
+
|
| 179 |
+
## ๐ก๏ธ Quality Assurance
|
| 180 |
+
|
| 181 |
+
### Multi-Layer Verification
|
| 182 |
+
1. **Cross-Model Validation**: Multiple AI perspectives
|
| 183 |
+
2. **Real-Time Research**: Current information priority
|
| 184 |
+
3. **Evidence Weighting**: Web sources prioritized for recent events
|
| 185 |
+
4. **Transparent Reasoning**: Complete decision audit trail
|
| 186 |
+
|
| 187 |
+
### Bias Mitigation
|
| 188 |
+
- **Model Diversity**: Different training approaches and datasets
|
| 189 |
+
- **Source Variety**: Multiple web sources and perspectives
|
| 190 |
+
- **Temporal Awareness**: Prioritizes recent information
|
| 191 |
+
- **Evidence Balance**: Seeks both supporting and contradicting evidence
|
| 192 |
+
|
| 193 |
+
## ๐ง Customization Options
|
| 194 |
+
|
| 195 |
+
The system is designed for easy customization:
|
| 196 |
+
- **Add new AI models** to the MultiLLM verifier
|
| 197 |
+
- **Integrate additional search engines** beyond Bing
|
| 198 |
+
- **Modify decision-making logic** in the Boss Agent
|
| 199 |
+
- **Customize UI themes** and presentation styles
|
| 200 |
+
- **Adjust evidence weighting** algorithms
|
| 201 |
+
|
| 202 |
+
## ๐ค Contributing
|
| 203 |
+
|
| 204 |
+
This system represents a foundation for intelligent claim verification. Areas for enhancement include:
|
| 205 |
+
- Additional AI model integrations
|
| 206 |
+
- Advanced evidence scoring algorithms
|
| 207 |
+
- Specialized domain knowledge bases
|
| 208 |
+
- Multi-language support
|
| 209 |
+
- API endpoint creation
|
| 210 |
+
|
| 211 |
+
|