
How Much Does a RAG Chatbot Cost?
A demo costs a weekend. A version you can put in front of customers costs considerably more, and almost none of the difference is the model.

Most teams asking how to add AI to an existing SaaS have already built the demo. A weekend with an API key produced something impressive, and the question is really: how does this become a feature customers rely on, without becoming a support problem?
The model is the easy part. What decides whether this works is which job you give it, and the plumbing around it that nobody demos.
The strongest AI features do a job the product already does badly, slowly, or not at all. The weakest ones add a chat box to a product nobody wanted to talk to.
Three shapes work far more often than they fail, because in each one the user can tell immediately whether the output is right.
The mistake that costs the most is calling a model API inline, inside the request, the way you would call your own database. Model latency is measured in seconds and varies by an order of magnitude between calls. Put that in the request path and you have rebuilt the concurrency problem that breaks MVPs under load.
The pattern that holds up: the request enqueues a job and returns immediately, a worker pool calls the model, and the result is delivered by polling or a websocket. That is the same shape as any other slow third-party integration — we wrote about picking the queue for it.
Two things follow from that, and both are easy to skip and expensive to retrofit:
Inference is a variable cost that scales with usage, which is unlike almost everything else in a SaaS cost base. Current per-token rates are published by the vendors — OpenAI and Anthropic both list them — and they fall regularly, so build the estimate from your own token counts rather than from a figure you read once.
The number that surprises teams is not the price per token, it is the token count. A RAG feature that stuffs ten retrieved documents into every prompt can use twenty times the input tokens of a naive implementation, for a marginal quality gain. Measure tokens per request before you launch, not after the first invoice.
Model your unit economics per customer, not in aggregate. One power user on an unlimited plan can cost more in inference than they pay you, and averages hide that until it is a pattern.
Any answer drawn from the customer's data should link to the record it came from. Citations do more for trust than accuracy improvements do, because they let the user verify in one click instead of deciding whether to believe you.
Give users a way to fix a wrong output and have the fix stick. A feature that is wrong and uncorrectable gets abandoned after two bad experiences; one that is wrong but easily corrected keeps its users.
The moment user content reaches a prompt, prompt injection is in scope — and if your model can call tools or read other customers' data, so is everything downstream. The OWASP Top 10 for LLM Applications is the standard checklist, and NIST's AI Risk Management Framework is worth a read before you sell this into an enterprise.
If your customers are in the UK or EEA, sending their personal data to a model vendor is a processing decision with contractual consequences. The ICO's guidance on AI and data protection covers what you need in place. Enterprise buyers will ask; having the answer ready shortens the sale.
That is roughly the shape of a three-to-four week build. If you want a second opinion on which job to give the model, or on what it will cost to run at your volumes, that is what our AI and LLM integration work covers.
Pick one job where a wrong answer is obvious to the user — extraction, drafting, or search over their own data — and run the model outside the request path, with a queue and worker pool, because model latency varies by seconds. Ship it behind a feature flag to a subset of customers, log every prompt and token count, and include a source link and a correction path in the first version.
No. Model latency is measured in seconds and varies by an order of magnitude between calls, so calling a model inline holds a connection open and reproduces the concurrency failure that breaks products under load. Enqueue a job, return immediately, and deliver the result by polling or websocket.
Inference is a variable cost that scales with usage. The per-token rate matters less than the token count: a retrieval feature that stuffs ten documents into every prompt can use twenty times the input tokens of a simpler one. Measure tokens per request before launch, and model the cost per customer rather than in aggregate, because one power user can cost more than they pay you.
Confidently wrong output that users cannot verify, prompt injection once user content reaches the prompt, unbounded inference cost from heavy users, and sending customer personal data to a model vendor without the contractual basis for it. The OWASP Top 10 for LLM Applications covers the security side; the ICO's AI guidance covers UK and EEA data protection.