Production LLM Implementation for Customer Support Response Generation

Sophie Daly15 May 2024

Problem

Stripe support agents handle tens of thousands of cases a week and spend much of that time searching documentation. The team wanted an LLM to suggest accurate answers in Stripe's friendly, succinct tone. General GPT models gave plausible but wrong domain answers. It suits domains with a documentation base and expert annotators.

Example from the article: asked how to pause payouts, GPT-3.5 gave a plausible but wrong answer, because there is no "pause payouts" button on the dashboard. The correct fix is a manual payout schedule.

Solution in brief

A four-stage GPT pipeline (trigger classifier, topic classifier, documentation-grounded generator, tone rewrite), each stage validated in shadow mode. Without online labels, a heuristic match rate between the suggestion and the agent's actual reply served as the accuracy proxy. A pilot lessons-learned talk: offline quality was good, but agents largely ignored the suggestions. No accuracy, adoption or CSAT numbers are reported; the value is the staged design and online monitoring.

Questions this case answers
  • How to produce factually accurate generated answers in a narrow domain where general-purpose models are plausible but wrong, using a staged pipeline of fine-tuned models
  • How to monitor the online accuracy of a model whose outputs cannot be labeled at scale and whose users often ignore them
  • How to make an LLM suggest factually correct answers on a domain where general GPT models hallucinate?
  • How to measure the online accuracy of suggested answers when labeling live cases is not feasible?

Tools and methods

  • Fine-tuned GPT models — trigger, topic and answer stages, a few hundred labels per class
  • Retrieval-augmented generation (RAG) by topic — the topic picks the documentation
  • Few-shot GPT — final rewrite into Stripe tone
  • Shadow mode — run in production, tag cases only
  • Heuristic match rate — online proxy for accuracy
  • Snorkel — second iteration: weak supervision
  • BERT-type classifier — planned cheaper replacement for simple stages
Continue reading — it's free

Google or a one-time email code. No password.