
Multilingual RAG assistant (English/Arabic) for a UAE government authority with 1,000+ users. Each query is routed by language into a dedicated English or Arabic retrieval pipeline for lower latency, alongside text-to-SQL over 500+ database tables served through FastAPI. I redesigned the pipeline and cut response time from 15s to 4s (73% faster) while keeping answers grounded in source documents.
The problem
A shared bilingual pipeline was slow (15 seconds per answer) for 1,000+ staff, and Arabic retrieval quality suffered when mixed with English.
What I built
Route every query by language into its own English or Arabic retrieval pipeline.
Add a text-to-SQL path over 500+ tables for questions that need live data instead of documents.
Redesign the pipeline stage by stage to remove wasted latency, keeping answers grounded in sources.
How it works
User query: English or Arabic, Chat UI
Router: Language detection, Intent: docs or data
Pipelines: English retrieval, Arabic retrieval, Text-to-SQL (500+ tables)
Answer: Grounded response, Source citations, FastAPI service
Built-in controls: Grounded in source documents, Dedicated index per language, Latency budget per stage.
Result
Response time cut from 15s to 4s (73% faster) for 1,000+ users.
My role: AI Engineer
0 likes · 0 views · Nov 13, 2026
A shared bilingual pipeline was slow (15 seconds per answer) for 1,000+ staff, and Arabic retrieval quality suffered when mixed with English. Result: Response t