A browser extension for automatic fact-checking using hybrid retrieval and natural language inference.
Misinformation spreads rapidly on the internet.
This project explores how retrieval techniques and natural language inference can be combined to provide lightweight fact-checking directly inside the browser.
The goal is not only to build a usable browser extension, but also to investigate how retrieval quality affects downstream fact-checking performance.
- Highlight text directly on webpages.
- Retrieve supporting evidence from Wikipedia.
- Hybrid retrieval using lexical and semantic search.
- Cross-Encoder evidence reranking.
- Sentence-level evidence selection.
- NLI-based verdict prediction.
- Display verdicts inside the browser popup.
- Provide evidence sentences and confidence scores.
- Cache previous claims to reduce repeated inference.
- Optional LLM inference for further analysis and explanation.
User Selection
↓
Browser Extension
↓
FastAPI Backend
↓
Topic Extraction
↓
Hybrid Retrieval
↓
Cross-Encoder Ranking
↓
Sentence Selection
↓
DeBERTa NLI
↓
Verdict + Evidence
crosscheck-extension/
│
├── backend/
│ ├── app/
│ │ ├── api/
│ │ ├── core/
│ │ ├── pipelines/
│ │ ├── services/
│ │ ├── schemas/
│ │ └── main.py
│ │
│ ├── tests/
│ │ ├── retrieval_test.py
│ │ └── nli_test.py
│ │
│ └── requirements.txt
│
├── extension/
│ ├── src/
│ │ ├── popup/
│ │ ├── background/
│ │ ├── content/
│ │ ├── services/
│ │ ├── types/
│ │ └── utils/
│ │
│ └── package.json
│
├── ml/
│ ├── evaluation/
│ ├── experiments/
│ └── kaggle/
│
└── README.md
- Topic Extraction
- Entity Linking
- Hybrid Retrieval
- Cross-Encoder Ranking
- Sentence Selection
- NLI Prediction
- Confidence Calibration
- Claim Caching
Several retrieval and inference strategies were investigated during development.
- BM25 retrieval
- Dense retrieval
- Entity-based retrieval
- Hybrid retrieval
- Graph-based retrieval
- Recall@k evaluation
- Mean Reciprocal Rank (MRR)
- End-to-end fact-check accuracy
- Evidence quality analysis
Experiments and benchmarks are executed independently inside the ml/ directory and Kaggle notebooks.
The NLI component was evaluated independently on the FEVER v1.0 dataset.
| Label | Precision | Recall | F1 |
|---|---|---|---|
| SUPPORTS | 0.81 | 0.88 | 0.84 |
| REFUTES | 0.70 | 0.69 | 0.69 |
| NOT_ENOUGH_INFO | 0.81 | 0.75 | 0.78 |
| Overall Metric | Score |
|---|---|
| Accuracy | 0.77 |
| Macro F1 | 0.77 |
| Weighted F1 | 0.77 |
Dataset: FEVER v1.0
Evaluation samples: 19,998
| Metric | Score |
|---|---|
| Recall@1 | 0.69 |
| Recall@3 | 0.84 |
| Recall@5 | 0.86 |
| MRR | 0.75 |
| Metric | Score |
|---|---|
| Accuracy | 0.41 |
| F1 Score | 0.395 |
`git clone https://github.com/24127382/CrossCheck-Extension`
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reloadcd extension
npm install
npm run buildLoad the generated extension inside the browser developer mode.
- Retrieval quality strongly affects final predictions.
- Wikipedia may not contain evidence for recent events.
- Multi-hop reasoning is not supported.
- Confidence calibration remains imperfect.
- The system is currently limited to English claims.
- Larger retrieval corpora.
- Multi-hop retrieval.
- Knowledge graph integration.
- LLM-based evidence summarization.
- Human feedback loop.
- Deployment and scalability improvements.
- Better confidence calibration.