arXiv:2410.09244cs.DBcs.AI2024-10被引 2

用渐进式揭示本体,让大模型高效查询企业数据

Using off-the-shelf LLMs to query enterprise data by progressively revealing ontologies

  • 通过逐步暴露所需本体片段,突破提示词长度限制
  • 在不微调模型的前提下,显著提升自然语言转查询的准确率
  • 适合需要对接复杂企业数据系统的开发者和工程师

本体可提升大语言模型将自然语言查询转换为SQL或SPARQL等形式化查询的准确性。现有方法有两种:一是微调模型以注入领域知识,二是零样本提示法,将本体作为输入的一部分。然而,现代企业通常拥有过大本体,无法完整放入提示词中(受LLM上下文长度限制)。本文提出一种渐进式揭示策略,仅在回答特定问题时动态加载‘足够’的本体内容,有效解决规模瓶颈问题。

原文摘要 · Abstract (English)

Ontologies are known to improve the accuracy of Large Language Models (LLMs) when translating natural language queries into a formal query language like SQL or SPARQL. There are two ways to leverage ontologies when working with LLMs. One is to fine-tune the model, i.e., to enhance it with specific domain knowledge. Another is the zero-shot prompting approach, where the ontology is provided as part of the input question. Unfortunately, modern enterprises typically have ontologies that are too large to fit in a prompt due to LLM's token size limitations. We present a solution that incrementally reveals "just enough" of an ontology that is needed to answer a given question.

大模型本体企业数据提示工程

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