TIDESa civilization in progress

ArticleLanguage

Urdu, Roman Urdu and English: designing chatbots for how Pakistan actually types

Customers in Pakistan write in English, Urdu script and Roman Urdu, often inside one message and with no fixed spelling. This is a practical guide to building a chatbot that understands them and answers in kind.

Key points

  • Treat mixed English, Urdu script and Roman Urdu as the normal case, not as an error to clean up.
  • Roman Urdu has no standard spelling, so match on meaning, not on exact words.
  • Reply in the language, script and level of formality the customer used.
  • Test with real messages from your own inbox, not with sentences you wrote yourself.
  • Decide in advance when the bot hands over to a person, and make that handover smooth.

1. Three ways of writing, often in one message

A customer writing to a business in Pakistan has three options open on the same keyboard. They can write English. They can write Urdu in its own script. Or they can write Roman Urdu, which is Urdu spelled out in English letters.

Many people do not pick one. A single message can read: "Salam, mujhe 2 bed apartment ka rent pata karna tha, is it available from next month?" That is a greeting, a Roman Urdu clause with English nouns inside it, and then a plain English question. Nobody writing it thinks they have switched languages. It is simply how they type.

A chatbot built on the idea that each message has one language will stumble here. The first design decision is to stop treating mixing as a problem. It is the input.

2. Roman Urdu has no dictionary

English has agreed spellings. Urdu script has agreed spellings. Roman Urdu has neither. Everyone writes the sounds as they hear them, shortened by habit and by how fast they are typing.

The same common words turn up in many forms:

  • How much: kitne, kitnay, kitny, kitna, ktne
  • Is: hai, hy, he, hay, h
  • What: kya, kia, kiya
  • No / not: nahi, nahin, nai, nhi
  • Want: chahiye, chahye, chaiye, chahiay
  • Price: qeemat, keemat, qimat, kimat
  • Please: please, plz, pls
  • Thank you: shukriya, shukria, thanks, thnx

Some short forms collide with other words: "he" can be the Urdu "is" or the English pronoun, and "kiya" can mean "what" or "did". Only the rest of the sentence settles it.

3. What this does to intent detection

Intent detection is the step where the bot works out what the person wants: a price, an order status, an appointment, a complaint. Older bots did this with keyword lists. If the message contains "price", send the price list.

Keyword lists break quickly on Roman Urdu. You would need every spelling of every word, and tomorrow someone would type a new one. "Rate bta dein", "kitne ka hai", "qeemat?", "price plz" and "کتنے کا ہے" are all the same question, and they share almost no letters.

Modern language models handle this far better because they work from meaning and context, not from exact strings. That does not remove the need for care. Give the model examples of real customer phrasing for each intent, in all three forms. And make the bot ask a short clarifying question when it is unsure, in place of guessing.

4. Numbers, prices and dates

Numbers look safe, but they are written in as many ways as words are. A bot that takes orders or bookings has to read all of them correctly, because a wrong number is a wrong order.

  • Amounts: "1500", "1,500", "1.5k", "15 sau", "pandra so", "dedh hazar" can all mean the same sum.
  • Large amounts use lakh and crore: "2 lac", "2 lakh", "do lakh", "2 lacs".
  • Currency: "Rs", "Rs.", "PKR", "rupay", "rupees", "/-" after the figure, or nothing at all.
  • Dates: "5/10" is the fifth of October here, not the tenth of May. People also write "5 Oct", "5 tareekh", "kal", "parson", "agle Jumma".
  • Times: "5 bje", "5 baje sham", "shaam 5", "5pm", "Maghrib ke baad".
  • Urdu-script digits (۱۲۳) can appear in place of 123.

"Kal" means both yesterday and tomorrow. The verb tells you which. When money or a booking depends on it, the bot should repeat the date back in full and ask for a yes.

5. Voice notes

A lot of customers would sooner talk than type. Where the chat app allows it, they send a voice note. For someone who finds typing slow, or who is not comfortable writing in any of the three forms, a voice note is the natural way to ask a question.

A bot that ignores voice notes ignores those customers. There are two honest options. One is to transcribe the audio and treat the text as a message, accepting that speech-to-text for Urdu mixed with English and regional accents will make mistakes. The other is to tell the customer politely that a person will listen to it, and pass it to staff.

If you transcribe, treat the result as uncertain. Names, addresses and amounts taken from audio should be confirmed back to the customer in text before anything is acted on.

6. Greetings and politeness

Conversations here often begin with a greeting and nothing else. The customer sends "Salam" or "AoA" or "السلام علیکم" and waits. The actual question comes in the second message, after the greeting is returned.

