Archive

Multilingual RAG System

A production retrieval system that answers in Arabic and English for government and enterprise clients, built around the parts of Arabic that generic pipelines get wrong.

Context
Delivered for government and enterprise clients
Services
AI architecture, Applied NLP, Backend engineering
Technology
Python, FastAPI, Vector search, LangChain
5+
Enterprise clients
<1.5s
P95 latency
2
Languages served
01

What had to change

Retrieval stacks are built for English. Arabic breaks them in specific ways: right-to-left text, diacritics that change meaning, dialect variation across the Gulf, and chunking that has to respect a script whose word boundaries do not behave like Latin ones. Regulated clients also need every answer traceable back to a source.

02

What Louay built

Louay architected the pipeline end to end — bilingual chunking, RTL-aware processing, a multi-layer cache in front of retrieval, guardrails for regulated environments, and tracing so each answer can be inspected after the fact.

03

What the work enabled

A system serving both languages from one pipeline, with the caching and retrieval layers designed for low-latency answers under regulated conditions.

Bilingual retrieval architecture — one pipeline, Arabic and English
QueryAR / EN inCacheMulti-layerRetrievalVector searchGenerationLLMPost-processArabic NLPResponseStreamedcache hitBilingual chunkingRTL-aware processingGuardrails for regulated environmentsTracing and metrics