DoorDash Summer 2025 Intern Projects: LLM-Powered Feature Extraction and RAG Chatbot Infrastructure

doordash · E-commerce · 2025 · 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: Food-delivery operations and internal chatbot infrastructure

DoorDash needed to reduce manual operational review for never-delivered orders and give teams reusable infrastructure for RAG chatbots instead of fragmented embeddings, spreadsheets, and one-off bot implementations.

Constraints:

Architecture

DoorDash describes two LLMOps systems from intern projects. The first is an in-house DistilBERT-based sequence classifier that processes Dasher-consumer conversations and outputs features for the downstream never-delivered order model. It handles class imbalance through rare-case oversampling and uses F1 as the primary metric. The second is a centralized Knowledge Base Management Service plus Chatbot-as-a-Service: teams create isolated vector collections, upload articles for embedding and metadata storage, configure prompts/fallbacks, and call GetRagResult for retrieval-augmented answers.

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

flowchart LR
  customer-dasher-conversations[Customer Dasher conversations] --> nd-feature-classifier[ND feature classifier]
  nd-feature-classifier --> downstream-nd-model[Downstream ND model]
  knowledge-base-management-service[Knowledge Base Management Service] --> vector-db-collections[Vector DB collections]
  knowledge-base-management-service --> getragresult-api[GetRagResult API]
  vector-db-collections --> getragresult-api
  prompt-configuration[Prompt configuration] --> getragresult-api
  getragresult-api --> team-chatbot-interface[Team chatbot interface]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Customer Dasher conversations Conversation inputs for never-delivered order feature extraction. ND feature classifier
ND feature classifier Custom in-house language model that predicts viable answers for the ND resolution process. Downstream ND model
Downstream ND model Attribution model that consumes extracted features from conversation review. ND feature classifier
Knowledge Base Management Service APIs for article upsert, retrieval, listing, metadata, embedding, and collection management. Vector DB collections, GetRagResult API
Vector DB collections Isolated per-bot vector collections with schema flexibility and embedding configuration metadata. Knowledge Base Management Service, GetRagResult API
GetRagResult API Shared RAG execution API that retrieves articles, applies prompt behavior, and returns answers and references. Vector DB collections, Prompt configuration, Team chatbot interface
Prompt configuration Team-defined behavior for retrieval success and fallback scenarios. GetRagResult API
Team chatbot interface Reusable chatbot front end or integration point for partner teams. GetRagResult API

Data flow

For ND review, customer-Dasher conversations enter the language model, which walks through the resolution decision process and emits features to the downstream ND model. For chatbots, teams upload knowledge articles through KB APIs; the platform generates embeddings and metadata, GetRagResult retrieves relevant articles from an isolated collection, combines them with conversation history and a prompt, and returns a context-aware answer plus referenced articles.

“Our language model automates this general pipeline, starting with the communications between the Dasher and the consumer.”article, stated
“Executing the full RAG workflow, the API retrieves relevant knowledge base articles, combines them with the user’s conversation history and a customizable prompt, and generates a context-aware response.”article, stated

Why this architecture

The ND classifier uses a lightweight task-specific model because precise binary feature extraction outperformed general-purpose reasoning models and reduced latency. The chatbot platform centralizes ingestion, embeddings, retrieval, prompts, and references because scattered spreadsheets plus vector IDs did not scale across teams.

“Although general-purpose reasoning models like Llama 3 are powerful at understanding and generating text, its performance was limited for our specific classification problem”article, stated
“Previously, teams stored article embeddings in a vector database, while managing metadata separately in spreadsheets.”article, stated

Models used: Meta Llama 3 70B · fine-tuned Meta Llama 3 70B · Meta Llama 3 8B · fine-tuned Meta Llama 3 8B · DistilBertForSequenceClassification · embedding models

Scale

Prediction: [1]"

— article, stated

Alternatives considered (roads not taken)

Manual customer-support review for ND labeling.

Rejected because: Manual review was slow, expensive, and limited resolutions to a few cases each day.

“Currently, this labeling process is performed manually by customer support agents, a slow process that limits resolutions to just a few cases each day.”article, stated

Use general-purpose Llama 3 reasoning models for ND classification.

Rejected because: The classification task needed precise event detection, and DistilBERT achieved better F1 and latency.

“Because we wanted precise and consistent classification, a specialized model like our fine-tuned DistilBertForSequenceClassification was much more accurate and reliable”article, stated

Let each team manage chatbot embeddings and metadata separately.

Rejected because: The spreadsheet/vector-ID workflow was error-prone and unscalable.

“they had to first locate an article in the spreadsheet and then use its associated ID to query the vector database - a workflow that was both error-prone and unscalable.”article, stated

