AI chatbots and LLM features

AI chatbots that answer from your own documents

We build chatbots for your website, app and WhatsApp, add LLM features to software you already run, and turn documents such as invoices into clean data. You own the code, the accounts and the keys.

Zoftaa is a small software studio in Lahore, Pakistan. We build AI chatbots and LLM features for businesses in the US, the UK, Europe, the Gulf and Pakistan, and the engineer on your scope call is the one who builds yours. The backend lessons on this page come from apps we've shipped with AI features. Document search and WhatsApp bots are written up as we would approach them. The Meta, OpenAI, Anthropic and Google rules quoted below link to each provider's own page and were checked on 1 November 2026.

What we build

The examples are illustrations, not past projects.

  • Support chatbots that answer from your documents. Your help pages, policies and product sheets are split into passages and indexed. For each question the bot finds the closest passages and answers from those only, linking the source. If the answer isn't there, it says so and passes the chat to a person. This is retrieval-augmented generation (RAG). Example: an online shop with 300 products where most chats are about delivery, sizes and returns.
  • WhatsApp chatbots. The same engine on your own WhatsApp Business number: order status, bookings, lead capture and a handover to staff. Example: a restaurant group in Lahore that takes table bookings on WhatsApp and sends anything unusual to the manager on shift.
  • LLM integration in software you already run. Summaries, draft replies, plain-language search, or tagging and routing incoming requests. Example: a logistics dashboard that writes a morning summary of failed deliveries and the reasons drivers logged.
  • Document extraction. Invoices, purchase orders and forms read into fields (supplier, date, line items, totals) and sent to a spreadsheet, accounting tool or database. Code checks each result: line items must add up to the total, dates must be real dates, and anything that fails goes to a person. Example: a distributor that gets 50 supplier invoices a week by email.
  • AI agents. An agent is a model that can act as well as answer: look up an order, create a ticket, offer a booking slot. We give it a short list of allowed actions, limits on what each one can change, and a log of every step so a person can check what it did. Example: a support agent that can check delivery status and issue a return label, and asks a person before any refund.
  • Internal assistants. A private bot over handbooks or procedures, behind your sign-in. Example: a school staff assistant that answers from the handbook and term calendar.

If the job is mostly moving data between tools with one AI step in the middle, it's probably an automation. See workflow automation with n8n.

Who it's for

Founders, product managers and operations leads in the US, the UK, Europe and the Gulf who have one of these problems:

  • a product that needs an AI feature, and no in-house AI engineer;
  • a support inbox where the same questions arrive every day;
  • a team retyping documents from email into another system.

We build for businesses in Pakistan too. Many shops, restaurants and schools here already take their customers' questions on WhatsApp, so that's where a bot saves the most time. If you're looking for an AI development company in Pakistan, the process and what you own are the same as for buyers abroad.

What we've learned shipping AI features

