arXiv ScienceSearch

arXiv · 2509.12610

ScaleDoc: Scaling LLM-based Predicates over Large Document Collections

Abstract

Predicates are foundational components in data analysis systems. However, modern workloads increasingly involve unstructured documents, which demands semantic understanding, beyond traditional value-based predicates. Given enormous documents and ad-hoc queries, while Large Language Models (LLMs) demonstrate powerful zero-shot capabilities, their high inference cost leads to unacceptable overhead. Therefore, we introduce \textsc{ScaleDoc}, a novel system that addresses this by decoupling predicate execution into an offline representation phase and an optimized online filtering phase. In the offline phase, \textsc{ScaleDoc} leverages a LLM to generate semantic representations for each document. Online, for each query, it trains a lightweight proxy model on these representations to filter the majority of documents, forwarding only the ambiguous cases to the LLM for final decision. Furthermore, \textsc{ScaleDoc} proposes two core innovations to achieve significant efficiency: (1) a contrastive-learning-based framework that trains the proxy model to generate reliable predicating decision scores; (2) an adaptive cascade mechanism that determines the effective filtering policy while meeting specific accuracy targets. Our evaluations across three datasets demonstrate that \textsc{ScaleDoc} achieves over a 2$\times$ end-to-end speedup and reduces expensive LLM invocations by up to 85\%, making large-scale semantic analysis practical and efficient.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Hengrui Zhang, Yulong Hui, Yihao Liu, Huanchen Zhang. 2026-03-03. ScaleDoc: Scaling LLM-based Predicates over Large Document Collections. https://doi.org/10.1145/3802106

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Taxonomy Maintenance In The Wild Over Evolving Scholarly Data: Reliability, Efficiency, and Cost-Effectiveness

The rapid growth of scientific publications makes scholarly taxonomies quickly obsolete. We study taxonomy maintenance in the wild, a new problem that moves beyond static construction by continuously adapting taxonomies to evolving scholarly repositories, such as arXiv, for a given research topic. We propose GIST, a robust framework for maintaining evolving taxonomies. Unlike purely LLM-centric approaches, GIST grounds structure induction in expert-curated evidence by extracting partial hierarchies from the "Related Work" sections of papers. It integrates these partial taxonomies into a unified global taxonomy in a geometric box-embedding space, where box containment encodes the inductive bias of is-a relations. To connect semantics with geometric structure, GIST learns a bidirectional mapping between word embeddings and box embeddings. For efficient incremental updates, GIST uses novelty-aware coreset selection to update the model with representative historical signals and new evidence, avoiding costly full retraining. To handle high-velocity paper streams under user-specific token budgets, GIST further combines a hypothesized concept generator with a cost-effective evidence retrieval module. Experiments on real-world arXiv datasets show that GIST outperforms state-of-the-art baselines, improving Node F1 and Edge F1 by 11.0% and 13.1% over the strongest baseline while requiring only 9.6% of its runtime and 12.7% of its monetary cost.

cs.DB

Reducing the Cross-Model Tax: Query Optimization over Multi-Model Data

Querying across heterogeneous data models incurs overhead from query decomposition, result retrieval and conversion, and processing outside the underlying database systems. This paper investigates the extent to which, in a decomposition-based architecture, this cross-model tax results from decisions made by the unifying query processor rather than from heterogeneity alone. We present a mapping- and capability-aware optimization approach that moves applicable processing into native query parts. It combines model-aware predicate pushdown, cross-model dependent joins, and non-redundant query-part construction within a unified pipeline spanning relational, document, and graph databases. The approach is implemented in MM-quecat and evaluated using 20 read-only queries across PostgreSQL, MongoDB, and Neo4j, as well as a heterogeneous combination of the three systems in a single-machine, containerized deployment. For the query--environment combinations most affected by large intermediate results, predicate pushdown yields maximum observed latency reductions of up to two orders of magnitude and prevents the out-of-memory failures observed in the original single-DBMS experiments. Dependent execution further improves eligible external joins, while non-redundant construction reduces planning time for the largest evaluated graph plans, from hundreds of milliseconds to several milliseconds. The results show how established optimization principles can be applied across conceptual, mapping, data-model, and DBMS boundaries in decomposition-based multi-model query processing.

cs.DB

Towards Anticipatory Databases Through Shared Data and Workload Semantics

Database management systems increasingly serve dynamic and exploratory workloads, yet many of their decisions still rely on low-level signals such as recency, frequency, and address locality. These signals capture how data was accessed, but not what is being examined or how an analytical focus evolves. We argue for treating workload semantics as a first-class control signal for anticipatory decision making. Central to this view, we introduce semantic locality and semantic trajectories, which capture relationships among nearby queries and how those relationships evolve across a session. We propose a framework that represents semantic context at the data, query, and session levels, models its evolution over time, and translates it into task-specific utility estimates. We instantiate this framework in semantic prefetching and semantic cache eviction, which share a semantic layer to make two separate decisions. Prefetching uses semantic trajectories to anticipate future accesses beyond what address-based locality can capture, while eviction uses semantic relevance to inform block replacement. These systems provide initial evidence that shared semantic context can support multiple DBMS components. We further outline how this principle can extend to other decisions and data systems, and discuss key challenges in representation, cost, adaptation, and evaluation.

cs.DB