arXiv:2503.00714v2 cs.DB 공식 코드 · Papers with Code

Speculative Ad-hoc Querying

Haoyu Li, Srikanth Kandula, Maria Angels de Luis Balaguer, Aditya Akella, Venkat Arun

제출 2025-03-02

원문 초록

Large language models (LLMs) invite substantial effort and investment, yet agentic systems can spend much of their time waiting for tools. This paper explores how a small auxiliary LLM can reduce these waits by speculatively preparing a database while the primary LLM reasons. The challenge is that the auxiliary model must anticipate the primary model's actions before the primary model takes them. Our key insight is that database systems give the speculator a structural advantage: it need not predict the exact next query. Instead, it can prepare work shared by many plausible queries. Predicting query shapes enables advance compilation, predicting data access warms caches, and predicting broader data requirements enables precomputation of superset results that subsequent queries can refine. We present Wonder, a system that exploits this advantage for analytical SQL workloads. Wonder constructs reusable superset queries, materializes their components, and rewrites subsequent queries against the resulting temporary tables. Its scheduler prioritizes foreground queries while using reasoning intervals for speculative preparation. The same engine supports humans writing SQL, using incomplete queries to guide speculation and displaying intermediate results as they type. In a replay-based evaluation of agent workflows, Wonder reduces SQL execution time by up to 31.8% and combined primary-agent reasoning and active SQL time by up to 22.6%, with approximately 6% higher recorded main-agent and prediction API cost and 10% more read I/O on the full dataset. A separate 24-participant study finds significantly lower query latency on both analytical tasks and improved time-to-answer on one, with 87.5% of participants reporting increased productivity.

제출 이력

확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.

  1. arXiv:2503.00714v2제출 시각 미확인

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

공통 태그로 연결된 공개 논문이 아직 없습니다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.