The team has shipped mobile apps whose AI features run on our own Python backends. These habits came out of that work.

  1. The model sits behind your backend. The app or website never holds an API key or calls a model directly. Your backend holds the keys and picks the model, which in our apps meant we could change models without releasing a new app version.
  2. Output is structured and checked in code. We ask for JSON with fields we name and parse it defensively, because models wrap JSON in code fences, drop commas and ignore length limits. The prompt states the rules, and the code enforces them. Our parsers are unit tested against bad outputs we've actually received.
  3. Retries come first, then a fallback. Rate limits (HTTP 429), server errors and dropped connections are retried with a growing pause (1 second, then 2). Other errors, such as a malformed request, aren't, because a retry won't fix them. An answer that was cut off counts as a failure. Our backends then try a second provider, and if that fails too, the user sees a clear message instead of a broken answer.
  4. Made-up facts can start in the prompt. When one of our prompts asked for "a specific statistic", models invented numbers to fill the gap. A prompt that asked for a personal angle got invented backstories. Our prompts now ask for facts from the supplied material only and rule out made-up anecdotes. A support bot gets the same rule: answer from the passages it found, or say it doesn't know.
  5. Chat history goes in a window. A chat prompt carries the last few messages (we've used 10), not the whole conversation, so each reply costs about the same as the chat grows.
  6. Usage is counted after delivery. A use counts only once the result reaches the user, so a failed or cancelled request costs them nothing, and per-user daily limits stop one heavy user from running up the bill. Analytics log success, failure and duration, never the prompt text, which can hold personal data.

How we'd approach a chatbot over your documents

This is the method we'd follow. We don't have a public build of it to show yet.

  1. Start from real questions. Before any code, we ask for 30 to 50 questions people actually sent you, with the answers you'd want given. That list becomes the test set.
  2. Decide what the bot must not answer. Refunds above a limit, prices it can't confirm and complaints go to a person, and the bot tells the customer so.
  3. Score every weekly build against the test set. You see which questions passed and which failed, so "is it good enough?" becomes a list you can read.
  4. Give the documents an owner. The bot only knows what the documents said when the index was last built, so the handover covers adding or changing a document and rebuilding the index.

WhatsApp: what Meta charges and allows

Meta's rules shape any WhatsApp bot, and its prices changed again on 1 October 2026. From Meta's pages, checked on 1 November 2026:

  • Meta has charged per delivered message since 1 July 2025. Messages from users to businesses are free (Meta pricing docs).
  • Replies within 24 hours of a customer's last message are "service" messages, which Meta says "can be powered by a 3rd-party AI solution or people". They used to be free. Since 1 October 2026 each business phone number gets 1,000 free delivered service messages a month, and Meta charges for the rest. A bot sending 4 replies per conversation uses that allowance in about 250 conversations.
  • Anything you send outside that window, such as an order update the next day, must be an approved template, priced by category and market. Utility templates sent inside the window were free from 1 July 2025, and Meta charges for them again from 1 October 2026.
  • Pakistan (+92) is its own market on the rate card. Its utility and authentication rates rose on 1 April 2026 and again on 1 October 2026.
  • Meta's terms prohibit AI providers from using the platform when AI is "the primary (rather than incidental or ancillary) functionality being made available" (Meta Terms for WhatsApp Business Platform, section 4.7). Our reading, not legal advice: a bot that serves your own customers is the ancillary kind. The same section bars using WhatsApp data to "create, develop, train, or improve" AI models, except to fine-tune a model "for your exclusive use".

The WhatsApp Business account and number sit in your own Meta Business account, and now that service replies are billed, that account needs a payment method on file. We connect your bot to it; we don't resell WhatsApp access.

How a project runs

  1. Scope call. One call to understand the problem and check that we're the right team. For a chatbot we ask what people ask today, where the answers live and who takes over from the bot.
  2. Fixed written plan. Milestones, price and dates before any code is written. For AI work it also lists the test questions, the topics that go to a person, and an estimate of monthly running cost at your volume from the provider's current price list.
  3. Weekly builds you can try. Every week you get a version to open (a test page, a WhatsApp test number or an app build) with the latest test results, so changes stay small and cheap.
  4. Handover. The code, accounts and keys with clear documentation: how to update the documents, edit the prompts, switch models and read the logs.

What you own

Everything the project produces, in accounts in your name:

  • the source code, in a repository you own;
  • the model provider account (OpenAI, Anthropic or Google), with your billing, so you pay the provider directly and see every charge;
  • the Meta Business account, WhatsApp Business account and phone number;
  • the hosting (AWS, Cloudflare, Supabase or Firebase) and the document index;
  • the prompts, the test set and the documentation.

Stack and tools

Layer What we use
Models OpenAI, Claude and Gemini APIs, or open-weight models through a hosted API, chosen per task on the server
Backend Python with FastAPI, or Node.js
Data and search PostgreSQL on Supabase (which can also store the embeddings used for document search), Firebase
Chat on the web React and Next.js for chat widgets and admin pages
Apps Flutter, React Native, Swift, Kotlin
Automation n8n, when the AI step is part of a wider workflow
Hosting AWS, Cloudflare, Docker

We choose a model by running your test questions through two or three candidates and comparing answers and cost per conversation. The backend owns that choice, so switching later is a configuration change. For the app or site around the bot, see mobile app development and web development.

Timelines

Planning ranges for a first version, not quotes. Your written plan has the real dates.

Project Typical range What moves it most
Website chatbot answering from your documents, with handover to a person 3 to 6 weeks How many documents there are, how tidy they are, how many topics need a handover
WhatsApp chatbot 4 to 8 weeks Meta's business verification and template approval, which run on Meta's timetable; links to your order or booking system
An LLM feature in an existing app or web app 2 to 6 weeks The state of the code, whether a backend exists, app store review
Document extraction into your systems 3 to 8 weeks The number of document layouts, the accuracy you need, the target system's API

The content usually matters more than the code: a tidy FAQ and a clear list of handover topics shorten a chatbot project more than anything on our side. After that come integrations, languages, and how quickly your side reviews each weekly build.

Working with us from abroad

Pakistan Standard Time is UTC+5 all year, with no daylight saving (Pakistan Standard Time). We work Monday to Friday, 10am to 7pm PKT. In your time:

City Our hours, your winter Our hours, your summer
London 5am to 2pm 6am to 3pm
Berlin, Paris 6am to 3pm 7am to 4pm
Dubai 9am to 6pm 9am to 6pm
Riyadh 8am to 5pm 8am to 5pm
New York midnight to 9am 1am to 10am

If you're in the US, we also take calls from 6pm to 10pm PKT, Monday to Friday. In New York that's 8am to 12pm in winter (EST) and 9am to 1pm in summer (EDT).

Against a 9am to 5pm day, our regular hours give full overlap with the Gulf and 5 to 7 hours with the UK and Europe. With the US East Coast our regular day ends as yours starts, so live calls and urgent replies happen in your morning, through the 6pm to 10pm PKT window, alongside the weekly build. The US and Europe change their clocks on different dates in spring and autumn, so for a few weeks a year one of them is on summer time while the other isn't.

You get a weekly build to try, a weekly call to go through it, and a reply from an engineer to any message, usually within one business day. To keep the same engineers every month instead of running a fixed project, see hire developers in Pakistan.

When we're not the right fit

  • An off-the-shelf tool already does the job. If your helpdesk's built-in AI or a chatbot builder answers your questions well, use it. Custom makes sense when you need your own data, systems or rules.
  • You need regulated advice. We don't build bots that give legal, tax or financial advice, and we hold no compliance certifications.
  • You want your own foundation model. We build on existing models through their providers' APIs; we don't train large models.
  • You need a large team next week, or cover around the clock. We're a small studio working Monday to Friday.
  • There's nothing to answer from yet. If your FAQ doesn't exist, writing it comes first, and it may answer most questions on its own.

Frequently asked questions

How much does an AI chatbot cost to build?

We don't publish prices, because they depend on scope. After the scope call you get a written plan with a fixed price and dates, before any code. Running costs are separate: you pay the model provider and, on WhatsApp, Meta, from your own accounts. The plan estimates them at your volume.

Will the chatbot make things up?

Any model can give a wrong answer, so we design for it: the bot answers only from your documents, links its source and hands sensitive topics to a person. Each weekly build is scored against your real questions, so you see where it stands before launch.

Is our data used to train the models?

Not by default on the paid APIs. OpenAI says "data sent to the OpenAI API is not used to train or improve OpenAI models" unless you opt in, and keeps abuse monitoring logs for up to 30 days by default (OpenAI). Anthropic says that by default it won't use inputs or outputs from its commercial products, such as the API, for training (Anthropic). Google's Gemini API depends on the tier: on unpaid use Google uses what you send "to provide, improve, and develop" its products, and on paid use it doesn't (Gemini API terms). All checked on 1 November 2026. Read the terms on your own account; this isn't legal advice.

Can you add AI to an app we already have?

Usually, yes. We need access to the code and a backend, or we add a small one so the API keys never sit inside the app. We'd ship one feature first and look at real use and cost before adding more.

Do you build WhatsApp chatbots for businesses in Pakistan?

Yes. The bot runs on your own WhatsApp Business number through Meta's platform, and because Pakistan (+92) is priced as its own market, the running-cost estimate in your plan uses Meta's current Pakistan rates.

What do you need from us to start?

Real questions your customers or staff ask, the documents that hold the answers, access to any system the bot should read from (orders, bookings, a CRM), and one person who can decide what a good answer looks like.

What happens after launch?

You have the code, the accounts and the documentation, so your team can run it. If you want us to keep improving it, a monthly product retainer keeps the same engineers on it.

Tell us what your customers ask most and where the answers live today. Start a project and an engineer will reply, usually within one business day.

Guides on this topic

AI and chatbots1 November 2026

RAG chatbots: how they work and what breaks

For owners planning a RAG chatbot over their own documents: how it finds passages, ten failures to design for, and a 40-question test to run before launch.

Contact

Have something that needs building?

Tell us about the problem in a few lines. An engineer will reply, usually within one business day.

Studio
Lahore, Pakistan
Hours
Monday to Friday, 10am to 7pm PKT
US calls
6pm to 10pm PKT, your morning on the East Coast
New work
Open for Q4 2026