利用大语言模型从文本生成准确且一致的图模型
Accurate and Consistent Graph Model Generation from Text with Large Language Models
AI总结:
针对大语言模型生成图模型存在的约束不一致与不准确问题,提出抽象-具体化框架,通过聚合多输出构建概率模型并细化为合规具体模型,显著提升生成图模型的一致性与质量。
摘要:
从自然语言描述生成图模型是软件工程中一项具有诸多应用的重要任务。随着大语言模型(LLMs)的兴起,人们对使用LLMs进行图模型生成的兴趣日益浓厚。然而,基于LLM的图模型生成通常只能得到部分正确的模型,存在三大主要问题:(1)语法违规:生成的模型可能不符合其元模型定义的语法;(2)约束不一致:模型结构可能不符合某些领域特定约束;(3)不准确:由于LLMs固有的不确定性,模型可能包含不准确的、幻觉产生的元素。虽然第一个问题通常通过约束解码或过滤等技术解决,但后两个问题在很大程度上仍未得到解决。受LLMs中近期自一致性方法的启发,我们提出了一种新颖的抽象-具体化框架,通过考虑LLM的多个输出来提升生成图模型的一致性和质量。我们的方法首先构建一个聚合所有候选输出的概率部分模型,然后将该部分模型细化为满足所有约束的最合适的具体模型。我们使用多种用于模型生成任务的数据集,在多款流行的开源和闭源LLM上评估了我们的框架。结果表明,我们的方法显著提升了生成图模型的一致性和质量。
英文摘要:
Graph model generation from natural language description is an important task with many applications in software engineering. With the rise of large language models (LLMs), there is a growing interest in using LLMs for graph model generation. Nevertheless, LLM-based graph model generation typically produces partially correct models that suffer from three main issues: (1) syntax violations: the generated model may not adhere to the syntax defined by its metamodel, (2) constraint inconsistencies: the structure of the model might not conform to some domain-specific constraints, and (3) inaccuracy: due to the inherent uncertainty in LLMs, the models can include inaccurate, hallucinated elements. While the first issue is often addressed through techniques such as constraint decoding or filtering, the latter two remain largely unaddressed. Motivated by recent self-consistency approaches in LLMs, we propose a novel abstraction-concretization framework that enhances the consistency and quality of generated graph models by considering multiple outputs from an LLM. Our approach first constructs a probabilistic partial model that aggregates all candidate outputs and then refines this partial model into the most appropriate concrete model that satisfies all constraints. We evaluate our framework on several popular open-source and closed-source LLMs using diverse datasets for model generation tasks. The results demonstrate that our approach significantly improves both the consistency and quality of the generated graph models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。