TrustIt-AI is an advanced search application that evaluates and verifies the truthfulness of information. In an era of rampant misinformation, TrustIt-AI helps users distinguish between reliable facts and misleading content by conducting thorough fact-checking on search queries.
The application employs a multi-agent AI system powered by Portia to:
- Analyze search queries and identify factual claims
- Generate specific verification questions for each claim
- Search for evidence across multiple reliable sources
- Evaluate the credibility of found information
- Provide a final judgment on the trustworthiness of content (REAL, MISLEADING, or FAKE)
TrustIt-AI leverages Portia's powerful AI orchestration capabilities to create a sophisticated fact-checking pipeline:
- Multi-agent Planning: Portia generates structured plans for decomposing complex fact-checking tasks into manageable steps
- Tool Integration: We integrated Tavily search API as a tool within Portia's framework, allowing for evidence gathering from the web
- Execution Monitoring: Portia's execution framework provides visibility into the LLM's reasoning process, creating more transparent fact-checking
- Stateful Workflows: Portia maintains context throughout the verification journey, ensuring coherent analysis across multiple subtasks
The application uses Portia to plan and execute the question generation phase, then conducts fact-checking using specialized agents, and finally renders judgment on content authenticity.
- Web search using Tavily's search API
- Agent-based search orchestration with Portia
- Real-time progress updates via Pusher
- Verification status for claims (VERIFIED, FALSE, PARTIALLY TRUE, UNCERTAIN)
- Confidence scoring for all judgments
- Source credibility evaluation
- Evidence presentation (supporting and contradicting)
- Modern, responsive UI for result visualization
- Python 3.11 or higher
- API keys for:
- Google Generative AI (Gemini)
- Portia
- Tavily
-
Clone the repository
git clone https://github.com/yourusername/TrustIt-AI.git cd TrustIt-AI -
Set up a virtual environment
python -m venv portia-env-py311 # Activate the virtual environment: # On Linux/Mac: source backend/portia-env-py311/bin/activate # On Windows: portia-env-py311\Scripts\activate -
Install dependencies
pip install portia-sdk-python[google] fastapi tavily-sdk pusher -
Create a
.envfile in the project root with the following API keys:GOOGLE_API_KEY=your_google_api_key PORTIA_API_KEY=your_portia_api_key TAVILY_API_KEY=your_tavily_api_key
To start the backend server:
-
Make sure you have activated your virtual environment
# On Linux/Mac: source backend/portia-env-py311/bin/activate # On Windows: portia-env-py311\Scripts\activate -
Navigate to the project root and run:
python -m backend.runor
cd backend python run.py
The backend server will start on http://localhost:8002.
-
Navigate to the frontend directory:
cd frontend -
Install frontend dependencies (first time only):
npm install # or yarn install -
Start the development server:
npm run dev # or yarn dev
The frontend will be available at http://localhost:3000.
Once both backend and frontend are running:
- Open your browser and go to
http://localhost:3000 - Enter your search query in the search bar
- View the trustworthiness analysis of the search results
The application follows a modular design with these key components:
-
backend/- Main packageserver.py- FastAPI serverportia_integration.py- Integration with Portia AIagents/- Specialized agents for different tasksquestion_generator_agent.py- Generates verification questionsfact_checking_agent.py- Verifies factual claimsjudge_agent.py- Makes final authenticity judgment
tools/- Tool implementationstavily_search.py- Tavily search tool
-
frontend/- Next.js web application- Real-time updates via Pusher
- Modern UI with responsive design
The application demonstrates how AI orchestration with Portia can be used to create more reliable and transparent information verification systems. Users can input any content they want to verify, and TrustIt-AI will provide a detailed analysis of its trustworthiness, complete with supporting evidence and sources.