Compass: SLO-aware Query Planner for Compound AI Serving at Scale
Compass is a novel SLO-aware query planner that enables efficient, large-scale compound AI serving across diverse deployment environments by decomposing complex planning problems, utilizing selective profiling for cost-effective performance estimation, and employing bipartite matching to maximize service goodput while significantly reducing costs and planning latency.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are running a massive, high-tech restaurant kitchen. In the past, chefs (AI models) worked alone in one big kitchen (the cloud). But now, "Compound AI" is like a complex meal that requires a whole team: a sous-chef to chop vegetables, a grill master to cook meat, a sauce expert, and a delivery driver, all working together to serve a single dish to a customer.
The problem? You have thousands of orders coming in at once. Some customers want their food in 30 seconds (live video chat), while others are okay waiting a bit longer but want it to be the cheapest option possible (batch code generation). Furthermore, your kitchen isn't just one room; you have a fancy main kitchen (Cloud), a smaller satellite kitchen nearby (Edge), and even some home cooks (Edge devices) who can help.
Compass is the new, super-smart Head Chef (Query Planner) designed to manage this chaos. Here is how it works, using simple analogies:
1. The Problem: Too Many Choices, Not Enough Time
In the old days, if a new order came in, the Head Chef would try to figure out the perfect recipe. But with Compound AI, there are millions of ways to make the dish:
- Placement: Should the chopping happen in the main kitchen or the satellite one?
- Configuration: Should we use a giant, expensive knife (a huge AI model) or a small, fast one?
- Resources: How many cooks should we assign?
Trying to find the perfect plan for every single order takes hours. By the time the Chef figures it out, the customer has already left, or the food is cold. Existing systems were either too slow or only worked for simple, single-dish orders.
2. The Solution: Compass's "Smart Shortcuts"
Compass doesn't try to taste every single possible recipe. Instead, it uses three clever tricks to find a great recipe in seconds:
A. The "Similarity" Shortcut (Search Optimizer)
Imagine you've cooked a "Spicy Tofu" dish for a customer before. Now, a new customer orders "Spicy Tofu with a little less salt."
Instead of starting from scratch, Compass looks at its history. It says, "Hey, I know how the last Spicy Tofu turned out. I can use that knowledge to guess how this new one will taste."
- The Metaphor: It's like a chef who remembers that "Recipe A" and "Recipe B" are 90% similar. They don't need to taste-test the whole thing again; they just tweak the salt. This saves massive amounts of time and money (GPU costs).
B. The "Taste-Test" Triage (SLO Profiler)
To know if a recipe is good, you usually have to cook the whole thing and taste it. But cooking a giant AI model is expensive (it costs real money to run on powerful computers).
Compass uses a smart sampling technique.
- The Metaphor: Instead of eating the whole pizza to see if it's salty enough, Compass takes a tiny bite. If the first bite is clearly too salty, it stops immediately and says, "Nope, trash this recipe." If the first bite is clearly perfect, it stops and says, "Great, keep this one." It only cooks the whole pizza if it's on the fence. This saves huge amounts of money and time.
C. The "Global Seating Chart" (Multi-Query Planner)
If you plan every order individually, you might accidentally assign all the "Grill Masters" to the same table, leaving other tables empty and hungry.
Compass looks at all the orders at once. It creates a seating chart that balances the load.
- The Metaphor: It's like a bouncer at a club who doesn't just let people in one by one. They look at the whole crowd and say, "Okay, we have space at Table A for the big group, and Table B for the small group, so everyone gets served without anyone waiting too long." This ensures the whole kitchen runs efficiently, not just one dish.
3. The Results: Faster, Cheaper, Better
The paper tested Compass on real-world scenarios like live video chat with AI agents, speech-to-text, and code generation. Here is what happened:
- Speed: Compass found a good plan in seconds (2.4 to 5.1 times faster than before). This means users don't have to wait for their AI to "think" about how to start.
- Cost: It reduced the cost of running these services by 3.8 to 4.5 times. It's like getting the same meal for a fraction of the price by using the right ingredients and the right kitchen.
- Quality: It served 2.4 to 5.1 times more customers successfully without breaking the rules (SLOs).
Summary
Think of Compass as the ultimate traffic controller for a city of AI robots. Instead of letting every robot drive wherever it wants (causing traffic jams and delays), Compass looks at the whole map, remembers where it's been before, and directs traffic so that everyone gets to their destination quickly, cheaply, and safely. It turns a chaotic, expensive mess into a smooth, efficient operation.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.