Demo
Features
- Multi-method Analysis combining fact-checking, trust chain analysis, and Socratic reasoning
- AI-Powered Verification using Perplexity’s Sonar, Sonar Deep Research, and Sonar Reasoning models
- Real-time Processing with parallel execution of multiple analysis methods
- Evidence-based Results providing sources, confidence scores, and detailed reasoning
- Clean Architecture with NestJS backend and React frontend
- Production-Ready with Docker deployment, comprehensive testing, and API documentation
- Configurable Confidence Scoring with customizable weights and thresholds
Prerequisites
- Node.js 18+ and npm
- Perplexity API key (Sonar models access)
- Docker (optional for deployment)
- Git for repository cloning
Installation
Configuration
Create.env
file in the backend directory:
Usage
- Start Backend:
- Start Frontend:
- Access Application: Open http://localhost:3000 in your browser
-
Analyze Claims:
- Enter a claim in the text area
- Click “Analyze Claim” to run fact-checking, trust chain analysis, and Socratic reasoning
- View results with confidence scores, sources, and detailed explanations
Code Explanation
- Backend: NestJS application with clean architecture following TypeScript best practices
- AI Integration: Perplexity Sonar API with three specialized models - Sonar for fact-checking, Sonar Deep Research for trust chain analysis, and Sonar Reasoning for logical evaluation
- Parallel Processing: Simultaneous execution of all three analysis methods for efficient claim verification
- Response Sanitization: Custom JSON parsing and validation to handle various API response formats
- Confidence Scoring: Weighted scoring system combining results from all three analysis methods
- Frontend: React application with intuitive claim submission interface and detailed results visualization
- Testing: Comprehensive test suite including unit tests, end-to-end tests, and claim analysis testing