mlsanityData to 14 Oct 2026

Cut Costs, Not Accuracy: LLM-Powered Data Processing with Guarantees

arXiv 2509.02896 ↗First posted 2 Sep 2025cs.DB cs.AIcited by 9

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) are being increasingly used as a building block in data systems to process large text datasets. To do so, LLM model providers offer multiple LLMs with different sizes, spanning various cost-quality trade-offs when processing text at scale. Top-of-the-line LLMs (e.g., GPT-4o, Claude Sonnet) operate with high accuracy but are prohibitively expensive when processing many records. To avoid high costs, more affordable but lower quality LLMs (e.g., GPT-4o-mini, Claude Haiku) can be used to process records, but we need to ensure that the overall accuracy does not deviate substantially from that of the top-of-the-line LLMs. The model cascade framework provides a blueprint to manage this trade-off, by using the confidence of LLMs in their output (e.g., log-probabilities) to decide on which records to use the affordable LLM. However, existing solutions following this framework provide only marginal cost savings and weak theoretical guarantees because of poor estimation of the quality of the affordable LLM's outputs. We present BARGAIN, a method that judiciously uses affordable LLMs in data processing to significantly reduce cost while providing strong theoretical guarantees on the solution quality. BARGAIN employs a novel adaptive sampling strategy and statistical estimation procedure that uses data and task characteristics and builds on recent statistical tools to make accurate estimations with tight theoretical guarantees. Variants of BARGAIN can support guarantees on accuracy, precision, or recall of the output. Experimental results across 8 real-world datasets show that BARGAIN reduces cost, on average, by up to 86% more than state-of-the-art, while providing stronger theoretical guarantees on accuracy of output, with similar gains when guaranteeing a desired level of precision or recall.

Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 20 of its 50 references that are in the map. First posted on arXiv 2 Sep 2025.

Builds on

20 of 50 references.

References · 20

  1. 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 853
  2. 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 445
  3. 2022Can Foundation Models Wrangle Your Data?cited by 175
  4. 2020Estimating means of bounded random variables by bettingcited by 169
  5. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
  6. 2023Language Models Enable Simple Systems for Generating Structured Views of Heterogeneous Data Lakescited by 111
  7. 2020ConvoKit: A Toolkit for the Analysis of Conversationscited by 72
  8. 2024DocETL: Agentic Query Rewriting and Evaluation for Complex Document Processingcited by 52
  9. 2018BlazeIt: Optimizing Declarative Aggregation and Limit Queries for Neural Network-Based Video Analyticscited by 41
  10. 2024A Declarative System for Optimizing AI Workloadscited by 37
  11. 2024The Design of an LLM-powered Unstructured Analytics Systemcited by 20
  12. 2018Physical Representation-based Predicate Optimization for a Visual Analytics Databasecited by 19
8 more
  1. 2020Approximate Selection with Guarantees using Proxiescited by 15
  2. 2025ThriftLLM: On Cost-Effective Selection of Large Language Models for Classification Queriescited by 14
  3. 2020Semantic Indexes for Machine Learning-based Queries over Unstructured Datacited by 11
  4. 2023Solo: Data Discovery Using Natural Language Questions Via A Self-Supervised Approachcited by 11
  5. 2021Accelerating Approximate Aggregation Queries with Expensive Predicatescited by 10
  6. 2022On Efficient Approximate Queries over Machine Learning Modelscited by 7
  7. 2023Accelerating Aggregation Queries on Unstructured Streams of Datacited by 4
  8. 2024SMART: Automatically Scaling Down Language Models with Accuracy Guarantees for Reduced Processing Feescited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 8.

9 papers.