An AI-powered tool that checks whether any statement or news is true or false, delivering a simple 1 (true) or 0 (false) result.
This project is an AI-powered fact-checking tool that verifies whether a statement is true or false.
Here’s how it works:
Statement to Question – Any statement entered is first passed through a local AI model (Ollama). Converting the statement into a question ensures better accuracy in the next steps. (For best results, use a model with at least 10B parameters.)
Google Search Integration – The generated question is sent through a custom Google Search Engine API, which gathers relevant websites and articles related to the query.
Data Extraction – The script extracts key text from the retrieved sites to form a pool of contextual evidence.
Final Verification – Both the extracted site data and the original statement are passed into the AI again, which outputs a binary result:
1 → True
0 → False
- Install Ollama: https://ollama.ai/
- Pull your model of choice (recommended 10B or larger for best results): ollama pull mistral:10b
- Open the OLLAMA_MODEL file and enter your model name (for example: mistral:10b).
- Open the SEARCH_API file and paste your Google Custom Search API key.
- Run the program: python main.py
- Enter any statement you want to verify (for example: The moon landing was fake.)
- The program will output: 1 = True 0 = False