This is a simple Retrieval-Augmented Generation (RAG) application that allows users to ask natural language questions about the Kenya Finance Bill 2025 and receive intelligent, context-aware answers.
# Kenya-finance-bill-2025-RAG
This is a simple Retrieval-Augmented Generation (RAG) application that allows users to ask natural language questions about the Kenya Finance Bill 2025 and receive intelligent, context-aware answers.
# π°πͺ Kenya Finance Bill 2025 - RAG Q&A System
This is a simple Retrieval-Augmented Generation (RAG) application that allows users to ask natural language questions about the **Kenya Finance Bill 2025** and receive intelligent, context-aware answers.
---
## π Features
- β
Loads and processes the full Finance Bill text.
- β
Splits the text into manageable chunks with context overlap.
- β
Uses vector embeddings for efficient similarity search.
- β
Employs a Large Language Model (LLM) to generate accurate responses.
- β
Supports conversational memory (optional).
- β
Fully implemented in Python using LangChain and FAISS.
---
## π§ How It Works
1. **Ingest Bill Text**
The full text is split into overlapping chunks to maintain context.
2. **Embed the Text**
Chunks are converted into numerical vectors using a transformer model.
3. **Store in Vector DB**
Embeddings are indexed using FAISS for fast similarity search.
4. **Query and Retrieve**
User queries are converted to vectors, and relevant chunks are retrieved.
5. **Answer with LLM**
A language model (like GPT-3.5) generates a response using the retrieved chunks.
---
## π οΈ Technologies Used
- LangChain
- FAISS
- OpenAI GPT or Mistral
- Python
- Optional: Streamlit or Gradio for UI
---
## π¦ Setup Instructions
1. Clone the repository:
```bash
git clone
github.com
cd kenya-finance-bill-rag