Ethiopia’s tax regulations—including VAT, turnover tax, and income tax—are publicly available but remain inaccessible to non-specialists due to legal jargon, scattered formats, and a lack of contextual guidance.
This project introduces a Retrieval-Augmented Generation (RAG)-based chatbot that transforms natural-language questions into grounded, clause-cited answers from Ethiopian tax documents. Powered by LangChain, ChromaDB, sentence-transformer embeddings, and Groq-hosted LLaMA3, the system delivers precise, legally faithful responses in under a second.
By combining semantic search with generative reasoning, the assistant bridges the gap between complex legal frameworks and everyday business needs—from determining VAT thresholds to clarifying exemptions—empowering SMEs, freelancers, and legal professionals.
While Ethiopia’s tax codes are technically accessible, navigating them requires legal expertise, cross-referencing multiple documents, and interpreting complex clauses.
Professionals, small business owners, and freelancers often struggle to answer critical questions such as:
Challenges with existing solutions:
This project directly addresses these gaps by providing a tax-specific AI assistant that retrieves authoritative sources and generates reliable, cited explanations.
Layer | Tool/Tech | Description |
---|---|---|
Chunking & Storage | LangChain + ChromaDB | Split tax PDFs into retrievable sections |
Embedding | Sentence Transformers | Convert chunks into dense semantic vectors |
Retrieval | ChromaDB vector similarity | Find top-k relevant chunks |
LLM Reasoning | Groq-hosted LLaMA3-8B | Generate article-cited answers |
Backend | FastAPI | API endpoint for /ask |
Frontend | Streamlit | Chat interface |
all-MiniLM-L6-v2
and stored in ChromaDB./ask
; the Streamlit frontend enables user interaction.Test Case | Outcome |
---|---|
Turnover Tax Threshold | Correct figure with article citation |
VAT Exemption on Schools | Identified exemptions, quoted law |
Freelancer Income Tax Filing | Explained tax bands and due dates |
Invalid Queries | Returned fallback message without hallucination |
Performance:
Primary sources include:
All documents were obtained from public Ethiopian government portals and processed into machine-readable format.
The assistant is designed for long-term legal reliability through:
Feature | Generic LLM | Ethiopian Tax Law Assistant |
---|---|---|
Local Legal Knowledge | ❌ Limited, often inaccurate | ✅ Grounded in official sources |
Clause-Level Citation | ❌ Not guaranteed | ✅ Always included |
Multilingual Support | ⚠️ Limited | 🚧 Planned (Amharic) |
Offline Deployment | ❌ Cloud-only | ✅ Docker-compatible |
The Ethiopian Tax Law Assistant demonstrates how retrieval-augmented generation can transform legal accessibility in developing countries. By merging semantic search, clause-level citations, and low-latency generation, the project offers SMEs, freelancers, and legal professionals an accurate, trustworthy, and fast way to navigate complex tax laws.
The early results—near-instant responses with 100% legal fidelity in controlled tests—show its potential as a foundation for broader legal tech innovation in Ethiopia and beyond.
Project Repository
The full source code, UI scripts, Docker configs, and prompts are available here:
https://github.com/Filimon-H/ethiopian-tax-law-assistant
# Step 1: Clone the repository and enter the project directory git clone https://github.com/your-username/ethiopian-tax-law-assistant.git cd ethiopian-tax-law-assistant # Step 2: Add your API key cp .env.example .env # Then open .env and add: # GROQ_API_KEY=your_key_here # Step 3: Install Python dependencies pip install -r requirements.txt # Step 4: Load API keys into environment python src/config/load_config.py # Step 5: Load and chunk documents python src/ingestion/document_loader.py # Step 6: Embed and store text chunks into vector DB python src/embedding/embed_store.py # Step 7: Start FastAPI backend python src/api/main.py # Step 8: In a separate terminal, launch the Streamlit UI streamlit run streamlit_app/app.py 🐳 Dockerized Execution docker-compose build docker-compose up Access the UI at: http://localhost:8501