Skip to main content

DoorDash Runs Cheap Models First, LLMs Only on the Hard Cases

· Do Minh Tuan · Business Hackers 🚀

DoorDash Runs Cheap Models First, LLMs Only on the Hard Cases

DoorDash presented its content moderation platform at InfoQ, through Bruna Pereira. The company handles millions of messages a day across a marketplace, and the safety team has to catch harassment, fraud and the rest of it without spending an LLM call on every line of chat.

Their answer is a two-stage system. Fast internal models look at everything. The expensive language models only see what the fast layer could not decide.

That is the sort of design that looks obvious once someone else has shipped it, and I think it is the right default for almost any team building moderation this year.

The cost problem with putting an LLM at the front door

A large language model is good at reading intent. It is bad at being cheap, and worse at being fast. If every message waits for a model call, you pay per message and you add latency to a chat that is supposed to feel instant. At DoorDash's volume, that is a bill that scales with success, which is the worst kind.

The first stage, as I understand it, is a set of internal models built for speed. They catch the obvious cases: explicit keywords, known categories, the patterns that do not need nuance. Cheap, fast, and right most of the time.

The second stage is the LLM, and it does something more interesting than yes or no. It returns a multi-axis score, which means it rates the message on several dimensions at once, such as severity, intent and context, rather than making a single binary call. That gives the policy layer something to threshold on, and it gives investigators a reason for the decision.

Why multi-axis scoring matters more than it sounds

A binary classifier tells you 'violation' or 'no violation'. That is fine for a spam filter and useless for a trust and safety team, because the action depends on the severity. A threat and a rude joke both fail a politeness check. They should not get the same response.

Scoring on several axes lets the system route to different actions: remove, downrank, warn, queue for a human. It also produces data you can argue about later, which is what you want when a user appeals.

What worries me is that a multi-axis score is harder to calibrate than a single threshold. Two axes can disagree, the weights are a policy decision rather than a technical one, and the model's idea of severity may not match your lawyers'. That calibration work is where most of the effort goes, and it is invisible in a diagram like this one.

The no-code part is the real story

DoorDash also lets non-technical teams build and change moderation rules through no-code workflows, and it backtests those rules against historical data before they go live.

I care about that more than the model architecture. The bottleneck I would bet on is the same everywhere: the people who understand the policy cannot change the system, and the people who can change the system do not understand the policy. The result is a queue of small requests and a slow drift between what the policy says and what the code does.

Giving policy staff a drag-and-drop way to express a rule is a good move, as long as the rules are still versioned, reviewed and testable. No-code without those three things is just a faster way to break production.

Backtesting is the part I would copy first. Running a new rule against last month's messages tells you how many extra items it would flag and how many it would miss, before anyone sees it live. It turns a policy argument into a number, and it gives you a defensible answer when someone asks why their post was removed.

Where this design can go wrong

The first stage is a filter, which means everything it misses never reaches the smart layer. That is the failure mode to worry about. If the fast models are tuned for precision, they will let borderline abuse through. If they are tuned for recall, they will send too much to the LLM and you lose the cost saving.

Whichever way you tune it, you need a sample of what the first stage rejected, reviewed by a human, on a schedule. Otherwise the filter quietly becomes the policy and nobody notices for a year.

The second risk is that the multi-axis score turns into a number nobody can explain. If a message is actioned and the only record is a set of floats, appeals become guesswork and regulators will ask how the decision was made. Store the model version, the score and the rule that fired. It costs almost nothing and saves a lot of pain.

The third is that no-code rules multiply. Two hundred rules written by five people over two years is a system nobody can reason about. Someone has to own the rule set the way a team owns a codebase, with review and cleanup.

Strip away the DoorDash specifics and the general pattern is tiered processing, and it applies well beyond moderation.

Build one interface that takes content and returns a decision. Behind it, a fast path handles the common, easily identified cases with rules, regex or a small model. Anything else goes onto a queue for the slower, more expensive service. Keeping the slow path asynchronous stops it from blocking the request that a user is waiting on.

The queue is the piece I would not skip. If the expensive call is inline, a spike in traffic becomes a spike in latency, and users see a chat that hangs. If it is queued, the message goes through and the decision lands a second later, which is usually acceptable for moderation and never acceptable for a page load.

Before copying any of it, I would want to know how many messages reach the second stage and what that costs at my volume. I would ask for the false negative rate on the first stage, measured against humans rather than the model. I would want a named owner for rule changes and a review step before anything goes live. And I would want to know how a decision gets explained to a user who appeals it.

If those four have answers, the architecture is probably fine. If only the first one does, you have built a cost optimisation and called it a safety system.

DoorDash's platform is a good blueprint because it is mostly unglamorous. Filter first, score carefully, let policy people work without a developer, and test changes against history. None of that requires a frontier model, just the decision that moderation is a product with a budget and an audit trail, which I suspect most companies have not made yet.

Written with AI assistance, reviewed and edited by Do Minh Tuan.