SeqoFlow:让 LLM 语义查询在运行时动态调整执行计划
Navigating Runtime Dynamism in Semantic Query Serving
数据库组搞的新系统,专门解决 LLM 查询计划跑一半就失效的问题,靠投机估算边跑边换方案,做 RAG 或语义查询引擎的可以看看。
论文提出 SeqoFlow,一个面向 LLM 语义查询的运行时框架,同时处理查询间调度和查询内计划适配两层的动态性。框架把查询拆解为细粒度批次单元,在算子依赖下枚举等价执行计划,支持在批次边界安全切换计划或抢占查询。为避免在目标 LLM 上穷举剖析候选计划,SeqoFlow 采用轻量级投机估算来捕获运行时成本。实验覆盖多种查询结构、数据分布和到达率,端到端延迟相比现有语义查询系统、自适应查询处理技术和常规调度策略均明显降低。
Navigating Runtime Dynamism in Semantic Query Serving
LLM-powered semantic queries increasingly combine relational processing with multiple LLM-based operators over unstructured data. Efficiently serving such queries is challenging due to runtime dynamism at two coupled levels. Across queries, dynamic arrivals and heterogeneous resource demands continuously change scheduling priorities. Within a query, heterogeneous characteristics across fine-grained input batches cause operator costs and selectivities to vary throughout execution, making a statically optimized plan unreliable. These two forms of dynamism create a circular dependency: inter-query scheduling requires estimates of remaining LLM work, while the remaining work depends on runtime plan choices whose costs become observable only during execution. We present SeqoFlow, a runtime framework that jointly adapts query plans and schedules concurrent semantic queries. SeqoFlow enumerates equivalence-preserving plan alternatives under operator dependencies and decomposes queries into fine-grained units, enabling safe plan adaptation and query preemption at batch boundaries. To support both decisions without exhaustively profiling candidate plans on the target LLM, SeqoFlow uses lightweight speculative estimation to capture runtime costs. These estimates jointly guide plan adaptation and inter-query scheduling, closing the loop between query optimization and LLM inference. Experiments across diverse query structures, data distributions, and arrival rates show that SeqoFlow substantially reduces end-to-end latency compared to existing semantic query systems, adaptive query processing techniques, and conventional scheduling policies.