Large Language Models (LLMs) have demonstrated a powerful ability for text generation. However, achieving optimal results with a given prompt or instruction can be challenging, especially for billion-sized models. Additionally, undesired behaviors such as toxicity or hallucinations can manifest. While much larger models (e.g., ChatGPT) may demonstrate strength in mitigating these issues, there is still no guarantee of complete prevention. In this work, we propose formalizing text generation as a future-constrained generation problem to minimize undesirable behaviors and enforce faithfulness to instructions. The estimation of future constraint satisfaction, accomplished using LLMs, guides the text generation process. Our extensive experiments demonstrate the effectiveness of the proposed approach across three distinct text generation tasks: keyword-constrained generation (Lin et al., 2020), toxicity reduction (Gehman et al., 2020), and factual correctness in question-answering (Gao et al., 2023).
翻译:大型语言模型在文本生成方面展现了强大的能力。然而,对于给定的提示或指令,实现最优结果仍具挑战性,尤其是对于百亿参数规模的模型。此外,不良行为(如毒性或幻觉)可能显现。尽管更大规模的模型(如ChatGPT)在缓解这些问题上可能表现出优势,但仍无法保证完全预防。本研究提出将文本生成形式化为未来约束满足问题,以最小化不良行为并强制遵循指令。通过利用大型语言模型估计未来约束满足程度,从而引导文本生成过程。大量实验表明,所提方法在三种不同的文本生成任务中均有效:关键词约束生成(Lin等人,2020)、毒性降低(Gehman等人,2020)以及问答中的事实正确性(Gao等人,2023)。