A bot that answers a bare salam with a menu of six options feels rude. The right reply is the reply a polite shopkeeper would give: return the salam, then offer help in one short line.

Formality matters as well. Urdu has "aap" and "tum", and a business should stay with "aap". Forms of address such as "sir", "madam", "bhai", "baji" and "janab" carry respect. They should not be read as names or as part of the request.

  • Greetings to recognise: salam, slam, AoA, assalam o alaikum, asalam alaikum, hello, hi.
  • Closings to recognise: shukriya, JazakAllah, thanks, Allah Hafiz, ok theek hai.
  • "Ji" and "jee" usually mean yes. "Ji?" on its own means "sorry, say that again".

7. The knowledge base

Most business bots answer from a knowledge base: a set of documents about products, prices, timings and policies. The bot searches it for the passage that matches the question, then writes an answer from that passage.

The trouble is that the documents are usually in formal English and the questions are not. A clinic's document says "Consultation fee". The patient types "dr sb ki fees kitni hy". If the search step cannot connect those two, the bot will say it does not know, even though the answer is sitting in the file.

There are a few practical ways to close the gap.

  • Use a search method that works across languages and scripts, and check it with Roman Urdu queries before trusting it.
  • Add the words customers really use next to the formal terms: "fees", "charges", "rate" beside "consultation fee".
  • Let the model restate the customer's question in plain English before searching, and search with both versions.
  • Keep one source of truth. Translating the whole knowledge base into three versions means three places to forget an update.

8. The bot's own replies

The simplest rule is to mirror the customer. English gets English. Urdu script gets Urdu script. Roman Urdu gets Roman Urdu. A mixed message gets a natural mix. Replying to a casual Roman Urdu question in stiff formal English tells the customer the business did not really hear them.

Register should match too, within polite limits. If the customer is brief and friendly, be brief and friendly. Here is the same question arriving three ways, with a fitting reply each time.

Customer: "Hi, what are your timings on Sunday?" Bot: "Hello! We are open 11 am to 8 pm on Sundays."

Customer: "Salam, sunday ko shop khuli hoti hai?" Bot: "Walaikum Assalam! Ji, Sunday ko shop subah 11 se raat 8 baje tak khuli hoti hai."

Customer: "السلام علیکم، اتوار کو دکان کھلی ہوتی ہے؟" Bot: "وعلیکم السلام! جی، اتوار کو دکان صبح 11 بجے سے رات 8 بجے تک کھلی ہوتی ہے۔"

When the bot writes Roman Urdu, it should choose common, readable spellings and stay consistent. It should also keep product names, prices and order numbers exactly as the business writes them, whatever the language around them.

9. Testing with real messages

Test messages written by the team that built the bot are too clean. They are complete sentences with careful spelling, in the forms the builders already had in mind. Real customers send "rate?", then "blue wala", then a photo, then "cod hai?" as four separate messages.

The best test set is the business's own chat history. Collect real past messages, remove names and phone numbers, and run them through the bot. Read every answer. The failures will show patterns no one planned for: a local name for a product, a short form used only in one city, a question the documents never covered.

  • Include all three forms and plenty of mixed messages.
  • Include one-word messages and questions split across several messages.
  • Include amounts and dates in every format listed above.
  • Include angry messages, off-topic messages and messages with no question at all.
  • Repeat the test whenever the knowledge base or the instructions change.

10. When to hand over to a person

A bot does not need to handle everything. It needs to know its limits and step aside cleanly. Decide the handover rules before launch, write them into the bot's instructions, and make sure someone is on the other end.

  • The customer asks for a person, in any wording: "kisi insaan se baat karwa dein", "agent please", "call me".
  • The bot has failed to understand twice in a row.
  • The message is a complaint, or the tone is upset.
  • The matter involves a refund, a payment dispute, a medical question or anything the business has not approved the bot to decide.
  • The answer is not in the knowledge base. Saying "I will check with the team" is better than inventing a reply.

11. A handover that works

A good handover tells the customer what is happening and gives the staff member the conversation so far, so nobody has to repeat themselves.

Customer: "Mera order abhi tak nahi aya, 3 din ho gaye hain." Bot: "Maazrat chahte hain. Main aap ka order check karwa raha hoon aur aap ki baat hamari team tak pohancha di hai. Woh thori dair mein isi chat par aap se rabta karein ge."

The bot did not argue, did not guess at a delivery date, and replied in the customer's own style. That is the whole design in miniature: understand what was meant, answer the way the person spoke, and know when a human should take over. It is the kind of detail we care about at TIDES when we build and teach AI agents.

Learn to build this.

Four months, hands-on, in Lahore. Admissions are open.