Skip to main content
CenXiv.org
This website is in trial operation, support us!
We gratefully acknowledge support from all contributors.
Contribute
Donate
cenxiv logo > cs > arXiv:2510.19850v1

Help | Advanced Search

Computer Science > Programming Languages

arXiv:2510.19850v1 (cs)
[Submitted on 21 Oct 2025 ]

Title: Prompt Decorators: A Declarative and Composable Syntax for Reasoning, Formatting, and Control in LLMs

Title: 提示装饰器:一种用于大语言模型中推理、格式化和控制的声明式且可组合的语法

Authors:Mostapha Kalami Heris
Abstract: 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.
Abstract: 大型语言模型(LLMs)在推理、写作和决策支持工作流中处于核心地位,但用户缺乏对它们如何推理和表达输出的一致控制。 传统的提示工程依赖于冗长的自然语言指令,限制了可重复性、模块化和可解释性。 本文介绍了提示装饰器(Prompt Decorators),这是一种声明式、可组合的语法,通过紧凑的控制标记(如 +++Reasoning, +++Tone(style=formal), 和 +++Import(topic="Systems Thinking"))来控制LLM行为。 每个装饰器修改一个行为维度,如推理风格、结构或语气,而不会改变任务内容。 该框架形式化了二十个核心装饰器,分为两个功能家族(认知与生成和表达与系统),每个家族进一步分解为子类别,分别管理推理、交互、表达和会话控制。 它定义了一个统一的语法、作用域模型和确定性处理流程,实现可预测和可审计的行为组合。 通过将任务意图与执行行为解耦,提示装饰器为提示设计创建了一个可重用且可解释的接口。 示例使用案例展示了改进的推理透明度、减少的提示复杂度以及跨领域的标准化模型行为。 论文最后讨论了互操作性、行为一致性以及为可扩展AI系统开发声明式接口的含义。
Subjects: Programming Languages (cs.PL) ; Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Human-Computer Interaction (cs.HC)
Cite as: arXiv:2510.19850 [cs.PL]
  (or arXiv:2510.19850v1 [cs.PL] for this version)
  https://doi.org/10.48550/arXiv.2510.19850
arXiv-issued DOI via DataCite

Submission history

From: Mostapha Kalami Heris [view email]
[v1] Tue, 21 Oct 2025 17:35:49 UTC (440 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled
  • View Chinese PDF
  • View PDF
  • HTML (experimental)
  • TeX Source
license icon view license
Current browse context:
cs.PL
< prev   |   next >
new | recent | 2025-10
Change to browse by:
cs
cs.AI
cs.CL
cs.HC

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
a export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
IArxiv Recommender (What is IArxiv?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack

京ICP备2025123034号