arXiv:2510.24014cs.CL2025-10ACL被引 12

让大模型自动把文本数据填入数据库,适应不同表结构。

TEXT2DB: Integration-Aware Information Extraction with Large Language Model Agents

  • 用LLM代理分三步:观察数据库、规划提取步骤、分析代码质量。
  • 在新基准上,模型能根据表结构动态生成适配的提取代码。
  • 适合需要自动化数据录入的场景,如智能客服、知识库更新。

信息抽取(IE)旨在从文本中提取结构化知识,但其输出常因与下游应用需求不匹配而难以使用。本文提出新任务TEXT2DB,强调将IE输出与目标数据库(或知识库)集成。给定用户指令、文档集和数据库,任务要求模型利用文档集中的值更新数据库以满足用户指令。该任务需理解用户意图并实时适配数据库模式。为此,我们构建了包含数据补全、行填充、列新增等常见需求的新基准,并提出LLM代理框架OPAL(Observe-Plan-Analyze LLM):Observer组件与数据库交互,Planner组件生成调用IE模型的代码计划,Analyzer组件在执行前评估代码质量。实验表明,OPAL可依据不同数据库模式生成相应代码计划并调用所需IE模型。同时,我们指出处理大型复杂依赖数据库及抽取幻觉等难点,值得深入研究。源代码:https://github.com/yzjiao/Text2DB

原文摘要 · Abstract (English)

The task of information extraction (IE) is to extract structured knowledge from text. However, it is often not straightforward to utilize IE output due to the mismatch between the IE ontology and the downstream application needs. We propose a new formulation of IE TEXT2DB that emphasizes the integration of IE output and the target database (or knowledge base). Given a user instruction, a document set, and a database, our task requires the model to update the database with values from the document set to satisfy the user instruction. This task requires understanding user instructions for what to extract and adapting to the given DB/KB schema for how to extract on the fly. To evaluate this new task, we introduce a new benchmark featuring common demands such as data infilling, row population, and column addition. In addition, we propose an LLM agent framework OPAL (Observe-PlanAnalyze LLM) which includes an Observer component that interacts with the database, the Planner component that generates a code-based plan with calls to IE models, and the Analyzer component that provides feedback regarding code quality before execution. Experiments show that OPAL can successfully adapt to diverse database schemas by generating different code plans and calling the required IE models. We also highlight difficult cases such as dealing with large databases with complex dependencies and extraction hallucination, which we believe deserve further investigation. Source code: https://github.com/yzjiao/Text2DB

信息抽取大模型代理数据库集成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。