A localized AI tutor chatbot for Ethiopian elementary school students (grades 4β8) in Afaan Oromo.
# π OroChatbot: Production-Ready Afaan Oromo AI Chatbot
A high-fidelity, production-grade conversational AI framework designed specifically for the **Afaan Oromo** language. Built utilizing **FastAPI**, **React SPAs**, **Hugging Face Transformers**, and **Docker**.
---
## π Key Architectural Strengths
- **Afaan Oromo Digraph Awareness**: Tokenizer is fine-tuned to properly digest Afaan Oromo specific digraph segments (like `dh`, `ch`, `sh`, `ny`, `ph`) without sub-tokenizing them incorrectly.
- **Morphological Suffix Parsing**: The preprocessing pipeline breaks words down, extracting suffixes (like `oota`, `ummaa`, `dhaan`, `tti`) dynamically to allow morph-semantic similarity matching.
- **Dual-Engine Response Pipeline**:
- **Primary**: Sequence-to-Sequence (Seq2Seq) text generator using fine-tuned `xlm-roberta-base` encoder-decoders.
- **Fallback**: Multilingual semantic similarity retrieval engine. If custom model checkpoints are not yet compiled, the system automatically pools raw question representations and serves appropriate Q&A matches.
- **Interactive Controls**: Live training dashboard inside the UI which triggers asynchronous background fine-tuning pipelines and monitors training loss metrics in real-time.
- **Complete Validation Suite**: Built-in score calculators computing BLEU-4, ROUGE-1/2/L, accuracy, and model perplexity scores dynamically.
---
## π System Blueprint Structure
```
orochatbot/
βββ backend/
β βββ app/
β β βββ api/ # FastAPI Endpoint Controllers & Limiters
β β βββ models/ # Schemas & Model Generators
β β βββ preprocessing/ # Digraph-aware Text Normalizers
β β βββ training/ # PyTorch Dataset Loaders & Trainer Loop
β β βββ utils/ # Structured Logger
β β βββ main.py # App bootstrapper
β βββ data/
β β βββ raw/ # Curated conversational datasets
β βββ Dockerfile
β βββ requirements.txt
βββ frontend/
β βββ src/ # React compon β¦