Before you can answer a user in their dialect, you have to know which dialect they wrote in. That is dialect identification.
How it works
The research community measures this through the NADI shared tasks (Nuanced Arabic Dialect Identification). NADI 2020 used tweets covering 100 provinces in 21 Arab countries, with a country-level subtask and a province-level one. NADI 2024 cast dialect identification as a multi-label task, since one sentence can be valid in several dialects, and added a subtask on the level of dialectness. The best Subtask 1 system scored 50.57 F1, and the organizers write that dialect identification remains challenging.
The MADAR corpus (Bouamor et al., 2018) is a common resource: the same travel-domain sentences translated into 25 city dialects. 2,000 sentences exist in all 25; 10,000 more exist for Doha, Beirut, Cairo, Tunis and Rabat. Parallel data like this lets you see how the same meaning is written in each place.
In practice, most products need a coarser label. A workable set is:
| Label | Covers |
|---|---|
msa |
Modern Standard Arabic |
gulf |
Saudi, Emirati, Kuwaiti, Qatari, Bahraini, Omani |
egyptian |
Egyptian |
levantine |
Syrian, Lebanese, Jordanian, Palestinian |
maghrebi |
Moroccan, Algerian, Tunisian, Libyan |
other_or_unclear |
Iraqi, Yemeni, Sudanese, mixed or too short |
An LLM prompt for this asks for one JSON object: the label, a confidence, and the words that gave it away. For example, the message عايز أغير الباقة would come back as:
{"dialect": "egyptian", "confidence": "high", "cues": ["عايز"]}
Asking for cues makes errors easy to review: if the cue is an MSA word, the label is suspect.
Why it matters
- Routing. Send Gulf customers to Gulf agents, or switch the reply prompt to the user’s dialect.
- Evaluation. Split speech and chat test sets by dialect. A single average hides the weakest group, as the dialect speech recognition post shows.
- Analytics. Know which dialects your users actually write before you invest in one.
Mixed messages are common. Users switch between dialect, MSA and English in one line, which is code-switching; keep an “unclear” label rather than forcing a guess.
On BroadNet Inference
BroadNet has no dialect identification endpoint. You can build one on POST /v1/chat/completions. BroadNet’s API reference documents structured output for GLM 5.3 and Qwen3.8 27B, which suits a fixed label list; see structured output. BroadNet reports testing Qwen3.8 27B with Gulf and Egyptian dialects understood. BroadNet does not publish dialect identification accuracy for any model, so label 100 or so of your own messages by hand and measure the model against them before relying on it.
The Arabic text classification post covers prompts, label lists and scoring for this kind of task, and dialectal Arabic explains what the labels mean.