
Chatbot architecture: an unbiased guide for businesses
1\. Introduction: The Challenge of Decision-Making in 2026
To integrate generative AI into customer service or internal processes, companies today face an avalanche of options: from a well-designed static prompt to complex architectures like RAG, Agentic RAG, or agents via MCP. The most common trap in 2026 is choosing the most popular technology without evaluating whether it fits the data volume, team capacity, or risk tolerance. Gartner projects that nearly 70% of companies will have RAG-based chatbots operating by the end of 2026, but warns that more than 40% of autonomous agent projects will be canceled before 2027 due to underestimating governance and maintenance costs.
The regulatory context reinforces this need: starting August 2026, the EU AI Act requires high-risk AI systems—including chatbots interacting with European citizens—to document traceability, assess biases, and maintain human intervention, requirements that rule out opaque architectures like external chatbot SaaS.
This is an unbiased guide: it compares the available routes for implementing an enterprise chatbot architecture—static prompt, fine-tuning, long-context, CAG, classic RAG, and Agentic RAG with MCP—with their real benefits and hidden pitfalls. The guiding criterion is simple: start simple, measure, and evolve only when the case justifies it.
2\. The Architectures and Their Hidden Pitfalls
Each route has a distinct profile of cost, control, and maintenance. A sales dashboard rarely shows these limits. The following sections detail each architecture with its real advantage and its operational pitfall.
2.1 Static Prompt: The Legitimate Entry Point
The static prompt gives all instructions and context to the model at once. It is the fastest and cheapest option to start with—ideal for repetitive and predictable tasks with low volume, using cost-effective models like DeepSeek V4 Flash, Qwen 3.5 Flash, or GPT-4.1-Nano (under USD 1.60 per million output tokens)—but it has no memory: it confidently hallucinates when data changes. It is the right architecture only for simple cases, with no need for up-to-date knowledge or traceability.
2.2 Fine-Tuning, Long-Context, and CAG
Fine-tuning adjusts the model's weights with proprietary data: it is useful for standardizing brand tone or enforcing an output format, but it does not persist new knowledge, because retraining with every price or policy change is operationally unfeasible. A Microsoft study (Ovadia et al., "Fine-Tuning or Retrieval?", 2024) confirms that RAG consistently outperforms unsupervised fine-tuning on knowledge-based questions. Long-Context and CAG leverage windows of over 1 million tokens (Gemini 3.5 Flash, Sonnet 4.6, GLM 5.2), but suffer from the "Lost in the Middle" phenomenon: according to Stanford (Liu et al., 2024), after evaluating six model families, accuracy drops by more than 30% when relevant information is in the middle of the context.
2.3 Classic RAG: The Sweet Spot
RAG (Retrieval-Augmented Generation) is like an open-book exam: the system queries your exact documentation and the LLM drafts the response based solely on what it finds. ByteByteGo (newsletter EP169, June 2025) describes the flow in three steps: retrieve relevant data from a vector database, augment the prompt with that information, and generate the response. Advantage: it decouples knowledge from the model and enables full traceability; pitfall: it requires initial engineering and continuous retrieval monitoring.
2.4 Agentic RAG and MCP
When classic RAG hits its ceiling—questions that combine CRM, inventory, and history—you evolve to Agentic RAG: an agent decides which tools to use before responding, with short- and long-term memory, a retrieval strategy, and tools like vector search or MCP servers (ByteByteGo, EP169). Rule of thumb: use RAG when the answer lives in your documents, and an agent when it requires action on other systems. MCP (Model Context Protocol), promoted by Anthropic since 2024, is the open standard that acts as the "USB-C of AI." The pitfall, according to Gartner (2025): more than 40% of these projects will be canceled before 2027 due to underestimating their maintenance.
2.5 Chatbot SaaS: The Trap That's Hardest to Detect
Paying for an external platform (Intercom Fin, Zendesk AI, Ada, Chatbase) may seem like the fastest route to production, but it comes with three hidden costs that rarely come up in the sales demo: it scales linearly with volume (~$0.99–1.50 USD per resolved conversation), the setup is closed off for the average use case, and it's a black box—you can't audit which fragment was retrieved or why it responded a certain way, and if the provider changes the engine, you'll find out when the bot starts malfunctioning. For a company planning to scale, it's the most expensive option in the long run: it locks you into a vendor (vendor lock-in) and offers no auditability. If your use case is simple, use Static Prompt; if it's complex, build your own architecture. SaaS is rarely the right answer: it's the most convenient option, not the most cost-effective.
2.6 Recommended LLM models by architecture (2026)
The choice of model directly impacts cost, latency, and response quality. Prices are reference values in USD per million tokens.

