用便宜大模型处理数据,还能保证准确率,成本降86%。
Cut Costs, Not Accuracy: LLM-Powered Data Processing with Guarantees
- 基于置信度自适应选择廉价大模型处理数据
- 在8个真实数据集上平均降本86%,准确率有理论保障
- 适合需要低成本高可靠性的数据清洗与标注场景
大型语言模型(LLMs)正被广泛用于处理大规模文本数据。不同规模的LLM在成本与质量间存在权衡:顶级模型(如GPT-4o、Claude Sonnet)准确但昂贵;更便宜的模型(如GPT-4o-mini、Claude Haiku)成本低但质量较差。现有模型级联框架依赖模型输出置信度来决定使用哪种模型,但估计不准,导致成本节省有限且理论保障弱。本文提出BARGAIN,通过新型自适应采样策略和统计估计方法,结合数据与任务特征,实现对廉价模型输出质量的精准估计,提供强理论保障。该方法可支持对准确率、精确率或召回率的保证。在8个真实数据集上的实验表明,相比最先进方法,BARGAIN平均降低成本达86%,同时在准确率、精确率或召回率方面均提供更强的理论保证。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。