自动构建可执行数据契约,实现多源数据统一查询与溯源。
Executable Schema Contracts: From Automatic Ingestion to Multi-Source Retrieval

- 用限定字段目录+结构分析自动提取数据契约
- 在4个QA基准上优于纯检索和分解基线
- 适合需要跨源精准查询与结果溯源的场景
现实世界数据包含表格、文档和半结构化文件,其语义隐含且格式不一。现有方法或需大量人工设计,或忽略结构。本文提出系统:从原始多源数据自动发现可执行数据契约,并作为知识图谱构建与查询时检索的共享规范。通过封闭世界字段目录约束大模型进行模式发现;利用确定性结构分析推断主键、外键及源层级关系;基于此契约驱动数据抽取、去重与跨源链接,构建带溯源的知识图谱。查询时,该契约(可选扩展)引导多工具智能路由,在结构化查询、图遍历与向量搜索间选择最优路径,返回可追溯引用的可靠答案。在相同大模型、数据和评估框架下,零样本对比显示,本系统在四个问答基准上均优于仅检索和分解式基线,消融实验表明,契约引导的路由、结构洞察力及契约指导的构建过程各贡献提升。
原文摘要 · Abstract (English)
Real-world data spans tables, documents, and semi-structured files with implicit semantics. Querying this data requires integrating evidence across inconsistent schemas and formats, yet existing approaches either demand costly manual engineering or bypass structure entirely. We present a system that automatically discovers an executable schema from raw multi-source data and uses it as a shared contract for knowledge graph construction and query-time retrieval. A closed-world field catalog constrains LLM-based schema discovery to attested fields; deterministic structural analysis infers identity keys, foreign keys, and source hierarchy; and the resulting schema drives extraction, deduplication, and cross-source linking into a provenance-aware knowledge graph. At query time the schema -- optionally extended via a monotonic protocol -- conditions a multi-tool agent routing retrieval across structured lookup, graph traversal, and vector search, returning grounded answers with traceable citations. In controlled zero-shot comparisons using the same LLM, data, and evaluation harness, the system improves over retrieval-only and decomposition-based baselines across four QA benchmarks, with ablations showing that schema-conditioned routing, structural intelligence, and schema-guided construction each contribute to the gains.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。