用简洁标签控制大模型推理风格和输出格式,提升可复现性。
Prompt Decorators: A Declarative and Composable Syntax for Reasoning, Formatting, and Control in LLMs
- 引入装饰符语法,用+++标签控制推理、语气等行为维度。
- 20个核心装饰符分两类,实现行为可组合、可预测的控制。
- 适合需要标准化输出、提升提示可读性的研发与工程场景。
大型语言模型在推理、写作和决策支持中扮演核心角色,但用户难以一致地控制其推理方式和输出表达。传统提示工程依赖冗长的自然语言指令,限制了可复现性、模块化和可解释性。本文提出 Prompt Decorators,一种声明式、可组合的语法,通过紧凑的控制标记(如 +++Reasoning、+++Tone(style=formal)、+++Import(topic="Systems Thinking"))调控模型行为。每个装饰符作用于特定行为维度(如推理风格、结构、语气),不改变任务内容。框架形式化定义了20个核心装饰符,分为认知与生成、表达与系统两大类,进一步细分至子类别,分别控制推理、交互、表达和会话管理。它建立了统一语法、作用域模型和确定性处理流程,确保行为组合可预测且可审计。通过解耦任务意图与执行行为,Prompt Decorators 构建了可重用、可解释的提示设计接口。案例展示其显著提升推理透明度、降低提示复杂度,并实现跨领域的模型行为标准化。论文最后讨论其对互操作性、行为一致性及可扩展AI系统声明式接口的意义。
原文摘要 · Abstract (English)
Large Language Models (LLMs) are central to reasoning, writing, and decision-support workflows, yet users lack consistent control over how they reason and express outputs. Conventional prompt engineering relies on verbose natural-language instructions, limiting reproducibility, modularity, and interpretability. This paper introduces Prompt Decorators, a declarative, composable syntax that governs LLM behavior through compact control tokens such as +++Reasoning, +++Tone(style=formal), and +++Import(topic="Systems Thinking"). Each decorator modifies a behavioral dimension, such as reasoning style, structure, or tone, without changing task content. The framework formalizes twenty core decorators organized into two functional families (Cognitive & Generative and Expressive & Systemic), each further decomposed into subcategories that govern reasoning, interaction, expression, and session-control. It defines a unified syntax, scoping model, and deterministic processing pipeline enabling predictable and auditable behavior composition. By decoupling task intent from execution behavior, Prompt Decorators create a reusable and interpretable interface for prompt design. Illustrative use cases demonstrate improved reasoning transparency, reduced prompt complexity, and standardized model behavior across domains. The paper concludes with implications for interoperability, behavioral consistency, and the development of declarative interfaces for scalable AI systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。