I’m a solo founder building an Arabic veterinary diagnosis assistant for livestock and pets in Egypt (poultry, cattle, buffalo, horses, cats, dogs).
Setup: ~216 English vet textbooks → 530k chunks (Postgres + pgvector, paraphrase-multilingual-mpnet 768-d with a 128-token window, plus lexical search); Claude Haiku as the LLM.
What we measured:
Retrieval-first (embed the Arabic symptoms → top-10 chunks → LLM) is weak.
Given the correct passage, the LLM gets ~92% top-1, so the reasoning works.
“LLM proposes 10 candidate diseases → search the books by disease name → LLM picks top-3” reaches 92% top-3 on clean Arabic (MSA) case descriptions.
On real owner messages from Arabic Q&A sites, agreement is only ~40% exact and ~72% exact or related (labels are the replier’s answers, not vet-reviewed).
The translation/dialect problem: owners write in Egyptian colloquial Arabic (“الفراخ بتنهج وفاتحة بوقها”, “الجاموسة مانعة الأكل”), while all the evidence is English and organised by disease name. What we tried:
A 287-term Egyptian field-term dictionary: fixed 3 cases, broke 3.
A 410-term controlled clinical vocabulary for poultry (MSA + Egyptian): did not meet our gate.
LLM rewriting of the whole question into English clinical signs before diagnosis: 38.3% vs 40.4% without, so no gain.
BGE-M3 instead of mpnet: not better on our pilot, and 7x slower.
Planned next: self-consistency over candidate lists, 2–3 follow-up questions to separate the top-3, a canonical disease list with hierarchical scoring, and a small paid vet audit.
Questions:
What has worked for you mapping dialectal or lay symptom text to clinical concepts? Is the right move to normalise the dialect, or to ask follow-up questions?
Do you know Egyptian/Arabic medical NLP resources (dialect symptom lexicons, annotated corpora) or veterinary ontologies (VeNom, SNOMED vet) that can be used?
Any pitfalls with LLM-simulated owners for evaluation?
I think the biggest gap is embedding Egyptian Arabic symptoms straight against English textbook chunks. I’d try a step before retrieval: have the LLM rewrite the owner’s message into a short clinical English symptom list, then retrieve on that. 128 tokens is also pretty tight for textbook text, I’d test 300-500 side by side on your eval set. keeping each chunking + model variant as its own index on the same table makes those comparisons cheap: github.com/pixeltable/pixeltable/blob/main/docs/release/platform/embedding-indexes.ipynb
On Q3: simulated owners tend to write the way the model expects, closer to clean MSA, so scores drift toward your 92% and away from the 40% on real messages. Use them for coverage, but gate on real owner messages with labels fixed before the run. Your step 4 (rewriting into English clinical signs) gave 38.3% vs 40.4%, so that alone may not help. Given 72% exact-or-related, follow-up questions to split the top 3 look better.
A small fixed set would show which works: the same case in MSA and in Egyptian colloquial, cases where the right output is a follow-up question, and cases that must never get a confident disease name. A vet has to supply the expected answers; with those, I can build and run the set and report pass/fail. In one test, 10 outside conversations found 2 real bugs a 200+ dialog test set missed.
The 40->92% gap on real owner messages is a classic domain adaptation problem, but the dialect layer makes it harder than typical domain shift. A few observations from working on synthetic data pipelines:
On the LLM rewriting step: The slight decrease you saw (38.3% vs 40.4%) is almost certainly because the LLM is normalizing the dialect and changing the symptom framing — e.g. “my goat won’t eat and is slow” → “the animal is exhibiting anorexia and lethargy” changes the retrieval signal even if the translation is correct. Separating symptom normalization (keep colloquial framing, just fix morphology) from clinical-term mapping (add structured vocabulary) usually helps here.
Synthetic parallel data for the dialect gap: Rather than trying to fix retrieval directly, consider building a small synthetic dialect-MSA normalizer trained on 200-500 parallel pairs you can generate:
Take real Egyptian owner messages (the 287-term dictionary is a start)
Ask GPT-4 or Claude to produce 3 MSA/clinical English variants per message
Fine-tune a tiny model (mT5-small or AraT5) purely on this normalization task
Run owner messages through the normalizer before your main retrieval pipeline
This separates the dialect-handling problem from the veterinary-knowledge problem, and a 200-pair normalizer is much cheaper to build than 500 labeled Q&A pairs.
On the benchmark: Adam13y is right that the 92% figure is measuring your training distribution, not the real task. Before investing in GPU for the main model, I’d prioritize: (a) 50 real messages labeled by a vet (not synthetic), split 40/10 train/val, and (b) measure retrieval recall@5 separately from final answer accuracy — knowing which part of the pipeline fails on real messages is worth more than one combined metric.
One resource you might not have:CAMeL Tools includes Egyptian Arabic morphological analysis and normalization utilities that are more structured than a dictionary lookup. It’s open-source and specifically designed for this dialect.
Good luck — this is genuinely useful applied work.
This is a genuinely interesting architecture problem. The 92% with the correct passage but 40% on real owner messages tells you clearly: your bottleneck is the dialect-to-clinical-concept bridge, not the LLM’s reasoning.
I work at Nugen, where we focus on domain alignment for open-weight LLMs. A few observations from similar domain-specific deployment problems:
The rewriting approach not helping (38.3% vs 40.4%) suggests the issue isn’t just vocabulary — it’s that Egyptian dialect symptom descriptions carry contextual information that gets lost in a clinical rewrite. Follow-up clarifying questions are likely the more robust path, since they let the model pull the right clinical signal without forcing a lossy translation step.
On your dialect gap specifically: rather than a fixed glossary, have you tried using the LLM itself to generate candidate clinical terms from the dialect description, then searching by those? Your “LLM proposes candidates → search → pick top-3” already works at 92% — the same pattern could apply to symptom mapping before retrieval.
For the alignment angle: if you move to an open-weight model (Llama, Qwen, etc.) at any point, aligning it on your 216 vet textbooks would directly address the domain vocabulary gap without the retrieval layer needing to bridge it. Happy to share how that works if useful.
What does your eval set look like for the real owner messages? The ~72% “exact or related” rate suggests some of those near-misses are clinically acceptable — worth knowing before investing more in the pipeline.
Thank you for your thoughtful and insightful response. I really appreciate you taking the time to understand the challenges we’re facing with Vetopedia.
I agree that the main challenge is bridging Egyptian Arabic dialect expressions with accurate veterinary concepts, while preserving the original context and clinical details.
I’d love to ask for your advice:
Are there any open-source tools, libraries, models, or frameworks you would recommend to help us with:
Egyptian Arabic dialect understanding and normalization.
Mapping colloquial symptom descriptions to standardized veterinary terminology.
Generating relevant clinical terms without losing important context.
Improving veterinary RAG retrieval accuracy using our collection of veterinary textbooks and references.
Building reliable clarification questions when the symptoms are ambiguous.
We are building Vetopedia as a veterinary intelligence platform, not just a chatbot, and we’re particularly interested in practical solutions that can run cost-effectively on our own server.
If you have any recommendations, research papers, GitHub repositories, or tools worth exploring, I’d be very grateful.
Thank you again for your willingness to help. Your feedback is genuinely valuable to our project.
Best regards,
Moataz
Vetopedia – Veterinary Intelligence Platform