mlsanityData to 14 Oct 2026

Larch: Learned Query Optimization for Semantic Predicates

arXiv 2606.07923 ↗First posted 6 Jun 2026cs.DB cs.AI cs.LGcited by 4

Not on the map. Why?

Abstract (arXiv)

With the advent of Large Language Models (LLMs), many database systems introduced semantic operators that enabled analytical queries over unstructured data (e.g. text, images, videos). Semantic operators typically incur high inference costs and latencies making semantic (AI) SQL queries challenging to apply on large scale datasets. At the same time, their semantic nature leads database engines to treat them as black boxes, making AISQL queries difficult to optimize. In this paper, we introduce Larch, a framework for optimizing the execution of semantic filters in AI SQL queries. Larch was inspired by two key observations: i) the high latency of semantic operators leaves significant room for computationally-heavy runtime optimization techniques, ii) unstructured data are typically accompanied by semantic information in the form of embeddings allowing for efficient semantic comparisons between AI_FILTER prompts and data values. Based on these two key observations, we present two Larch variants: Larch-A2C and Larch-Sel. Larch-A2C encodes arbitrary semantic filters expression tree using an embedding-augmented Gated Graph Neural Network and formulates the filter evaluation order as a Markov decision process. In contrast, Larch-Sel leverages a supervised learning model to predict filter selectivities, subsequently applying dynamic programming to find a near-optimal evaluation order for each input row. Evaluated across diverse real-world datasets and comprehensive synthetic workloads, both Larch variants always outperform existing semantic filter optimization techniques in terms of token usage. Our results demonstrate that Larch is robust across diverse workloads, reducing total token cost overhead by 3x-19x compared to Palimpzest and Quest.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 23 of its 68 references that are in the map. First posted on arXiv 6 Jun 2026.

Builds on

23 of 68 references.

References · 23

  1. 2017Proximal Policy Optimization Algorithmscited by 15,215
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2016Layer Normalizationcited by 5,669
  4. 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 5,045
  5. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
  6. 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 853
  7. 2014Distributed Representations of Sentences and Documentscited by 678
  8. 2019BIGPATENT: A Large-Scale Dataset for Abstractive and Coherent Summarizationcited by 156
  9. 2018Learning Scheduling Algorithms for Data Processing Clusterscited by 134
  10. 2017PubMed 200k RCT: a Dataset for Sequential Sentence Classification in Medical Abstractscited by 124
  11. 2024Arctic-Embed 2.0: Multilingual Retrieval Without Compromisecited by 58
  12. 2024Semantic Operators: A Declarative Model for Rich, AI-based Data Processingcited by 34
11 more
  1. 2024Answer is All You Need: Instruction-following Text Embedding via Answering the Questioncited by 27
  2. 2024BlendSQL: A Scalable Dialect for Unifying Hybrid Question Answering in Relational Algebracited by 24
  3. 2019SkinnerDB: Regret-Bounded Query Evaluation via Reinforcement Learningcited by 17
  4. 2020Approximate Selection with Guarantees using Proxiescited by 15
  5. 2025Cortex AISQL: A Production SQL Engine for Unstructured Datacited by 11
  6. 2025QUEST: Query Optimization in Unstructured Document Analysiscited by 10
  7. 2024CascadeServe: Unlocking Model Cascades for Inference Servingcited by 4
  8. 2025Making Prompts First-Class Citizens for Adaptive LLM Pipelinescited by 3
  9. 2025ScaleDoc: Scaling LLM-based Predicates over Large Document Collectionscited by 3
  10. 2026Streaming Model Cascades for Semantic SQLcited by 3
  11. 2025A Case for Computing on Unstructured Datacited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 4.

4 papers.