Semantic operators have increasingly become integrated within data systems to enable processing data using Large Language Models (LLMs). Despite significant recent effort in improving these operators, their accuracy is limited due to a critical flaw in their implementation: lack of holistic data understanding. In existing systems, semantic operators often process each data record independently using an LLM, without considering data context, only leveraging LLM's dataset-agnostic interpretation of the user-provided task. However, natural language is imprecise, so a task can only be accurately performed if it is correctly interpreted in the context of the dataset. For example, for classification and scoring tasks, which are typical semantic map tasks, the standard method of processing each record row by row yields inaccurate results in a wide range of datasets. We propose HoldUp, a new method for semantic data processing with holistic data understanding. HoldUp processes records jointly, leveraging cross-record relationships to correctly interpret the task within the data context. Enabling holistic data understanding, however, is challenging due to what we call LLM data understanding paradox: while large representative data subsets are necessary to provide context, feeding long inputs to LLMs causes quality degradation due to well-known long-context issues. To resolve this paradox, we develop a novel clustering algorithm to identify the latent structure within the dataset through judicious use of LLMs, inspired by bagging. Using this approach as a primitive, we develop novel clustering-based classification and scoring methods to perform these two tasks with high accuracy. Experiments across 15 real-world datasets show that HoldUp consistently outperforms existing solutions, providing up to 33% higher accuracy for classification and 30% higher accuracy for scoring and clustering tasks.
翻译:语义算子已逐渐集成到数据系统中,以便利用大型语言模型(LLM)处理数据。尽管近期在改进这些算子方面付出了大量努力,但其准确性仍受限于实现中的一个关键缺陷:缺乏对数据的整体理解。在现有系统中,语义算子通常使用LLM独立处理每条数据记录,而未考虑数据上下文,仅依赖LLM对用户提供任务的、与数据集无关的解读。然而自然语言具有不精确性,因此只有在数据集上下文中正确解读任务时,才能准确执行该任务。例如,对于分类和评分任务(典型的语义映射任务),逐行处理每条记录的标准方法在多种数据集上会产生不准确的结果。我们提出HoldUp——一种基于整体数据理解的语义数据处理新方法。HoldUp联合处理多条记录,利用跨记录关系在数据上下文中正确解读任务。然而,实现整体数据理解面临我们称之为“LLM数据理解悖论”的挑战:虽然需要大型代表性数据子集来提供上下文,但向LLM输入过长内容会因著名的长上下文问题导致质量下降。为解决这一悖论,受集成学习启发,我们开发了一种新型聚类算法,通过审慎使用LLM来识别数据集的潜在结构。以此方法为基本工具,我们进一步开发了基于聚类的分类与评分新方法,以高精度执行这两类任务。在15个真实数据集上的实验表明,HoldUp始终优于现有解决方案,在分类任务上准确率最高提升33%,在评分与聚类任务上准确率最高提升30%。