Logo Lanfrica

Kwadwo6395/ai_10022200155

Domaine:

socioeconomic

Type de record:

software
Créateur:
Kwa
Hôte:
RAG chat assistant that answers questions over Ghana's 2020/2024 presidential election results and the 2025 Budget Statement # ai_ — Academic City RAG Assistant **Student:** **Index Number:** **Course:** CS4241 — Introduction to Artificial Intelligence — 2026 **Lecturer:** Godwin N. Danso **Examination Date:** 15 April 2026 RAG chat assistant that answers questions over Ghana's 2020/2024 presidential election results and the 2025 Budget Statement. Built without LangChain, LlamaIndex, or any pre-built RAG pipeline — all core components (chunking, embedding, retrieval, prompting, pipeline) are hand-implemented. ## Live demo - **Deployed URL:** - **2-minute video walkthrough:** drive.google.com ## Local setup > **New to Python / this project?** Follow the step-by-step guide: > - Mac or Linux → `docs/setup.md` > - Windows → `docs/setup-windows.md` > > ```bash # 1. Python 3.11 python3.11 -m venv .venv source .venv/bin/activate pip install -U pip pip install -r requirements.txt # 2. Data curl -L -o data/Ghana_Election_Result.csv \ raw.githubusercontent.com curl -L -o data/2025-Budget-Statement-and-Economic-Policy_v4.pdf \ mofep.gov.gh # 3. Gemini key cp .env.example .env # 4. Build the index (~30s) python scripts/build_index.py # 5. Run the app streamlit run app.py ``` ## Running tests ```bash source .venv/bin/activate pytest ``` ## Evaluation (manual, Part E) ```bash python evaluation/run_eval.py # writes evaluation/results.json ``` Then fill in `docs/experiment_logs.md` by hand. ## Repo structure ``` ai_ / ├── app.py ├── rag/ │ ├── ingest.py │ ├── chunking.py │ ├── embeddings.py │ ├── vector_store.py │ ├── bm25_store.py │ ├── retrieval.py │ ├── decomposer.py │ ├── prompts.py │ ├── generator.py │ ├── pipeline.py │ └── logging_utils.py ├── scripts/build_index.py ├── evaluation/ │ ├── adversarial_queries.py │ └── run_ev …