Moaz MuhammadAI Engineer
← All work
Arabic legal RAG · Open sourceLive

Al-Muhami Al-Zaki

A Corrective RAG for Egyptian legal research that admits uncertainty instead of inventing an article number. Arabic semantic search with mandatory Law, Article and Year citations, running on local models.

1,300+ chunks
Knowledge base

Egyptian legal texts indexed for Arabic semantic search.

Law · Article · Year
Citations

Mandatory on every answer.

Local Ollama
Inference

Documents and questions stay on the machine.

Problem

Legal research is the worst place for a confident hallucination, and Arabic legal text is poorly served by mainstream tools. A wrong article number stated fluently is more dangerous than "I don't know."

Approach

A Corrective RAG pipeline on LangGraph. Retrieved passages are relevance-graded and validated before generation, and the query is rewritten when retrieval fails. Answers carry mandatory Law, Article and Year citations. CAMeLBERT-NER anonymises personal data before it's processed, and everything runs on local Ollama models.

Outcome

An early, working instance of the two things I now build professionally: cited, refuse-when-unsure RAG, and Arabic document AI.