prompt-patterns  by phodal

Prompt patterns for AI programming, structuring thought frameworks for machines

created 2 years ago
3,076 stars

Top 15.9% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a structured approach to prompt engineering for AI models, offering a catalog of prompt patterns and best practices. It aims to help developers and researchers design more effective prompts for tasks like text generation, image creation, and code completion, enabling better control and understanding of AI outputs.

How It Works

The project categorizes prompt engineering techniques into fundamental patterns such as Specific Instruction, Instruction Template, Proxy, and Demonstration. It further elaborates on advanced concepts like symbolic representation, negative prompts, iterative refinement, and leveraging structured data (like DSLs) for more precise AI interaction. The core idea is to treat prompt design as a systematic process, akin to software design patterns, to elicit desired AI behaviors.

Quick Start & Requirements

  • Installation: No direct installation is required as this is a documentation/guide repository. The associated tool click-prompt can be found at https://github.com/prompt-engineering/click-prompt.
  • Prerequisites: Access to large language models (e.g., ChatGPT, Stable Diffusion) is implied for practical application.
  • Resources: Understanding of AI concepts and prompt engineering is beneficial.

Highlighted Details

  • Catalog of prompt patterns including Specific, Template, Proxy, Demonstration, Symbolic, Negative, Iterative, and DSL-based approaches.
  • Explores advanced techniques like "Language is Language" for direct programming language interaction and conceptual abstraction.
  • Demonstrates practical applications with examples for ChatGPT, Stable Diffusion, and GitHub Copilot.
  • Discusses concepts like Chain-of-Thought (CoT) and the Template Method pattern in the context of AI prompting.

Maintenance & Community

  • The project welcomes contributions for identifying issues, improving chapters, and translations.
  • Links to related resources like OpenAI Cookbook and Awesome Prompt Engineering are provided.

Licensing & Compatibility

  • The repository itself does not specify a license in the README. However, the associated click-prompt tool is likely subject to its own license.

Limitations & Caveats

  • Some sections are marked as "TODO," indicating areas for future development or refinement.
  • The effectiveness of patterns can vary depending on the specific AI model used.
  • The project focuses on documentation and conceptualization rather than providing executable code directly.
Health Check
Last commit

2 years ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.