Skip to content

LangGPT: Empowering everyone to become a prompt expert! ๐Ÿš€ ๐Ÿ“Œ ็ป“ๆž„ๅŒ–ๆ็คบ่ฏ๏ผˆStructured Prompt๏ผ‰ๆๅ‡บ่€… ๐Ÿ“Œ ๅ…ƒๆ็คบ่ฏ๏ผˆMeta-Prompt๏ผ‰ๅ‘่ตท่€… ๐Ÿ“Œ ๆœ€ๆต่กŒ็š„ๆ็คบ่ฏ่ฝๅœฐ่Œƒๅผ | Language of GPT The pioneering framework for structured & meta-prompt design 10,000+ โญ | Battle-tested by thousands of users worldwide Created by ไบ‘ไธญๆฑŸๆ ‘

License

Notifications You must be signed in to change notification settings

langgptai/LangGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

๐Ÿš€ LangGPT โ€” Empowering Everyone to Create High-Quality Prompts!


๐Ÿ“– What is LangGPT?

LangGPT is a structured, reusable prompt design framework that enables anyone to create high-quality prompts for Large Language Models. Think of it as a "programming language for prompts" โ€” systematic, template-based, and infinitely scalable.

Why LangGPT?

Traditional prompt engineering relies on scattered tips and trial-and-error. LangGPT transforms this chaos into a structured methodology:

  • ๐ŸŽฏ Structured Templates โ€” Hierarchical organization inspired by programming paradigms
  • ๐Ÿ”„ Reusability โ€” Create once, adapt infinitely like code modules
  • ๐Ÿ“ฆ Modularity โ€” Variables, commands, and conditional logic at your fingertips
  • โšก Efficiency โ€” Go from idea to working prompt in minutes
  • ๐ŸŒ Community-Driven โ€” 11,000+ stars, battle-tested by thousands of users

Academic Foundation: Published research at arXiv:2402.16929 | ไธญๆ–‡็‰ˆ


๐Ÿš€ Quick Start

Method 1: Use Automated Tools (Fastest)

Let AI create prompts for you:

Method 2: Master the Template (5 Minutes)

Basic LangGPT structure:

# Role: Your_Role_Name

## Profile
- Author: YourName
- Version: 1.0
- Language: English
- Description: Clear role description and core capabilities

## Goal
- Outcome: What concrete result/outcome should be delivered for the user/session
- Done Criteria: Clear acceptance criteria (how we know itโ€™s finished and good)
- Non-Goals: What is explicitly out of scope to avoid scope creep

### Skill-1
1. Specific skill description
2. Expected behavior and output

## Rules
1. Don't break character under any circumstance
2. Don't make up facts or hallucinate

## Workflow
1. Analyze user input and identify intent
2. Apply relevant skills systematically
3. Deliver structured, actionable output

## Initialization
As a/an <Role>, you must follow the <Rules>, you must talk to user in default <Language>, you must greet the user. Then introduce yourself and introduce the <Workflow>.

Prerequisites: Basic Markdown knowledge (Quick Guide) | GPT-4 or Claude recommended

Method 3: Start from Examples

Explore our example library and adapt proven templates to your needs.


๐Ÿง  Theoretical Foundations

Before diving into tactics, understand the principles. These essays explore the philosophy behind effective prompting:

These foundational insights will transform how you think about prompts.


๐Ÿ’ก Core Concepts

1. Structured Roles

Define AI personas through clear, modular sections:

Section Purpose Example
Role Role name/title "้€ป่พ‘ๅญฆๅฎถ" / "Expert Analyst" / "FitnessGPT"
Profile Identity and capabilities "Expert Python developer with 10 years experience"
Goal Desired outcome, done criteria, and non-goals for this session/task โ€œRefactor a prompt into a reusable template; acceptance criteria: pass three structured checks; non-goal: rewriting the business logic.โ€
Skills Specific abilities "Debug complex code, optimize performance"
Rules Boundaries and constraints "Never execute destructive commands"
Workflow Interaction logic "1. Analyze โ†’ 2. Plan โ†’ 3. Execute"
Initialization Opening message and setup "As a , I will greet you and introduce the "

2. Variables and References

Use <Variable> syntax for dynamic content:

As a <Role>, you must follow <Rules> and communicate in <Language>

This creates self-referential prompts that maintain consistency across complex instructions.

3. Commands

Define reusable actions for better UX:

## Commands
- Prefix: "/"
- Commands:
    - help: Display all available commands
    - continue: Resume interrupted output
    - improve: Enhance current response with deeper analysis

4. Conditional Logic

Add intelligence to your prompts:

If user provides [code], then analyze and suggest improvements
Else if user asks [question], then provide detailed explanation
Else, prompt for clarification

5. Advanced Techniques

Reminders โ€” Combat context loss in long conversations:

## Reminder
1. Always check role settings before responding
2. Current language: <Language>, Active rules: <Rules>

Alternative Formats โ€” Use JSON/YAML when markdown isn't ideal:

role: DataAnalyst
profile:
  version: "2.0"
  language: "Python"
skills:
  - statistical_analysis
  - data_visualization

๐ŸŒŸ Featured Examples

Prompt Description Link
๐ŸŽฏ FitnessGPT Personalized diet and workout planner View
๐Ÿ’ป Code Master CAN Advanced coding assistant with debugging expertise View
โœ๏ธ Xiaohongshu Writer Viral social media content generator View
๐ŸŽจ Chinese Poet Classical poetry composer in traditional styles View

Browse 100+ more examples โ†’


๐Ÿ“š Learning Resources

Essential Guides