The most expensive model isn't necessarily the best: a well-configured RAG with DeepSeek V4 Flash or GPT-4.1-Nano can cost 10 times less than the same architecture with Claude Sonnet 5, with no loss in quality if retrieval is solid.
3\. Real-world cases and best practices before production
These three cases, documented between 2024 and 2026, show how different architectures impact operations once they reach production.
3.1 Rocket Companies: conversion with agents
Rocket Mortgage built its Rocket AI Agent on Amazon Bedrock Agents (Agentic RAG): the bot guides the home-buying process with real-time context and escalates to a human advisor when confidence is low. According to AWS (2025), it achieved 3x more conversion from web traffic to closed loans and 85% fewer transfers to customer service. The lesson: the chatbot isn't measured by how much it saves on support, but by how much revenue it generates, because the agentic architecture anchors real-time data to the sales process.
3.2 Klarna: the balance between RAG and humans
In 2024, Klarna launched an assistant using OpenAI with retrieval over its help center: in the first month, it handled 2.3 million conversations (two-thirds of the total), cut resolution time from 11 to 2 minutes, and saved an estimated $40 million. In 2025, the CEO acknowledged to Bloomberg that they had cut human support too deeply and reintroduced agents for complex cases; in 2026, according to LangChain, they rebuilt part of the assistant on LangGraph, automating around 70% of repetitive tasks. The lesson: RAG efficiency is real, but reducing headcount without a safety net for sensitive cases is a reputational risk—bot autonomy is a product decision, not just an engineering one.
3.3 DoorDash: RAG as an ongoing operation
DoorDash built RAG-based support for its delivery drivers (Dashers) and, to ensure quality in production, implemented an "LLM Judge" that continuously evaluates the bot on five metrics: retrieval correctness, accuracy, grammar, coherence with context, and relevance. This case confirms that a custom architecture isn't a one-time cost: success requires an ongoing operational pipeline for evaluation and monitoring.
4\. Decision tree: how to choose your architecture
With the architectures, their pitfalls, and the real-world cases on the table, these questions—ordered by increasing complexity—let you identify the right chatbot architecture in under five minutes. The logic is exclusive: the first question that gets a "yes" defines the initial architecture; the rest are future evolutions.
- Is the problem about “how the model speaks” rather than “what it knows”? → Fine-tuning. Adjust tone, style, or output format. It does not persist new knowledge.
- Do you need to go to production quickly, with low volume and a simple, predictable use case? → A well-designed Static Prompt. Use a cost-effective model (GPT-4.1-Nano or DeepSeek V4 Flash) with clear instructions and input validation. If the use case grows or requires traceability, evolve to RAG.
- Is your knowledge base small (<50 documents), stable, and does it fit within the model’s context? → CAG (Cache-Augmented Generation). Preload the knowledge into the model’s KV-cache. Zero retrieval latency.
- Is your knowledge base large, frequently changing, and do responses need to be auditable? → Classic RAG. Balance between accuracy, control, and cost. Updating data means uploading a file to the vector database.
- Does the bot need to combine CRM, inventory, and history, or execute multi-step tasks? → Agentic RAG. An agent decides which tools to use before responding. Only when complexity justifies it.
- Does the agent need to connect to CRM, ERP, Jira, or Slack? → MCP (Model Context Protocol). Open standard promoted by Anthropic since 2024. The “USB-C of AI”: eliminates custom integrations.
- Do you operate in a regulated sector (healthcare, finance, government) with sensitive data? → Custom architecture with explicit governance. Controlled data residency, GDPR/HIPAA/LGPD, external SaaS is not viable.
4.1 Visual decision matrix: cost vs control
The following matrix places architectures on two axes: cost/effort (vertical) and control/traceability (horizontal). A regulated company should look to the right of the chart; a startup that needs to launch quickly can start with a static prompt. Chatbot SaaS falls in the zone to avoid: expensive and without control.

