TechnicalJune 2026 2 min read

System Architecture: Building a Scalable Multilingual Platform

Explore the modular architecture behind the URA Chatbot, from retrieval-augmented generation pipelines to CI/CD workflows.

ArchitectureRAGMLOps

System Architecture: Building a Scalable Multilingual Platform

Modular Design

The URA Chatbot uses a modular layered architecture that separates concerns and enables independent scaling of components:

Core Components

1. Frontend Layer: Web and mobile interfaces built for accessibility and responsiveness
2. API Layer: RESTful APIs handling user requests and orchestrating backend services
3. Processing Layer: Multilingual text processing, translation, and language detection
4. Retrieval Layer: Document search and vector-based semantic retrieval
5. Generation Layer: Large language models generating contextually accurate responses
6. Integration Layer: Connections to external services and legacy systems

Retrieval-Augmented Generation Pipeline

Our 10-stage RAG pipeline ensures accuracy and source grounding:

1. Input Processing: Normalize and clean user queries
2. Language Detection: Identify if input is English or Luganda
3. Translation: Convert Luganda to English for processing
4. Query Expansion: Enhance queries for better retrieval
5. Hybrid Retrieval: Combine BM25 keyword search with vector similarity
6. Reciprocal Rank Fusion: Merge multiple retrieval results
7. Document Ranking: Score documents by relevance
8. Context Assembly: Build coherent context from top documents
9. Generation: LLM generates response from context
10. Output Processing: Format response with sources and translate back to requested language

Technology Stack

ComponentTechnology
FrontendReact, TypeScript, Tailwind CSS
MobileReact Native/PWA
BackendPython, FastAPI
DatabasePostgreSQL, Vector DB
LLMQwen3-8B with LoRA fine-tuning
DeploymentDocker, Kubernetes, Crane Cloud
CI/CDGitHub Actions, Automated Testing

CI/CD and MLOps Pipeline

We implemented an end-to-end pipeline for continuous improvement:

  • Automated Testing: Unit, integration, and end-to-end tests on every commit
  • Model Validation: Continuous evaluation of retrieval and generation quality
  • Staged Deployment: Dev → Staging → Production with automated rollbacks
  • Monitoring: Real-time performance tracking and anomaly detection
  • Feedback Loop: Production errors feed back into model improvements

This architecture enables us to scale horizontally, handle traffic spikes, and continuously improve the system based on real user feedback.