Labiba AI
Labiba AI
Zain Projects
A fully local RAG assistant built for Zain's Legal Affairs department — chat over the legal archive or interrogate an uploaded document, powered by Nuxt.js, FastAPI, and on-premise AI via a LiteLLM proxy.
Labiba AI is a Retrieval-Augmented Generation assistant I built for Zain's Legal Affairs department. Legal staff can chat in natural language over the department's archive of documents and letters, or upload a specific document and interrogate it directly — with answers grounded in the source material.
The stack is a Nuxt.js frontend over a FastAPI backend, with all AI running fully on-premise: Ollama serving gemma4:26b behind a LiteLLM proxy, so no legal document ever leaves Zain's infrastructure.
The two hardest problems were in ingestion and retrieval:
Arabic OCR accuracy — traditional OCR engines struggled with scanned Arabic letters and documents. I solved it by using the vision-capable model itself to read documents, which dramatically improved ingestion accuracy over conventional OCR.
Long multi-page documents — users searching for information buried at the end of a long document were getting poor results. I fixed this with parent-document retrieval: matching on small chunks for precision, then handing the model the full document for answering.
Zain
Solo development — full-stack build, local AI pipeline, Arabic OCR ingestion, and retrieval engineering
2026
Let's Create Something
Together
Whether you're looking to start a new project or simply want to chat, feel free to reach out to me!