Figure 1. Decision matrix: architectures positioned by cost (Y) and control/traceability (X). Classic RAG is the operational balance; Agentic RAG + MCP is the strategic investment. SaaS is in the zone to avoid.
The most costly mistake in 2026 is not choosing the “wrong” architecture, but overbuilding the first iteration: building an autonomous agent when a static prompt or a well-configured RAG solves 80% of the problem is the #1 cause of project cancellation.
5. Conclusion
There is no universally correct chatbot architecture: for a quick MVP with low volume, a well-designed static prompt is enough; to adjust tone, fine-tuning; for small, stable knowledge bases, CAG; for vast, changing knowledge with traceability, classic RAG; and for multi-system transactional processes, Agentic RAG with MCP. The decision depends on the size of your data, your team’s maturity, and your risk tolerance.
The competitive advantage in 2026 is not in choosing the most advanced technology, but in aligning the chatbot architecture with a clear business strategy: start simple, measure, and evolve only when the use case justifies it. What you should avoid is paying for external SaaS, which locks you into a vendor, scales in cost without control, and does not allow you to audit what it responds. A custom architecture, designed with the hexagonal pattern, gives you the flexibility to change models and vendors without rewriting the system.
Implementing a chatbot architecture not only improves technical efficiency, but also enables companies to optimize their processes, reduce costs, and scale solutions securely and sustainably. At Kranio, we have specialized teams that have implemented this type of solution in real enterprise projects.
If your company is looking to implement this type of solution, you can contact us at www.kranio.io
References
- Ovadia, O. et al. (2023/2024). Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs. ArXiv:2312.05934. Microsoft Research. Available at: https://arxiv.org/abs/2312.05934
- Balaguer, A. et al. (2024). RAG vs Fine-tuning: Pipelines, Tradeoffs, and a Case Study on Agriculture. Microsoft Research. Available at: https://arxiv.org/abs/2401.08406
- Liu, N. F. et al. (2024). Lost in the Middle: How Language Models Use Long Contexts. TACL, Vol. 12\. Stanford University. Available at: https://arxiv.org/abs/2307.03172
- Chan, B., Huang, C., et al. (2024). Don’t Do RAG: When Cache-Augmented Generation is All You Need. ArXiv:2412.15605. Available at: https://arxiv.org/abs/2412.15605
- ByteByteGo (June 2025). EP169: RAG vs Agentic RAG. Alex Xu's Newsletter. Available at: https://blog.bytebytego.com/
- Anthropic (2024). Model Context Protocol (MCP) Specification. Available at: https://modelcontextprotocol.io/
- Amazon Web Services (2025). How Rocket streamlines the home buying experience with Amazon Bedrock Agents. Available at: https://aws.amazon.com/blogs/machine-learning/
- Klarna International (2024). Official press release on the AI assistant. Available at: https://www.klarna.com/international/press/
- LangChain (2026). How Klarna’s AI assistant redefined customer support at scale. Available at: https://blog.langchain.dev/
- Evidently AI (2025). 10 RAG examples and use cases from real companies — DoorDash case. Available at: https://www.evidentlyai.com/rag/rag-use-cases
- Gartner Inc. (2024-2025). Market projections on RAG adoption and autonomous agents. Available at: https://www.gartner.com/
- European Commission (2026). EU AI Act — full application for high-risk AI systems. Available at: https://artificialintelligenceact.eu/
- Z.ai (2026). GLM-5.2 Technical Report and API documentation. Available at: https://z.ai/
- DeepSeek (2025). DeepSeek V4 Technical Report. Available at: https://www.deepseek.com/
Previous Posts

AI Prompt Injection: How to Secure Your Infrastructure
Discover what Prompt Injection in AI is, how the latest attacks work, and what strategies to implement to protect agents, copilots, and LLM-based systems.

RabbitMQ (the king of queues) or Apache Kafka (the event streaming giant)?
Learn the differences between RabbitMQ and Apache Kafka, their use cases, and the 2026 updates to choose the best messaging solution for your architecture.
