How la-minoo/claim-evidence-checker works
clAIm checks whether supplied scientific evidence text supports, contradicts, or leaves a claim undetermined; it is consistency checking, not independent fact verification. Users can submit a claim with their own evidence or retrieve papers for a claim. The backend selects and classifies evidence, then offers token attribution and generated explanations; claim-only retrieval searches Semantic Scholar and scores paper sentences with the same NLI model. The README documents additional API capabilities. Connections below follow the excerpts or README; unsampled implementation details are not inferred.
Main entry points: infer.py FastAPI routes · demo.py Streamlit demo · retrieval.py Retrieval endpoint · llama_chat.py Chat helper
Components 15
User interfaces
- Streamlit demo
app/demo.py - Web frontend
app2
Claim analysis
- API entry point
src/main.py - FastAPI routes
src/infer.py - NLI inference
src/infer.py - Sentence selection
src/infer.py - Fine-tuned model
- Integrated Gradients
src/attributions.py
Evidence retrieval
- Retrieval endpoint
src/retrieval.py - Semantic Scholar
- Result cache
src/retrieval.py
Explanations
- Chat helper
src/llama_chat.py - Groq API
- Ollama
Other components
- User
Connections 19
- User → Streamlit demo: submits claim
README.md - User → Web frontend: uses
README.md - Web frontend → FastAPI routes: calls API
- Streamlit demo → Sentence selection: selects evidence
app/demo.py - Streamlit demo → NLI inference: requests verdict
app/demo.py - Streamlit demo → Retrieval endpoint: requests papers
app/demo.py - Streamlit demo → Integrated Gradients: requests attribution
app/demo.py - API entry point → FastAPI routes: loads routes
src/main.py - API entry point → Retrieval endpoint: registers route
src/main.py - FastAPI routes → NLI inference: runs inference
README.md - FastAPI routes → Sentence selection: analyzes sentences
README.md - NLI inference → Fine-tuned model: classifies pair
src/infer.py - FastAPI routes → Integrated Gradients: wraps attribution
README.md - Retrieval endpoint → Semantic Scholar: fetches papers
src/retrieval.py - Retrieval endpoint → NLI inference: scores sentences
src/retrieval.py - Retrieval endpoint → Result cache: reads and writes
src/retrieval.py - FastAPI routes → Chat helper: requests chat
src/infer.py - Chat helper → Groq API: dispatches
- Chat helper → Ollama: fallback