prompt-decorators
Prompt Decorators are structured prefixes, such as +++Reasoning and +++StepByStep, designed to enhance AI responses. Inspired by Python decorators, they make AI
What is prompt-decorators?
Prompt Decorators are structured prefixes, such as +++Reasoning and +++StepByStep, designed to enhance AI responses. Inspired by Python decorators, they make AI outputs more logical, accurate, and well-organized without requiring lengthy instructions, simplifying interactions for users.
Overview of prompt-decorators
What it is
Prompt Decorators are structured prefixes, such as +++Reasoning and +++StepByStep, that allow users to declaratively modify how a large language model thinks and writes without retraining. Inspired by Python decorators, they provide a lightweight control layer over standard prompting, making AI outputs more logical, accurate, and well-organized without requiring lengthy instructions.
Key features
- Modular control over reasoning, style, and behavior through decorator prefixes - Two main categories: Cognitive & Generative Decorators (e.g., +++Reasoning, +++Debate, +++Brainstorm) and Expressive & Systemic Decorators (e.g., +++OutputFormat, +++Tone, +++ChatScope)
- Multiple decorators can be combined in a single prompt to refine responses - Scope and memory management: MessageScope (single message), ChatScope (persistent across conversation), and Clear (reset decorators)
- A definitions file (prompt-decorators.txt) provides behavioral rules for each decorator, making the system portable across chat-based LLMs - Includes decorators for fact-checking (+++FactCheck), source citation (+++CiteSources), validation (+++Validate), and export (+++Export)
Use cases
- Enforcing logical reasoning before answering with +++Reasoning - Breaking down complex tasks into sequential steps with +++StepByStep - Generating multiple perspectives before concluding with +++Debate - Adjusting tone and output format for formal or structured responses - Iteratively refining content using +++Refine with a specified number of iterations - Asking clarifying questions when context is incomplete via +++Interactive
Getting started
See the repository README for instructions on providing the definitions file and using decorators in chat-based LLMs.
License and pricing
Licensed under the MIT License. The project is open source.
Based on the project's public README and repository metadata.