Deep Dive: Mpairwe Lauben - System Architecture, ML Processing & Fine-tuning
How Mpairwe Lauben shaped the end-to-end system architecture and built the machine-learning core - model processing and LoRA fine-tuning - behind the URA Chatbot.

Mpairwe Lauben
Deep Dive: Mpairwe Lauben - System Architecture, ML Processing & Fine-tuning
Introduction
Mpairwe Lauben owned the technical blueprint of the URA Chatbot and its machine-learning core. From the layered system architecture down to the LoRA adapters that teach the model Luganda, Lauben's work defines how every request flows through the system.
System Architecture
Lauben designed a modular, layered architecture so each concern can scale and evolve independently:
- Frontend Layer: Web interface for taxpayers
- API Layer: Request orchestration and service coordination
- Processing Layer: Language detection, translation, normalization
- Retrieval Layer: Hybrid semantic and keyword search
- Generation Layer: LLM inference grounded in retrieved context
- Integration Layer: Connections to data and infrastructure services
This separation lets the team deploy, test, and optimize components in isolation while keeping clear contracts between them.
ML Processing: the RAG Engine
The retrieval-augmented generation pipeline is the heart of the system, and Lauben architected its phases end to end:
Phase 1: Query Processing
- Language detection (English / Luganda)
- URA-specific abbreviation expansion
- Spelling correction and coreference resolution
Phase 2: Semantic Cache
- Cosine-similarity matching (threshold 0.92)
- Cached answers for repeat queries with configurable TTL
Phase 3: Hybrid Retrieval
- Dense vector search over embeddings
- BM25 sparse retrieval
- Reciprocal Rank Fusion to merge both
Phase 4: Corrective RAG
- Re-retrieval when average relevance falls below threshold
- Query expansion and broader fallback search
Phase 5: Response Generation
- Qwen3-8B inference (4-bit quantization)
- Multi-turn memory and citation generation
Fine-tuning
To make a general model fluent in Ugandan tax language, Lauben fine-tuned it with parameter-efficient methods:
- LoRA / PEFT adapters layered on Qwen3-8B for domain and language adaptation
- Luganda adapters so translation and generation respect local phrasing
- Quality gates during training - faithfulness, answer relevancy, context precision/recall, and citation accuracy - to keep each new adapter honest before it ships
Impact
Lauben's architecture and ML work delivered:
- A 94% accuracy rate grounded in official URA documents
- A pipeline that degrades gracefully and re-retrieves when unsure
- A model that speaks both English and Luganda in a tax-specific register
- A clean component boundary that the rest of the team could build on confidently