|国家预印本平台
| 注册
首页|动态提示词生成系统的设计与实现

动态提示词生成系统的设计与实现

叶剑 何建伟 周亚星 郝福恺 李宁 聂梓乔

动态提示词生成系统的设计与实现

Design and Implementation of a Dynamic Prompt Word Generation System

叶剑 1何建伟 1周亚星 1郝福恺 1李宁 1聂梓乔1

作者信息

  • 1. 中国联通软件研究院
  • 折叠

摘要

随着大语言模型(Large Language Models, LLMs)在文本生成领域的广泛应用,如何高效生成多样化、高质量的领域特定文本成为当前研究的热点问题。针对传统静态提示词在批量生成任务中存在模板单一、多样性不足、人工成本高的问题,本文提出并实现了一种动态提示词生成系统(Dynamic Prompt Generation System, DPGS)。该系统采用模板引擎与策略驱动相结合的架构设计,支持通过配置化方式定义提示词模板结构,并基于候选词库实现随机、加权随机、规则约束等多种生成策略,从而动态构建个性化提示词。系统应用于店铺评价生成场景,通过分层设计的提示词模板体系,实现了评价内容在情感极性、商品维度、场景描述等多维度的可控生成。实验结果表明,该系统在保证生成文本语义连贯性和真实性的同时,显著提升了提示词的多样性和生成效率,为大规模领域数据合成提供了一种可复用的技术方案。

Abstract

With the widespread application of Large Language Models (LLMs) in text generation, how to efficiently generate diverse and high-quality domain-specific text has become a hot research topic. Addressing the problems of traditional static prompts in batch generation tasks, such as limited template variety, insufficient diversity, and high manual costs, this paper proposes and implements a Dynamic Prompt Generation System (DPGS). This system adopts an architecture combining a template engine and a strategy-driven approach, supporting the definition of prompt template structures through configuration and implementing various generation strategies based on a candidate word library, including randomization, weighted randomization, and rule constraints, thereby dynamically constructing personalized prompts. The system is applied to a store review generation scenario. Through a hierarchical prompt template system, it achieves controllable generation of review content across multiple dimensions, including sentiment polarity, product dimensions, and scene description. Experimental results show that the system significantly improves the diversity and generation efficiency of prompts while ensuring the semantic coherence and authenticity of the generated text, providing a reusable technical solution for large-scale domain data synthesis.

关键词

动态提示词生成/大语言模型/模板引擎/文本生成/提示词工程

Key words

Dynamic prompt word generation/large language model/template engine/text generation/prompt word engineering

引用本文复制引用

叶剑,何建伟,周亚星,郝福恺,李宁,聂梓乔.动态提示词生成系统的设计与实现[EB/OL].(2026-04-27)[2026-04-28].http://www.paper.edu.cn/releasepaper/content/202604-200.

学科分类

计算技术、计算机技术

评论

首发时间 2026-04-27
下载量:0
|
点击量:10
段落导航相关论文