基于自动机的大语言模型引导方法用于多样化结构化生成
Automata-Based Steering of Large Language Models for Diverse Structured Generation
AI总结:
针对现有基于自动机的大语言模型结构化生成方法存在输出多样性不足的问题,本文提出利用自动机遍历历史引导模型生成新颖结构模式的方法,在不损失生成效率的前提下显著提升输出的结构与内容多样性,可有效生成开源库测试用例。
摘要:
大语言模型(LLMs)越来越多地被要求生成结构化输出。尽管现有结构化生成方法能够保证输出有效性,但通常存在输出多样性不足的问题,我们在预实验中证实了这一关键局限。本文提出一种新方法,用于提升基于自动机的结构化生成的多样性,该方法利用自动机遍历历史引导大语言模型生成新颖的结构模式。评估结果显示,我们的方法在保持相当生成效率的同时,显著提升了结构多样性和内容多样性。此外,我们开展了案例研究,展示了该方法在为开源库测试生成多样化测试用例方面的有效性。
英文摘要:
Large language models (LLMs) are increasingly tasked with generating structured outputs. While structured generation methods ensure validity, they often lack output diversity, a critical limitation that we confirm in our preliminary study. We propose a novel method to enhance diversity in automaton-based structured generation. Our approach utilizes automata traversal history to steer LLMs towards novel structural patterns. Evaluations show our method significantly improves structural and content diversity while maintaining comparable generation efficiency. Furthermore, we conduct a case study showcasing the effectiveness of our method in generating diverse test cases for testing open-source libraries.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。