DoorDash spent almost nothing on AI search last quarter. Here's exactly how they did it.
Last quarter, DoorDash engineers published a breakdown of how they slashed their LLM-powered search costs by 98%—without losing a single point of search accuracy. Not 20%. Not 50%. Ninety-eight percent. In production. At scale. Millions of queries a day.
If you run any kind of AI-powered search, product recommendations, or customer lookup in your business right now, this matters to you—even if you're doing a few hundred queries a day instead of a few million. The logic is identical, and the savings are real.
What DoorDash Actually Did (And Why It's Genius)
Here's the thing most people miss about large language models: not every question is equally hard. When someone types "pizza near me" into DoorDash, that query doesn't require the same computational firepower as a complex, ambiguous search like "something spicy but not too heavy, open past midnight, under $20." One is routine. One is nuanced.
Before this change, DoorDash was routing both queries—the dead-simple and the genuinely tricky—through the same expensive, full-size model. That's like scheduling every patient who walks into an ER directly with a specialist, no matter what they came in for. Expensive, slow, and completely unnecessary for most cases.
Their fix was elegant: they built a routing layer.
- A small, fast, cheap model handles the easy queries—roughly 90% of all traffic.
- Only the hard, ambiguous, or high-stakes queries get escalated to the full-size model.
- The routing decision itself takes milliseconds and costs almost nothing.
Think triage nurse, not ER chaos. Most patients get handled efficiently at the front desk. The surgeon only steps in when you actually need a surgeon.
The result: 98% cost reduction with zero accuracy loss. That's not a pilot. That's production-proven, at one of the largest food delivery platforms in the country.
Why Your Business Is Probably Doing the Expensive Version Right Now
If you're using AI-powered search on your e-commerce site, a customer support bot, or any kind of product recommendation engine—and you set it up by connecting to GPT-4, Claude, or another top-tier model and leaving it there—you're almost certainly overpaying.
It's not your fault. When you're getting started, using the best model feels like the safe choice. And it is, to get things working. But once you're in production, routing every query to your most powerful model out of habit is like leaving every light in your warehouse on 24/7 because you don't want to miss anything.
Here's what that looks like in a real SMB operation:
- A customer types "black t-shirt, medium" into your store search. Your $0.03-per-query GPT-4 call fires. That's a $0.003 small-model job.
- Someone asks your support bot "where's my order?" Your big model wakes up. It didn't need to.
- A repeat customer browses the same three categories they always browse. Your recommendation engine runs a full inference. Every. Single. Time.
Multiply that by hundreds of daily interactions and you're burning real money on queries that a lightweight model could handle with identical results.
How to Build a Routing Layer Without a Developer
This is the part that surprises most operators: you don't need to hire an engineer to implement this logic. The concept is straightforward, and tools like n8n—a visual workflow automation platform—let you build routing logic with a drag-and-drop interface.
Here's the basic architecture in plain English:
- Classify the query first. Before sending anything to a big model, run the input through a tiny, cheap classifier. Its only job is to answer one question: is this query simple or complex? This step costs fractions of a cent.
- Route based on the answer. Simple query? Send it to a small, fast model—GPT-4o mini, Gemini Flash, or similar. Complex query? Escalate to your full model.
- Log and tune. Over time, you'll see patterns. You can refine your classifier to get the routing even tighter.
In my own e-commerce and import operation, I use n8n to orchestrate exactly this kind of logic across product lookups, supplier queries, and customer-facing search. The routing layer I built in an afternoon cut my LLM API spend by more than half in the first month—and I didn't touch a single line of model code.
The goal isn't to use the smartest AI for everything. The goal is to use the right AI for each job—and let the routing handle the decision automatically.
You'll also want to monitor for accuracy drift—make sure your small model is actually getting the easy ones right. Set a simple feedback loop: if a query routed to the small model gets a poor result or a customer complaint, flag it for review. That feedback tightens your classifier over time. DoorDash built this feedback loop in. You should too.
What This Means for Your Bottom Line
DoorDash's 98% reduction is dramatic because of their scale. But even at SMB volumes, the math moves fast:
- If you're spending $300/month on LLM API calls and 85% of your queries are routine, a routing layer could bring that closer to $50–$80/month.
- If you're at $2,000/month, that's potentially $1,500+ back in your pocket—every month—without changing what your customers experience.
This isn't about cutting corners on AI. It's about being precise with where you spend. The best operators I know don't use the most expensive tool for every task. They use the right tool, automated intelligently, so the expensive tools are reserved for the moments that actually need them.
If you want to map out how this would work in your specific stack—your search, your bot, your recommendation engine—we can walk through it together. At Maqia, this is exactly what we help small and mid-sized business owners build: lean, smart AI workflows that run like a larger operation without the larger overhead. Head to maqia.co and book a call. We'll look at where your AI spend is going and show you exactly where the routing layer would make the biggest dent.