Scaling Customer Support AI Chatbot to Production with Multiple LLM Providers

intercom · Tech · 2023 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: customer support chatbot reliability

Intercom needed to run Finn, a revenue-bearing customer support bot, at production reliability while using multiple LLM providers and Bedrock infrastructure.

Constraints:

Architecture

Intercom runs Finn as a multi-step support bot with RAG-like LLM components, custom observability, prompt/input logging, offline LLM-as-judge evaluation, production A/B tests, Bedrock cross-region inference, selective provisioned throughput, and fallback model/provider strategies.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["Finn support bot"] --> B["Amazon Bedrock runtime"]
  A --> C["Prompt and transaction logging"]
  A --> I["Observability and tracing"]
  C --> D["Offline evaluation engine"]
  D --> E["Production A/B test"]
  E --> A
  B --> F["Cross-region inference"]
  B --> G["Provisioned throughput"]
  B --> H["Fallback model router"]
  H --> F
  I --> C
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Finn support bot Customer-facing chatbot that resolves support conversations through multiple LLM-backed steps. Amazon Bedrock runtime, Prompt and transaction logging, Observability and tracing
Prompt and transaction logging Captures prompt templates, prompt inputs, generations, and HTTP request/response data for replay and analysis. Offline evaluation engine, Finn support bot
Offline evaluation engine Replays production prompt inputs against candidate changes and scores outputs with LLM proxy evaluators. Prompt and transaction logging, Production A/B test
Production A/B test Compares candidate behavior against production on real product metrics. Offline evaluation engine, Finn support bot
Amazon Bedrock runtime Managed runtime for Anthropic and other model calls used in the bot. Finn support bot, Cross-region inference, Provisioned throughput, Fallback model router
Cross-region inference Routes model calls across regions to improve availability and quota headroom. Amazon Bedrock runtime, Fallback model router
Provisioned throughput Dedicated capacity used selectively for stable latency and guaranteed throughput. Amazon Bedrock runtime
Fallback model router Retries on alternate models, providers, or regions when the primary path fails. Amazon Bedrock runtime, Cross-region inference
Observability and tracing Tracks time to first token, time to sample token, retries, errors, and upstream health. Finn support bot, Prompt and transaction logging

Data flow

Customer conversations flow through Finn's multi-call bot path. Prompt templates and prompt inputs are logged separately, replayed through candidate prompt or model changes, evaluated offline with LLM proxy metrics, then promoted to A/B tests. At runtime, Bedrock requests use retries, cross-region inference, provisioned throughput for selected workloads, and fallback models/providers when needed.

3 supporting quotes
“instead of logging the materialized prompt you want to log prompt template prompt inputs and generation separately”transcript, stated
“we merge the the production captured prompt inputs with new prompt template then we put it in an engine which is effectively just send all these queries in parallel to llm”transcript, stated
“once the change passes this stage which is just a normal development iteration Loop it goes to the second stage we run these St in we run an a test in production”transcript, stated

Why this architecture

The architecture treats LLM calls as unreliable production dependencies: log the right inputs for replay, evaluate changes offline, gate them through A/B tests, and make serving resilient with retries, regions, provisioned capacity, and fallbacks.

3 supporting quotes
“if any of these calls fail user doesn't get an answer they get an error so that's actually the reason why we had such a high error rate”transcript, stated
“because each request is so important to us because we make money that way we actually want to push it further”transcript, stated
“now most of the hours we effectively have no errors because of retries we have and because of multiple regions and providers we can use”transcript, stated

Models used: Amazon Bedrock models · Anthropic models · fallback model families · LLM-as-judge evaluators

Scale

Alternatives considered (roads not taken)

Streaming all model calls

Rejected because: Streaming enabled token-level metrics but made client retries difficult, so Intercom stopped using it everywhere for reliability-sensitive paths.

“if you turn on streaming by default almost no clients are going to do retries so if something fails that's it it's game over for you”transcript, stated

Pure on-demand Bedrock capacity

Rejected because: The shared pool could throttle before nominal quota, so selected workloads moved to provisioned throughput.

“that shared pool can run out ran out of capacity and when that happens you get throttles before you hit the quota”transcript, stated

