Building a High-Quality RAG-based Support System with LLM Guardrails and Quality Monitoring

doordash · E-commerce · 2024 · source Agentic: no · promotional bias: low · 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: Dasher support automation

DoorDash needed to improve automated support for Dashers beyond brittle flow-based resolutions while preventing RAG hallucinations, compliance failures, and low-quality answers in a high-volume support setting.

Constraints:

Architecture

DoorDash built a RAG-based Dasher support chatbot with online guardrails and offline quality monitoring. The RAG flow condenses a multi-turn conversation into a core issue, retrieves top-N similar historical cases mapped to KB articles, injects article content into prompt templates, and generates a tailored response. An LLM Guardrail applies a shallow semantic-similarity check first and only escalates failures to an LLM evaluator. LLM Judge, rules, and human review provide continuous quality monitoring and improvement.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  dasher-conversation[Dasher conversation] --> conversation-summarizer[Conversation summarizer]
  conversation-summarizer --> historical-case-retriever[Historical case retriever]
  historical-case-retriever --> kb-prompt-template[KB prompt template]
  kb-prompt-template --> llm-chatbot[LLM chatbot]
  llm-chatbot --> llm-guardrail[LLM Guardrail]
  llm-guardrail --> human-support-agents[Human support agents]
  llm-guardrail --> llm-judge-monitoring[LLM Judge monitoring]
  llm-judge-monitoring --> human-review-team[Human review team]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Dasher conversation Multi-turn support interaction containing the Dasher's issue. Conversation summarizer
Conversation summarizer Condenses the conversation into the core support problem. Historical case retriever
Historical case retriever Searches top-N similar resolved cases and associated knowledge-base articles. KB prompt template
KB prompt template Combines issue summary, conversation context, and relevant KB content for generation. LLM chatbot
LLM chatbot Generates Dasher support responses from RAG context. LLM Guardrail
LLM Guardrail Two-tier online response check using semantic similarity and backup LLM evaluation. Human support agents, LLM Judge monitoring
LLM Judge monitoring Offline quality monitors and issue categorization for continuous improvement. Human review team
Human review team Reviews sampled transcripts and calibrates automated monitoring. LLM Judge monitoring
Human support agents Fallback path for complex or problematic cases. LLM Guardrail

Data flow

A Dasher issue is summarized from the conversation, used to search historical cases, and mapped to relevant KB articles. The article content is integrated into a prompt template for generation. The output must pass a semantic-similarity guardrail or an LLM evaluator before being shown; monitoring then uses LLM Judge, rules, and human samples to feed improvements back into prompts and retrieval.

“the system first condenses the entire conversation to pinpoint the core problem. Using this summary, it then searches historical data for the top N similar cases”article, stated
“Each identified issue corresponds to a specific article that is integrated into the prompt template.”article, stated

Why this architecture

DoorDash chose RAG because KB articles contained the support knowledge, but discoverability, extraction, and language barriers made the old flow-based system inadequate. The two-tier guardrail exists because always using an LLM evaluator would be too expensive and slow, while semantic similarity can cheaply catch grounded answers and reserve LLM evaluation for uncertain cases.

“These problems form a perfect use case for a RAG system that retrieves information from knowledge base articles to generate a response that resolves Dasher issues efficiently.”article, stated
“The first quality check layer is a semantic similarity comparison between the response and KB article segments. If this initial check fails, an LLM-powered second layer will further examine the response”article, stated

Models used: GPT-4 · Claude-3 · LLM Guardrail · LLM Judge · RAG chatbot

Scale

Alternatives considered (roads not taken)

Continue relying on pre-built flow-based support paths.

Rejected because: The flow system resolved only a small subset of Dasher issues quickly.

“Our existing automated support system, however, provides flow-based resolutions, relying heavily on pre-built resolution paths.”article, stated

Use LLM evaluation for every guardrail check.

Rejected because: The article describes LLM Guardrail latency as a drawback and uses semantic similarity as the first shallow check.

“LLM Guardrail's latency is a notable drawback caused by an end-to-end process that includes generating a response, applying the guardrail, and possibly retrying with a new guardrail check.”article, stated

Force automation for all problematic responses.

Rejected because: DoorDash defaults some problematic responses to human agents to preserve support quality.

“Given the relatively small number of problematic responses, strategically defaulting to human agents can be an effective way to ensure a quality user experience”article, stated