Build one-off chatbot infrastructure per team.

Rejected because: DoorDash lacked a plug-and-play unified API, so the team built reusable Chatbot-as-a-Service.

“Teams lacked a unified API to easily create and deploy their own chatbots, as no plug-and-play infrastructure existed.”article, stated

Patterns

fine-tuning-adaptation (model-operations)

DoorDash trained a task-specific DistilBERT sequence classifier for ND feature extraction instead of relying on general-purpose Llama reasoning models.

“We built a lightweight, in-house language model to extract key features from conversation dialogues and to automate the labeling process.”article, stated

data-quality-loop (data)

The ND model oversampled rare positive cases and used F1 to avoid majority-class collapse on skewed labels.

“To address this, we oversampled the rare “yes” cases to ensure the model paid attention to the question. We also used the F1 score as our main evaluation metric”article, stated

rag-retrieval (retrieval)

The Chatbot-as-a-Service platform retrieves relevant knowledge-base articles and generates context-aware answers through GetRagResult.

“The GetRagResult API enables any team to deploy their own RAG-based chatbot using shared infrastructure.”article, stated

structured-output-contract (data)

The ND classifier outputs decision-process answers as downstream model features, while KB APIs standardize article ingestion and metadata storage.

“Based on this input, the model steps through the resolution process, predicting viable answers at each juncture. Answers are passed as a feature to the downstream ND model.”article, stated

Tradeoffs

ND model family selection

Chose Fine-tuned DistilBERT sequence classification. over Fine-tuned or prompted Llama 3 variants..

Rationale: DistilBERT better matched the precise binary classification task and had better F1 and latency.

“Classification (with balanced data)0.8630 0.7975 0.8289 0.9870 0.0936”article, stated

Platform chatbot infrastructure

Chose Centralized KB management plus generalized Chatbot-as-a-Service. over Team-specific bot stacks and fragmented KB workflows..

Rationale: A shared platform supports reusable onboarding, isolated collections, configurable embeddings, prompts, fallbacks, and references.

“we built a centralized Knowledge Base Management Service and a generalized Chatbot-as-a-Service.”article, stated

Per-bot isolation

Chose Dedicated vector collections per bot. over A single shared schema for all chatbot knowledge bases..

Rationale: Isolated collections preserve schema independence and future embedding customization.

“Each bot operates within an isolated collection, ensuring schema independence and allowing for customizable embedding logic.”article, stated

Gotchas (what bit them)

Rare ND labels were ignored without balancing.

Root cause: Some positive cases appeared in only about 1% of the dataset, so unbalanced models predicted the majority class.

Resolution: DoorDash oversampled rare yes cases and optimized with F1.

“Because these cases were so rare, the model lacking data balancing would simply ignore this question, always predicting "No" rather than allowing for that rare “yes” response.”article, stated

General-purpose reasoning models underperformed on the narrow classification task.

Root cause: The production task was precise event detection, not broad text generation.

Resolution: DoorDash selected a fine-tuned DistilBERT classifier with better F1 and latency.

“its performance was limited for our specific classification problem — deciding whether certain events in the conversation happened or not.”article, stated

Separate spreadsheets and vector stores made chatbot KB management fragile.

Root cause: Teams had to manually connect article metadata in spreadsheets to vector IDs.

Resolution: DoorDash built centralized KB APIs and per-bot vector collections with stored metadata.

“while managing metadata separately in spreadsheets. This meant they had to first locate an article in the spreadsheet and then use its associated ID to query the vector database”article, stated

Evaluation

DoorDash compared multiple Llama and DistilBERT variants on precision, recall, F1, accuracy, and latency; the chatbot platform is evaluated through production readiness, retrieval references, and team onboarding.

Metrics: DistilBERT with balanced data: precision 0.8630, recall 0.7975, F1 0.8289, accuracy 0.9870, latency 0.0936 seconds · Fine-tuned Llama 3 70B: F1 0.6087 and latency 0.3275 seconds · Live example inference time: 0.159 seconds · About 2 billion annual DoorDash orders

“Table 1: Table comparing DistilBert models on a custom classification task (in green) vs vendor models (in green). Distilbert achieves both a better F1 score and lower latency”article, stated
“In addition to the generated reply, the API also returns a list of referenced articles used during the retrieval step, providing transparency”article, stated

Outcomes

The case covers 2 billion annual orders, rare 1% positive labels, sub-second model latency, and a generalized platform designed to support many more bots across DoorDash.

“Through automation, agents can instead focus on more complex tasks, rather than repetitive case reviews.”article, stated
“This system currently powers our Dasher-facing assistant and is designed to support many more bots across the company.”article, stated