prompt-decorators  by smkalami

Structured prompting technique for AI

Created 10 months ago
452 stars

Top 66.6% on SourcePulse

GitHubView on GitHub
Project Summary

This repository introduces "Prompt Decorators," a method for structuring AI prompts with simple prefixes (e.g., +++Reasoning) to elicit more logical, accurate, and organized responses. It targets users of all levels seeking to improve AI output consistency without complex prompt engineering.

How It Works

Prompt Decorators leverage a prefix-based syntax, inspired by Python decorators but using +++ to avoid conflicts with common tagging conventions. These prefixes instruct AI models to adhere to specific response patterns, such as providing step-by-step explanations, debating topics, or citing sources. This approach aims to standardize AI interaction, making outputs more predictable and reliable.

Quick Start & Requirements

  • Usage: Prepend decorators directly to your AI prompts.
  • Prerequisites: Access to an AI model capable of interpreting structured prompts. No specific software installation is required for the concept itself.
  • Resources: Minimal; depends on the AI model used.
  • Learn More: Medium Article

Highlighted Details

  • Offers a range of decorators for reasoning, step-by-step execution, debate, critique, and output formatting.
  • Supports message-level and chat-level scope management for decorators.
  • Includes decorators for managing active decorators (+++ActiveDecs, +++Clear).
  • Detailed definitions and compliance requirements are specified in prompt-decorators.txt.

Maintenance & Community

  • Contributions are welcome via pull requests.
  • No specific community channels or active maintainer information is provided in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive for commercial and closed-source use.

Limitations & Caveats

The effectiveness of Prompt Decorators is entirely dependent on the AI model's ability to interpret and adhere to the specified prefixes. The README notes that this implementation is one possible realization, implying potential variations in how different AI models might process these decorators.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
6 more.

prompt-engine by microsoft

0.1%
3k
NPM library for LLM prompt engineering
Created 3 years ago
Updated 2 years ago
Feedback? Help us improve.