Logo Lanfrica

EllatheStarr/ai_10012200008

Domain:

natural language processing

Record type:

software
Creator:
Ell
Host:
A RAG Chatbot for Ghana's Elections and Budget # β˜• Brew & Ask - GH RAG Bot **Student:** Emmanuella Uwudia **Index Number:** AI_10012200008 **Course:** CS4241 - Introduction to Artificial Intelligence --- ## Table of Contents 1. Live Demo 2. Overview 3. Features 4. Tech Stack 5. Project Structure 6. Local Setup 7. Sample Questions 8. Statistics 9. Links --- ## Live Demo πŸ”— **ai-10012200008.streamlit.ap… > *Note: The app may take 10-15 seconds to wake up after inactivity (free tier limitation).* --- ## Overview Brew & Ask is a **Retrieval-Augmented Generation (RAG)** chatbot that answers questions about: - πŸ“Š **Ghana Election Results** (2000, 2004, 2016, 2020) - πŸ“„ **Ghana 2025 Budget Statement** The system is built entirely from scratch without LangChain, LlamaIndex, or any pre-built RAG pipelines. All components including chunking, embeddings, vector search, prompt construction, and LLM integration were manually implemented. --- ## Features | Feature | Description | |---------|-------------| | Custom RAG | No frameworks - fully manual implementation | | Query Expansion | Ghana-specific synonyms (NPP β†’ New Patriotic Party) | | Hallucination Control | Structured prompt with explicit rules | | Source Attribution | Shows document names and similarity scores | | Conversation Memory | Remembers last 10 exchanges for follow-up questions | | Feedback Loop | User ratings (1-5 stars) improve retrieval over time | --- ## Tech Stack | Component | Technology | |-----------|------------| | UI Framework | Streamlit | | Embeddings | Sentence Transformers (all-MiniLM-L6-v2) | | Vector Store | FAISS (Facebook AI Similarity Search) | | LLM Provider | Groq (free tier, 560 tokens/sec) | | LLM Model | Llama 3.1 8B Instant | | Data Processing | Pandas, PyPDF2 | | Language | Python 3.10+ | --- ## Project Structure ```text ai_10012200008/ β”‚ β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ raw/ # Original CSV and PDF files β”‚ β”‚ β”œβ”€β”€ Ghana_Election_Result.csv β”‚ β”‚ └── 2025-Budget-Statement-and-Economic-Policy_v4.pdf β”‚ β”œβ”€β”€ processed/ # Cleaned and …