Single model family without fallbacks

Rejected because: Model availability failures are not perfectly correlated, but fallback models require prompt adaptation and testing.

“model availabilities are pretty uncorrelated things okay so if you see an increased error rate on anal llama it's very likely that other models are quite fine”transcript, stated

Patterns

observability-tracing (operations)

Intercom tracks token-level latency metrics, retries, prompt inputs, and request traces to diagnose LLM serving health.

“if you track time to First token and time to sample a token what you get is a pretty good indicator of what's the health of the Upstream service”transcript, stated

llm-as-judge (evaluation)

Candidate bot changes are replayed offline and scored by LLM prompts that estimate whether the answer resolves the user query.

“we effectively have prompts that are trying to predict whether the question is resolving the user query”transcript, stated

fallback-degradation (reliability)

Requests can retry across regions, providers, and model families when one path fails.

“we are always able to retry and find somebody who's going to be able to serve our request successfully”transcript, stated

model-routing (model-ops)

Intercom recommends choosing models by use case rather than assuming one model fits every workload.

“make sure to choose the right model for the for the right use case is rare when one model does everything right”transcript, stated

Tradeoffs

Prompt logging design

Chose log templates and inputs separately over only logging materialized prompts.

Rationale: Separate logging lets the team replay production inputs against new prompt templates without conflating template, variables, and generation.

“instead of logging the materialized prompt you want to log prompt template prompt inputs and generation separately”transcript, stated

Capacity strategy

Chose selective provisioned throughput over all on-demand capacity.

Rationale: Provisioned throughput improved stability and latency for some workloads, but the large model units made blanket use expensive.

“it was very stable you get guaranteed trut but the model units you can buy are very big”transcript, stated

Serving resilience

Chose multiple regions and providers over single-region single-provider serving.

Rationale: Provider/model failures are imperfectly correlated, so fallback diversity improved availability despite added testing complexity.

“now most of the hours we effectively have no errors because of retries we have and because of multiple regions and providers we can use”transcript, stated

Gotchas (what bit them)

Streaming made retry behavior worse.

Root cause: Streaming clients often do not retry failed model calls, so a partial or failed stream becomes user-visible.

Resolution: Be explicit about where streaming is actually needed and disable it on reliability-critical paths.

“if you turn on streaming by default almost no clients are going to do retries so if something fails that's it it's game over for you”transcript, stated

Published quota did not mean guaranteed capacity.

Root cause: On-demand Bedrock capacity used a shared pool that could throttle before the maximum token quota.

Resolution: Use provisioned throughput selectively where stable capacity and latency justify the cost.

“the quota you see in AWS it's effectively the maximum amount of tokens you can get served and not guaranteed amount of tokens”transcript, stated

Fallback models are not plug-compatible.

Root cause: Prompts often depend on model-family behavior and must be adapted before fallback paths can be trusted.

Resolution: Test fallback performance and use prompt optimization or manual adaptation before relying on secondary models.

“if you want to use a fallback model and when the first one fails you have to adapt the prompt these prompts are rarely U easy to migrate”transcript, stated

Evaluation

Intercom combines offline replay with LLM proxy metrics and production A/B tests on real product metrics.

Metrics: time to first token · time to sample token · LLM-as-judge proxy resolution · production A/B product metrics · error rate · resolution rate

3 supporting quotes
“what you get is a pretty good indicator of what's the health of the Upstream service gives you a good way to to compare different providers”transcript, stated
“we get proxy metrics we had to spend a good amount of time to make sure that whatever we're getting from these LMS is actually a good proxy for what we care about”transcript, stated
“50% goes to production 50% goes to the new candidate and then we track real product metrics”transcript, stated

Outcomes

The product is revenue-sensitive because Intercom charges only on resolved conversations, making reliability and unit cost core engineering concerns.

3 supporting quotes
“it has resolved more than 13 million conversations for more than 4,000 customers”transcript, stated
“most of customers get more than 50% of resolution rate out of all the conversations is sent to our bot”transcript, stated
“now most of the hours we effectively have no errors because of retries we have and because of multiple regions and providers we can use”transcript, stated