MASMATIXInnovations
← All insights

Research note · Agentic AI · Clinical NLP

Can a small local AI agent understand Roman Urdu?

What a simple name swap revealed about small AI agents

By Muzammal Hussain · 18 October 2026 · 6 min read

Millions of people in Pakistan type Urdu in Latin letters: "Maryam ke kitne sessions baqi hain?" This is Roman Urdu, and it is how many patients, receptionists and clinicians actually message each other. Yet AI agents are mostly designed and evaluated in English. I wanted to know whether a small agent running entirely on a laptop could handle the same clinic questions in both languages, and whether the answer would hold up when I tested it a second time.

Key findings

  1. The agent beat the one-shot baseline in every condition, mainly because it hands arithmetic to a calculator tool.
  2. The Roman Urdu result was not stable. Changing only the patient and therapist names dropped the agent's Roman Urdu accuracy from 83% to 58%. English moved by one question.
  3. The Roman Urdu failures were language errors, not tool errors. "5 saal baad" (in five years) became a subtraction, and "mila kar" (combined) became a difference.
  4. A small agent can still invent facts inside the loop. It skipped a lookup and made up a therapist's specialty.

Background: the ReAct pattern

ReAct (Yao et al., ICLR 2023) is one of the most influential ideas behind today's AI agents. Instead of answering in one go, the model works in a loop:

It resembles how a clinician works: reason, order a test, read the result, decide the next step. The paper showed that grounding answers in tool results reduces made-up facts compared with "think step by step" prompting alone. Its experiments, however, were in English and its prompted results came from very large models (PaLM-540B and GPT-3). Whether the pattern transfers to small local models and to code-mixed languages such as Roman Urdu was not tested.

The experiment

Results

MethodLanguageRun ARun B (renamed)
ReAct agentEnglish11/12 (92%)10/12 (83%)
ReAct agentRoman Urdu10/12 (83%)7/12 (58%)
Direct answerEnglish9/12 (75%)8/12 (67%)
Direct answerRoman Urdu6/12 (50%)6/12 (50%)
Grouped bar chart comparing Run A and Run B accuracy. ReAct English 92% then 83%; ReAct Roman Urdu 83% then 58%; Direct English 75% then 67%; Direct Roman Urdu 50% in both runs.
Accuracy per condition in both runs. qwen2.5:3b, temperature 0, 12 questions per language.

The agent was consistently more accurate than the direct baseline, but at a cost: about 3 seconds per question against 0.16 seconds, roughly 20 times slower. The largest movement between runs was the agent on Roman Urdu, which lost three questions when only the names changed.

What went wrong

Because every step of the agent is logged, each failure can be traced. Three Roman Urdu examples stand out.

In the first two cases the tools worked perfectly; the model chose the wrong operation because it misunderstood the Roman Urdu wording. The third case matters because the ReAct paper's own error analysis found no hallucination among the agent's sampled failures. With a 3B model, the loop alone did not prevent it.

One failure appeared in both runs: in English, the agent sent a patient's name to the therapist lookup, received "not found" and answered "No information available" instead of trying another route. In a clinic, "I don't know" is the safer kind of failure, since a confident wrong number can harm a patient. But the invented specialty shows that abstention cannot be relied on.

What this means for clinical AI

I am building MeetPhysio, an AI clinical documentation assistant with a local-model mode. Running the model on the clinician's own machine keeps patient data private, which matters under UK data protection law. This pilot suggests three practical requirements for local agents in multilingual clinics:

  1. Evaluate in the patient's language, with several phrasings and name sets, not one English test.
  2. Require evidence for every fact in the final answer, so a claim without a matching tool result is blocked.
  3. Choose the workflow to fit the speed: a few seconds per step is fine for drafting notes after a consultation, but too slow for live conversation.

Limitations

This is a small pilot, not a final result. Each condition has 12 questions, so one question equals 8.3 percentage points and no confidence intervals are possible yet. I tested one model with one setting, the renamed run also changed the names in the prompt example, the Roman Urdu was written by one person, and the database was tiny. The name-swap effect is a warning sign, not a measured effect size.

Next steps

Reference: Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K. and Cao, Y. (2023). ReAct: Synergizing Reasoning and Acting in Language Models. International Conference on Learning Representations (ICLR). arXiv:2210.03629