LEAP:基于 LLM 的端到端自动化库,用于处理非结构化数据上的社会科学查询
LEAP: LLM-powered End-to-end Automatic Library for Processing Social Science Queries on Unstructured Data
AI总结:
本文提出端到端库 LEAP,利用 LLM 与 ML 函数过滤模糊社会科学查询、标注非结构化数据并生成执行代码,在 QUIET-ML 上取得高通过率且成本较低。
摘要:
社会科学家越来越关注分析非结构化数据(例如 Tweets)中的语义信息(例如情绪),而这些语义信息并非原生存在。要以具有成本效益的方式执行此类分析,需要使用机器学习(ML)模型提取语义信息,随后分析由此形成的结构化数据。然而,这一过程对领域专家而言仍具挑战性。为展示社会科学分析中的挑战,我们收集了一个名为 QUIET-ML 的数据集,其中包含 120 个真实世界中的自然语言社会科学查询及其真实答案。现有系统难以处理这些查询,原因在于:(1)它们需要选择并应用 ML 模型;(2)这些查询中超过四分之一是模糊的,导致自然语言转 SQL 系统等标准工具并不适用。为解决这些问题,我们开发了 LEAP,这是一个端到端库,可利用 ML 回答自然语言形式的社会科学查询。LEAP 会过滤模糊查询,以确保答案具有确定性,并从内部支持的和用户定义的 ML 函数中进行选择,从而将非结构化数据扩展为带有必要标注的结构化表。LEAP 还会生成并执行代码,以响应这些自然语言查询。LEAP 在 QUIET-ML 上实现了 100% pass @ 3 和 92% pass @ 1,平均端到端成本为 1.06 美元,其中代码生成成本为 0.02 美元。
英文摘要:
Social scientists are increasingly interested in analyzing the semantic information (e.g., emotion) of unstructured data (e.g., Tweets), where the semantic information is not natively present. Performing this analysis in a cost-efficient manner requires using machine learning (ML) models to extract the semantic information and subsequently analyze the now structured data. However, this process remains challenging for domain experts. To demonstrate the challenges in social science analytics, we collect a dataset, QUIET-ML, of 120 real-world social science queries in natural language and their ground truth answers. Existing systems struggle with these queries since (1) they require selecting and applying ML models, and (2) more than a quarter of these queries are vague, making standard tools like natural language to SQL systems unsuited. To address these issues, we develop LEAP, an end-to-end library that answers social science queries in natural language with ML. LEAP filters vague queries to ensure that the answers are deterministic and selects from internally supported and user-defined ML functions to extend the unstructured data to structured tables with necessary annotations. LEAP further generates and executes code to respond to these natural language queries. LEAP achieves a 100% pass @ 3 and 92% pass @ 1 on QUIET-ML, with a \$1.06 average end-to-end cost, of which code generation costs \$0.02.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。