Building an AI Chatbot for a Pakistani Business with OpenAI
Building an AI Chatbot for a Pakistani Business
For most local SMEs the winning channel is WhatsApp, and the winning bot handles Urdu, English, and Roman Urdu without complaint. Here is the stack that works.
Architecture
Retrieval, Not Just Prompting
Never dump a large catalogue into the prompt. Chunk it, embed it, and retrieve the top few chunks per query. Costs drop dramatically and answers get sharper.
Handling Urdu and Roman Urdu
Modern GPT-4-class models handle both natively. Two rules:
Function Calling for Real Actions
Give the model tools, not just words: check stock, create order, get order status, escalate to human. The model chooses when to call them. Your backend enforces authorisation.
Cost Control
Typical run cost for an SME with a few thousand conversations per month is small — usually less than a single human agent shift.
Safety Rails
Rollout
Start with one narrow use case (order status, or product recommendations). Measure containment rate weekly. Only add scope when the current scope is solid — the failed chatbots are the ones that tried to do everything on day one.
Wrap-Up
A well-scoped AI chatbot deflects 40–60% of routine queries and pays for itself inside a quarter. Keep it narrow, retrieve well, and let humans take over cleanly.