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.
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 | 中文版
Let AI create prompts for you:
- LangGPT GPTs — Full-featured generator (GPT-4)
- Kimi+ LangGPT — For Moonshot Kimi users
- PromptGPT — Lite version (GPT-3.5)
Basic LangGPT structure:
# Role: Your_Role_Name
## Profile
- Author: YourName
- Version: 1.0
- Language: English
- Description: Clear role description and core capabilities
### 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
Explore our example library and adapt proven templates to your needs.
Before diving into tactics, understand the principles. These essays explore the philosophy behind effective prompting:
- 对话动力学 — The dynamics of human-AI dialogue
- 五种理性 — Five types of rationality in prompt design
- 镜像性倾向 — Mirror tendencies in LLM behavior
- 统计重力井和边缘表达 — Statistical gravity well and edge expression
- 关系表达 — Expressing relationships in prompts
- 看见与言说 — Seeing and articulation in AI interaction
- Prompt 的本质 — The essence and nature of prompts
- AI意识 — Understanding the role of AI in human-AI interaction
These foundational insights will transform how you think about prompts.
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" |
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 " |
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.
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
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
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
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 |
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 |
- 推理模型提示方法变革 — Paradigm shift from procedural to goal-oriented prompting
- 提示词的道和术 — Philosophy and practice of prompt engineering by 李继刚
- 企业级提示词工程 — Building production-ready prompt systems (百川智能)
- 多模态提示词 — GPT-4V and multi-modal prompting techniques
- 提示词攻击与防护 — Security: prompt injection, jailbreaks, and defenses
- 大模型绘画指南 — AI image generation with structured prompts
Feishu Knowledge Base — Curated resources, templates, and community contributions
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 |
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 |
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 |
Project | Description | Stars |
---|---|---|
BookAI | AI-powered book generation | |
AI-Resume | Beautiful resumes with Claude Artifacts |
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 |
We welcome all contributions to make LangGPT better!
- ⭐ Star and share — Increase visibility and help others discover LangGPT
- 📝 Submit examples — Share your successful prompts built with LangGPT
- 🆕 Propose templates — Create new templates beyond the Role structure
- 📖 Improve docs — Fix typos, clarify instructions, add translations
- 💡 Suggest features — Open issues with ideas for new capabilities
- 🔧 Code contributions — Help build tools, utilities, and integrations
New to GitHub contributions? Check out this GitHub Minimal Contribution Guide
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}
}
LangGPT was inspired by excellent projects:
- Mr.-Ranedeer-AI-Tutor — Structured tutoring prompts
- Auto-GPT — Autonomous AI agents
- SoM — Set of Mark prompting
- yolov10 — Computer vision innovations
We're proud to see LangGPT principles applied in the wild:
- Prompt Optimizer — Intelligent prompt optimization tool leveraging LangGPT methodology
- securityGPT — Secure prompt protection against leaks
- AIPainting-Structured-Prompts — Structured prompts for AI art generation
云中江树 (Yun Zhong Jiang Shu)
- 📱 WeChat Official Account: 「云中江树」
- 💼 Creator of LangGPT Framework
- 🎓 Prompt Engineering Researcher
- 📚 Knowledge Base — Comprehensive documentation
- 🐦 Twitter/X — Latest updates
- 💬 GitHub Discussions — Community forum
- 📧 Email: contact@langgpt.ai
Made with ❤️ by the langgptai Community
Empowering everyone to become a prompt expert 🚀