Logo Lanfrica

GIVEN-CHINYAMA/zambia-economic-rag-qa-system

Domain:

socioeconomic

Record type:

softwareproject
Creator:
GIV
Host:
RAG-powered Q&A system over Zambian macroeconomic data (World Bank API) using ChromaDB, Groq LLaMA, and Gradio β€” with evaluation framework and live deployment. #πŸ‡ΏπŸ‡² Zambia Economic RAG Q&A System > **Retrieval-Augmented Generation (RAG) system that answers natural language questions about Zambia's macroeconomic history using verified World Bank data and a live LLM.** --- ## πŸ“Œ Project Overview This project builds a **production-grade RAG system** that allows users to query Zambia's macroeconomic history using plain English β€” no SQL, no dashboards, just questions and grounded answers. Instead of a standard LLM that guesses or hallucinates country-level economic data, this system: 1. **Retrieves** the most relevant verified facts from a ChromaDB vector store 2. **Grounds** the LLM response strictly in that retrieved data 3. **Cites** the exact year and source for every answer **Example questions the system answers:** - *"What caused Zambia's inflation spike in 2021?"* - *"How has the Kwacha depreciated against the USD since 2010?"* - *"What was Zambia's GDP growth trend between 2015 and 2023?"* - *"When did Zambia's government debt peak?"* - *"What was the unemployment rate in Zambia in 2019?"* --- ## πŸ—οΈ System Architecture User Question ↓ [Sentence Transformer β€” all-MiniLM-L6-v2] β†’ Query Embedding ↓ [ChromaDB Vector Store] β†’ Top-5 Relevant Year Chunks (Cosine Similarity) ↓ [System Prompt + Retrieved Context + Question] ↓ [Groq LLM β€” LLaMA 3.3 70B Versatile] β†’ Grounded, Cited Answer ↓ [Gradio Interface] β†’ Live Interactive Response with Source Citation --- ## πŸ“Š Data Sources | Source | Indicators Collected | Years Covered | |--------|---------------------|---------------| | World Bank API | GDP Growth Rate | 2000–2024 | | World Bank API | Inflation CPI (%) | 2000–2024 | | World Bank API | USD/ZMW Exchange Rate | 2000–2024 | | World Bank API | Unemployment Rate | 2000–2024 | | World Bank API | Government Debt (% of GDP) | 2000–2024 | | World Bank API | Current Account Balance | 2000–2024 | | World Bank API | Foreign Direct Investment | 2000–2024 | | World Bank API | GDP per Capita (USD) | 2000–2024 | …