A RAG that answers farmers
in their own dialect.
An agriculture advisory assistant for Egypt. Users type Egyptian Arabic on their phones; the knowledge base is written in Modern Standard Arabic. On day one, retrieval found almost nothing. This is how it became something I'm willing to put in front of farmers.
01The problem
RAG looks like magic in English demos. Drop in PDFs, retrieve, prompt the model, done. This one had to answer questions like "how do I water my courgette in summer" (typed as ازاى اروى الكوسة فى الصيف؟) against documentation written in formal Arabic. The same word arrives with different alif shapes, with or without diacritics, with stray RTL marks from a phone keyboard. Dialect sits on top of all of that.
Most embedding models, even multilingual ones, can't tell that the dialect question and the MSA documentation mean the same thing. Day-one retrieval came back almost empty.
02The constraint that shaped everything
In agriculture, a wrong pesticide dose can kill a crop, or worse. The system could not be allowed to guess confidently. That single constraint drove the confidence architecture: every answer is scored twice, and anything uncertain goes to a human expert instead of the model.
"The 'I don't know, let me get someone' path isn't a fallback. It's a feature."
03The pipeline
04The outcome
Retrieval went from almost nothing on day one to a system in production in front of real farmers, without a single Arabic-specific embedding model. The wins came from a pipeline of cheap, honest steps, not a magic model. And because of the feedback loop, most of the dialect knowledge in the retriever today wasn't there at launch: the system taught itself.
Want the engineering detail: the actual normalization rules, the rewriter prompt design, the threshold numbers? It's all in the long-form write-up: Arabic Broke My RAG. Here's What Saved It.