How jeevabharathis/fact-checking-chatbot works
Project Type and Purpose
• Full-stack fact-checking chatbot
• Provides verified answers on the 2025 India-Pakistan conflict
• Uses a RAG pipeline: retrieval from a curated YAML dataset → generation via an LLM (Ollama/Mistral)
File Structure
• frontend/app.py → Streamlit UI for user queries
• backend/main.py → FastAPI service exposing /ask, /health, /reload-data endpoints
• backend/rag_pipeline.py → retrieval (ChromaDB) + generation (Ollama) logic
• backend/data/war_data.yaml → source of truth facts
• cms/cms.py → Streamlit CMS for managing facts
• requirements.txt → Python dependencies
Key Architectural Components
a. User & Streamlit Frontend
– Browser or desktop client running Streamlit app (frontend/app.py)
b. CMS Interface (optional)
– Browser → Streamlit CMS (cms/cms.py) → POSTs updates to backend
c. Backend API
– FastAPI (backend/main.py)
– RAG Pipeline (backend/rag_pipeline.py)
– Endpoints: /ask (query), /reload-data (refresh dataset)
d. Data Stores
– war_data.yaml (flat file)
– ChromaDB vector store (built at runtime from YAML)
e. External LLM Service
– Ollama server (Mistral model) with GPU acceleration
Patterns & Principles
• Separation of concerns – UI vs. business logic vs. data
• RAG architecture – retrieval component (ChromaDB) + generative model (Ollama)
• External service integration – Ollama as a microservice
• Streamlit apps (frontend & CMS) run separately but share the same backend