Resource Description Date
Academic Paper LangGPT: Rethinking Structured Reusable Prompt Design (ไธญๆ–‡) Feb 2024
Structured Prompts Guide Comprehensive tutorial on building high-performance prompts Jul 2023
Prompt Chains Multi-prompt collaboration and task decomposition strategies Aug 2023
Video Tutorial BiliBili walkthrough (by AIGCLINK) Sep 2023

Advanced Topics

Community Hub

Feishu Knowledge Base โ€” Curated resources, templates, and community contributions


๐ŸŽจ LangGPT Ecosystem

Core Framework & Tools

Project Description Stars
LangGPT Core framework and methodology
PromptVer Semantic versioning for prompts โ€” version control like Git
PromptShow Create beautiful prompt images (Try it)
Minstrel Multi-agent system for auto-generating prompts

Model-Specific Prompt Collections

Curated, optimized prompts for different AI models:

Collection Target Model Stars
wonderful-prompts ChatGPT (Chinese)
awesome-claude-prompts Anthropic Claude
awesome-deepseek-prompts DeepSeek & R1
awesome-gemini-prompts Google Gemini
awesome-grok-prompts xAI Grok
qwen-prompts Alibaba Qwen
awesome-llama-prompts Meta Llama 2/3
awesome-doubao-prompts ByteDance Doubao
awesome-system-prompts System prompts from AI tools

Specialized Domains

Repository Focus Area Stars
Awesome-Multimodal-Prompts GPT-4V, DALL-E 3, image/video prompts
deep-research-prompts Deep research across models
awesome-voice-prompts Voice AI and conversational agents
GraphRAG-Prompts Graph-based retrieval prompts
LLM-Jailbreaks Security research and defenses

Applications

Project Description Stars
BookAI AI-powered book generation
AI-Resume Beautiful resumes with Claude Artifacts

๐Ÿ› ๏ธ Popular GPTs Built with LangGPT

Transform ChatGPT with these specialized assistants:

GPT Purpose Link
๐ŸŽฏ LangGPT Expert Auto-generate structured prompts Launch
โœ๏ธ PromptGPT Professional prompt engineer Launch
๐Ÿง  SmartGPT-5 Never lazy, always diligent assistant Launch
๐Ÿ’ป Coding Expert Comprehensive programming assistant Launch
๐Ÿ“Š Data Table GPT Transform messy data into clean tables Launch
๐Ÿ”ฅ PytorchGPT PyTorch code specialist Launch
๐ŸŽจ LogoGPT Professional logo designer Launch
๐Ÿ“„ PDF Reader Deep document analysis and extraction Launch
๐Ÿ… MathGPT Precise mathematical problem solver Launch
๐Ÿ“ WriteGPT Professional writing across industries Launch
๐ŸŽ™๏ธ ๆ—ถไบ‹็ƒญ่ฏ„ๅ‘˜ Current events commentator Launch
๐ŸŽ€ ็ฟป่ฏ‘ๅคงๅฐๅง Elegant Chinese translations Launch

Discover 20+ more GPTs โ†’


๐Ÿค Contributing

We welcome all contributions to make LangGPT better!

How You Can Help

  1. โญ Star and share โ€” Increase visibility and help others discover LangGPT
  2. ๐Ÿ“ Submit examples โ€” Share your successful prompts built with LangGPT
  3. ๐Ÿ†• Propose templates โ€” Create new templates beyond the Role structure
  4. ๐Ÿ“– Improve docs โ€” Fix typos, clarify instructions, add translations
  5. ๐Ÿ’ก Suggest features โ€” Open issues with ideas for new capabilities
  6. ๐Ÿ”ง Code contributions โ€” Help build tools, utilities, and integrations

Getting Started

New to GitHub contributions? Check out this GitHub Minimal Contribution Guide


๐Ÿ“Š Star History

Star History Chart


๐Ÿ“„ Citation

If you use LangGPT in research or projects, please cite:

@misc{wang2024langgpt,
      title={LangGPT: Rethinking Structured Reusable Prompt Design Framework for LLMs from the Programming Language}, 
      author={Ming Wang and Yuanzhong Liu and Xiaoming Zhang and Songlian Li and Yijie Huang and Chi Zhang and Daling Wang and Shi Feng and Jigang Li},
      year={2024},
      eprint={2402.16929},
      archivePrefix={arXiv},
      primaryClass={cs.SE}
}

๐Ÿ™ Acknowledgments

LangGPT was inspired by excellent projects:

Projects Built with LangGPT

We're proud to see LangGPT principles applied in the wild:


๐Ÿ“ฌ Connect With Us

Author

ไบ‘ไธญๆฑŸๆ ‘ (Yun Zhong Jiang Shu)

  • ๐Ÿ“ฑ WeChat Official Account: ใ€Œไบ‘ไธญๆฑŸๆ ‘ใ€
  • ๐Ÿ’ผ Creator of LangGPT Framework
  • ๐ŸŽ“ Prompt Engineering Researcher

Community


โฌ† Back to Top

Made with โค๏ธ by the langgptai Community

Empowering everyone to become a prompt expert ๐Ÿš€

About

LangGPT: Empowering everyone to become a prompt expert! ๐Ÿš€ ๐Ÿ“Œ ็ป“ๆž„ๅŒ–ๆ็คบ่ฏ๏ผˆStructured Prompt๏ผ‰ๆๅ‡บ่€… ๐Ÿ“Œ ๅ…ƒๆ็คบ่ฏ๏ผˆMeta-Prompt๏ผ‰ๅ‘่ตท่€… ๐Ÿ“Œ ๆœ€ๆต่กŒ็š„ๆ็คบ่ฏ่ฝๅœฐ่Œƒๅผ | Language of GPT The pioneering framework for structured & meta-prompt design 10,000+ โญ | Battle-tested by thousands of users worldwide Created by ไบ‘ไธญๆฑŸๆ ‘

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7