Patterns

rag-retrieval (retrieval)

DoorDash retrieves similar historical cases and KB articles, then injects the article into a prompt template for the support response.

“Using this summary, it then searches historical data for the top N similar cases previously resolved with information from KB articles.”article, stated

guardrails-io-filtering (governance)

Responses must pass semantic similarity and, when needed, an LLM evaluator before reaching the Dasher.

“A response must pass all guardrail tests to be shown to the end user.”article, stated

llm-as-judge (evaluation)

LLM Judge monitors retrieval correctness, response accuracy, grammar/language accuracy, context coherence, and relevance.

“The overall quality of each aspect is determined by prompting LLM Judge with open-ended questions, as shown in Figure 4.”article, stated

human-in-the-loop-gate (governance)

Human support agents handle complex fallback cases and a dedicated review team calibrates automated quality monitoring.

“Beyond the automated evaluation system, we also have a dedicated human team that reviews random subset transcript samples.”article, stated

Tradeoffs

Guardrail depth

Chose A two-tier semantic-similarity then LLM-evaluator guardrail. over Running the expensive LLM evaluator on every response..

Rationale: Semantic similarity cheaply catches responses grounded in KB article segments, while LLM evaluation handles flagged responses.

“The shallow check employs a sliding window technique to measure similarities between LLM responses and relevant article segments.”article, stated

Automation versus support quality

Chose High automation with human-agent fallback. over Forcing the LLM to answer every support request..

Rationale: Human defaulting preserves quality for the smaller number of problematic responses.

“strategically defaulting to human agents can be an effective way to ensure a quality user experience while maintaining a high level of automation.”article, stated

Open-ended quality discovery

Chose LLM Judge open-ended questions summarized into common issues and then converted into prompts/rules. over Only tracking business-level metrics such as feedback and speed..

Rationale: The open-ended monitor produces actionable categories for prompt, retrieval, and KB improvement.

“Answers to these questions are processed and summarized into common issues. The high-frequency issues are then built into prompts or rules for further monitoring.”article, stated

Gotchas (what bit them)

RAG answers can sound fluent while diverging from DoorDash support context.

Root cause: Foundation models may rely on stale or public DoorDash-related training data instead of the intended KB article.

Resolution: DoorDash checks groundedness and relevance with a two-tier LLM Guardrail before showing responses.

“Although these responses sound natural and legitimate, users may not realize that they are inaccurate.”article, stated

Online guardrails add latency to the user path.

Root cause: The full flow may generate a response, apply guardrails, and retry with a new check.

Resolution: DoorDash uses a shallow semantic check first and defaults some problematic responses to human agents.

“LLM Guardrail's latency is a notable drawback caused by an end-to-end process that includes generating a response, applying the guardrail, and possibly retrying”article, stated

Aggregate support metrics were not actionable enough to improve the chatbot.

Root cause: Dasher feedback, human engagement rate, and delivery speed did not identify concrete failure modes.

Resolution: DoorDash manually reviewed transcripts and categorized quality into monitored aspects.

“None of these perspectives, however, provide actionable feedback that would allow us to improve our chatbot system.”article, stated

Evaluation

DoorDash evaluated the system with online guardrail pass/fail checks, LLM Judge quality monitors, human transcript review, hallucination/compliance reductions, and operational support volume.

Metrics: 90% reduction in overall hallucinations · 99% reduction in potentially severe compliance issues · Thousands of chat transcripts reviewed for monitoring design · Thousands of Dashers assisted daily · Quality dimensions: retrieval correctness, response accuracy, grammar/language accuracy, coherence to context, relevance

“This guardrail system has successfully reduced overall hallucinations by 90% and cut down potentially severe compliance issues by 99%.”article, stated
“Our review allowed us to categorize LLM chatbot quality aspects into five areas: * Retrieval correctness * Response accuracy * Grammar and language accuracy”article, stated

Outcomes

The support system handles thousands of Dasher interactions daily, was built from thousands of transcript reviews, and reports 90% hallucination and 99% severe-compliance reductions.

“Each day, this system autonomously assists thousands of Dashers, streamlining basic support requests while maximizing the value of human contributions.”article, stated
“This collaborative system allows human support representatives to focus their energy on solving more complex problems for Dashers.”article, stated