kindler-king commited on
Commit
624462e
·
verified ·
1 Parent(s): c3554d9

Update README.md

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