节点文献
基于大小模型协同的可控文本生成与评估框架设计与实现
Design and Implementation of a Controllable Text Generation and Evaluation Framework Based on Large–Small Model Collaboration
【作者】 李煜;
【作者基本信息】 东南大学 , 人工智能(专业学位), 2025, 硕士
【摘要】 随着大语言模型在自然语言处理领域的飞速发展,文本生成技术迎来了全新的机遇与挑战。大语言模型在开放式问答、内容创作、辅助写作等场景中展现了强大的生成能力,极大地推动了智能对话与文本生成的应用落地。然而,真实应用场景往往对生成文本的属性比如风格、情绪、主题和语气等提出多元而精细的需求,如何灵活且高质量地控制文本的多维度属性,成为当前亟待解决的关键问题。此外,随着可控文本生成的需求日益增加,生成结果的自动化与高效评估也愈发重要,进一步要求建立合理、可靠、可扩展的评估体系。现有可控文本生成方法通过直接干预模型解码时的概率分布或者利用提示工程和微调技术进行控制,虽在单一属性控制方面已取得一定进展,但在多属性联合控制上仍面临诸多局限。一方面,现有方法多限于对单一或简单属性的开关式调节,缺乏对多属性、多维度组合进行精细化控制的能力;另一方面,遇到多属性冲突时缺乏有效的协调机制,常导致不同属性间相互削弱或干扰,同时也难以在生成过程中实现动态迭代优化。此外,目前对大模型生成的开放文本多依赖单一大语言模型作为评分器或简单的人工以及自动化打分进行评估,缺乏多角度、深层次的综合评估手段,从而导致评估结果的不确定性和不稳定性。为了应对上述挑战,本文提出了一种基于大小模型协同的可控文本生成框架以及多智能体协作的受控文本评估框架,设计并实现了可用性较强的可控文本生成与评估系统。具体而言,本文主要工作如下:1.提出了基于大小模型协同的可控文本生成框架,该框架利用大模型的强大生成能力与小模型的分类判别能力相结合,通过KL散度以及融合分类器评分与惩罚项的能量函数,实现对文本多属性的灵活调控和冲突管理。在生成阶段对词元(Token)概率进行动态调整,保证情感、风格、主题、语气等多方面平衡;在优化阶段进行迭代反馈与局部微调,有效提升文本的可控性与质量。2.提出了面向可控文本生成的多智能体协作评估框架,该框架通过设计多个基于大语言模型的角色智能体,以多轮对话的形式评估文本质量,同时结合自我反思与思维链策略,帮助各智能体分解复杂的评估问题并自我修正,并设计反馈者借助BERT小模型识别重复和分歧促进讨论达成共识,从而多角度、深层次地对文本进行稳健评估。3.设计并实现了一个可控文本生成与评估系统,该系统包括文本输入模块、属性配置模块、可控文本生成以及多轮讨论可视化模块。用户可灵活设定情绪、风格、主题等属性并查看整个控制以及迭代评估结果,该系统为多属性文本生成与高效评估提供了直观、可扩展的应用平台。总之,本文从生成与评估两大环节入手,充分发挥大小模型在文本控制中的协同优势,并借助多智能体协作评估机制,为可控文本生成构建了高效、稳定且可扩展的一体化解决方案。
【Abstract】 With the rapid development of large language models(LLMs)in natural language processing,text generation technology is experiencing new opportunities and challenges.LLMs have shown impressive generation capabilities in applications such as open-ended question answering,content creation,and writing assistance,significantly promoting the practical use of intelligent dialogue and text generation.However,real-world applications often demand diverse and fine-grained control over generated text attributes such as style,emotion,theme,and tone.Achieving flexible and high-quality multi-dimensional attribute control has become an urgent challenge.Additionally,with increasing demands for controllable text generation,the automation and efficient evaluation of generated results have become increasingly important,requiring the establishment of reasonable,reliable,and scalable evaluation frameworks.Existing controllable text generation methods primarily rely on directly manipulating the model’s decoding probability distribution or employing prompt engineering and fine-tuning.Although some progress has been made in controlling single attributes,these methods face significant limitations in managing multiple attributes simultaneously.On the one hand,existing methods are mostly limited to simple on-off adjustments for single or basic attributes,lacking the capability for precise and fine-grained control over multiple attributes and their combinations.On the other hand,they lack effective coordination mechanisms when attribute conflicts arise,often resulting in mutual interference or weakening between attributes,making it difficult to achieve dynamic adjustments and iterative optimization during text generation.Furthermore,current evaluations of open-ended text generated by large language models typically rely either on a single large language model for scoring or simple manual and automated evaluations.This results in a lack of comprehensive,multi-dimensional evaluation methods,causing uncertainty and instability in evaluation outcomes.To address these challenges,this thesis proposes a controllable text generation framework based on collaboration between large and small models and a controlled text evaluation framework leveraging multi-agent cooperation.A highly usable system for controllable text generation and evaluation is designed and implemented.Specifically,the main contributions of this thesis are:1.A controllable text generation framework based on cooperation between large and small models is proposed.This framework combines the powerful generation capabilities of large models with the discriminative capabilities of smaller classification models,employing KL divergencebased token probability adjustment and an energy function that integrates classifier scores and penalty terms.This approach achieves flexible multi-attribute control and conflict management,dynamically adjusting token probabilities during text generation to balance multiple attributes such as emotion,style,theme,and tone.An iterative feedback mechanism and local fine-tuning are introduced in the optimization phase to enhance text controllability and quality effectively.2.A multi-agent cooperative evaluation framework for controllable text generation is proposed.Multiple large language model-based agents engage in structured dialogues to evaluate text quality collaboratively.These agents employ self-reflection and chain-of-thought strategies to break down complex evaluation tasks and self-correct their judgments,while a dedicated feedback agent leverages a lightweight BERT model to detect redundancy and divergences,steering the discussion toward consensus.Together,these mechanisms deliver a robust,multiperspective,and in-depth evaluation of generated text.3.A system for controllable text generation and evaluation is designed and implemented,which includes a text input module,an attribute configuration module,a controllable text generation visualization module,and a multi-round discussion visualization module.Users can flexibly set attributes such as emotions,styles,and topics and view the entire control and iterative evaluation results.The system provides an intuitive and scalable application platform for multi-attribute text generation and efficient evaluation.In summary,this thesis aims to jointly advance text generation and evaluation by leveraging the collaborative advantages of large and small models for text control and multi-agent cooperation for evaluation,providing an efficient,stable,and scalable overall solution for controllable text generation.
【Key words】 Large Language Model; Text Generation; Text Evaluation; Multi-Agent; Energy Function;
- 【网络出版投稿人】 东南大学 【网络出版年期】2026年 07期
- 【分类号】TP391.1;TP18