Automata-Based Steering of Large Language Models for Diverse Structured Generation
This work addresses a critical limitation in structured generation for LLMs, offering a solution to enhance diversity in applications like test case generation for open-source libraries, though it appears incremental as it builds on existing automaton-based methods.
The paper tackles the problem of low output diversity in automaton-based structured generation for large language models, proposing a method that uses automata traversal history to steer models towards novel patterns, resulting in significant improvements in structural and content diversity while maintaining comparable generation efficiency.
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.