A cli, python based application to fact check a statement by comparing to relevant and recent news.
git clone https://github.com/yatshunlee/claim-fact-checking.git
conda env create -f env/environment.yml
conda activate claim-fact-check
!pip install -U -q transformers
!pip install -U -q accelerate
!pip install -q news-please
!pip install -q google
!pip install -U -q sentence-transformers
- replace with your valid openai api key in
fraud_detection_gpt_3_5.py
- run
python main_gpt_3_5.py
- replace with your valid huggingface access token in
fraud_detection_gemma.py
- run
python main_gemma.py
- Retrieve a statement / query that the user wants to fact-check.
- Make it a better google search query: sites, keywords, time range.
- Perform webscrapping to get relevant news content about the query: Google Search, NewsPlease.
- Utilize text entailment to keep top relevent news by their titles. Then conduct sentence embedding and KNN to get the most relevant sentences in the news.
- Design the prompt by retrieval augmented generation (RAG).
- Fit into the GPT 3.5 model to generate a response.