Logo Lanfrica

OkelloAndrewPeters/eprc-ai-assistant

Domain:

socioeconomic

Record type:

software
Creator:
Oke
Host:
AI-powered knowledge portal and research assistant for EPRC Uganda # EPRC AI Research Assistant An AI-powered knowledge portal and research assistant for the **Economic Policy Research Centre (EPRC) of Uganda** β€” built to make 30+ years of Uganda's economic policy research instantly accessible to researchers, policymakers, and the public. > Built entirely in-house by EPRC ICT staff as a zero-cost alternative to external consultants. --- ## What It Does - πŸ” **Semantic search** across 500+ EPRC research documents (1994–2024) - πŸ’¬ **Natural language Q&A** β€” ask questions, get cited answers from real EPRC research - 🌐 **Website navigation assistant** β€” guides users to the right section of eprcug.org - πŸ“„ **Source citations** β€” every answer references the exact document and page - πŸ€– **Small talk capable** β€” handles greetings and general queries gracefully --- ## Tech Stack | Component | Technology | |---|---| | LLM | Gemma 4 (via Ollama) β€” runs 100% locally | | Embeddings | nomic-embed-text (via Ollama) | | Vector Store | ChromaDB (persistent local store) | | Document Registry | PostgreSQL | | Backend API | FastAPI + Python | | Frontend | Vanilla HTML/CSS/JS chat widget | | Document Parsing | PyPDF + python-docx | --- ## Architecture ``` EPRC Documents (PDF/DOCX) ↓ knowledge_base.py β€” chunks, embeds, stores in ChromaDB ↓ User asks question via chat widget ↓ engine.py β€” embeds query β†’ searches ChromaDB β†’ retrieves top 8 chunks ↓ Gemma answers using retrieved context + EPRC identity ↓ Streamed response with source citations ``` --- ## Project Structure ``` eprc-ai-assistant/ β”œβ”€β”€ app.py # FastAPI backend + chat widget UI β”œβ”€β”€ engine.py # RAG query pipeline β”œβ”€β”€ knowledge_base.py # Document ingestion pipeline β”œβ”€β”€ database.py # PostgreSQL + ChromaDB setup β”œβ”€β”€ prompts.py # System prompts + EPRC identity β”œβ”€β”€ static/ β”‚ └── index.html # Floating chat widget UI β”œβ”€β”€ eprc_documents/ # EPRC research documents (not in repo) β”œβ”€β”€ chroma_store/ # Vector embeddings (not in repo) └── .en …