File size: 7,108 Bytes
47d1bbd
974e50b
 
47d1bbd
 
 
 
 
 
 
974e50b
488d25c
47d1bbd
 
488d25c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
---
title: Claim Verfication System using Kognie API
emoji: ๐Ÿš€
colorFrom: yellow
colorTo: blue
sdk: gradio
sdk_version: 5.33.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: Multi Agentic Claim Verification System - Track 1
tags: ["mcp-server-track"]
---


# ๐Ÿ” Multi-Agent Claim Verification System using Kognie API

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.

Visit : https://kognie.com/api to create a Kognie API key to gain access to multiple LLMs with one single account.

## ๐Ÿ“ฝ๏ธ Demo video
We have used Github Copilot as the MCP client for our MCP server.

**URL** : https://drive.google.com/file/d/1-vczaQAsA9-wxwzlg91fCrQT18JYkmN6/view?usp=sharing

**MCP client model** : Claude 3.7 Sonnet

## ๐ŸŽฏ 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

## ๐Ÿค Contributing

This system represents a foundation for intelligent claim verification. Areas for enhancement include:
- Additional AI model integrations
- Advanced evidence scoring algorithms
- Specialized domain knowledge bases
- Multi-language support
- API endpoint creation