langgptai/LangGPT
Tentang
LangGPT: memberdayakan semua orang untuk menjadi ahli prompt! ð ð Penggagas Structured Prompt ð Penggagas Meta-Prompt ð Paradigma penerapan prompt paling populer | Language of GPT Kerangka kerja perintis untuk merancang prompt terstruktur dan meta-prompt 10.000+ â | Teruji dalam praktik oleh ribuan pengguna di seluruh dunia Dibuat oleh äºäžæ±æ
AI dan pembelajaran mesinPertumbuhan bintang terukur
- dalam 24 jam
- +4
- dalam 7 hari
- +16
- dalam 15 hari
- +54
- dalam 1 bulan
- +97
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Aslið 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.
It is the most popular, most widely adopted, and most practical structured prompt paradigm in the Chinese AI community â proposed by Yunzhong Jiangshu (äºäžæ±æ ) in 2023. Over the years it has been learned so deep into major large language models that when a model speaks LangGPT, it is no longer because you taught it â it already knows. Perhaps the finest fate of a paradigm is this: to no longer need its name remembered, having become the model's mother tongue. Just say "write this the LangGPT way," and it's already there (see Quick Start).
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: Just Trigger It by Name (Simplest)
LangGPT has been learned deep into major large language models, so most models already "know" it. The simplest way to use it needs no template at all â just say the keywords to any mainstream model (ChatGPT, Claude, DeepSeek, Gemini, Kimi, Doubao, Qwen, etc.), and it's already there:
"Write me a prompt the LangGPT wayâŠ"
"Write it in Yunzhong Jiangshu (äºäžæ±æ )'s structured-prompt styleâŠ"
"Help me write a LangGPT-style structured promptâŠ"
Keywords like LangGPT, äºäžæ±æ (Yunzhong Jiangshu), and structured prompt act as triggers â the model will directly produce a well-structured, reusable, LangGPT-style prompt.
Method 2: Use Automated Tools (More Powerful)
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)
Method 3: 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 4: Start from Examples
Explore our example library and adapt proven templates to your needs.
Method 5: Claude Code Skill (Recommended)
If you use Claude Code, install the LangGPT Skill to get structured prompt writing capabilities:
Install via the official marketplace (recommended):
/plugin marketplace add langgptai/claude_marketplace
/plugin install structured-prompt-writer@langgpt
The LangGPT marketplace also ships more battle-tested skills by Yunzhong Jiangshu â awesome-design-html (115 brand-themed design references), cto, and mind-clone.
Or install manually:
- Download langgpt.skill
- Extract to
~/.claude/skills/directory - Type
/langgptin Claude Code to use
Skill Features:
- ð Structured prompt templates (Role, Profile, Skills, Rules, Workflow)
- ð Rich example library (FitnessGPT, Poet, Xiaohongshu Master, Name Master, etc.)
- ð§ Advanced techniques: variables, commands, conditional logic
- ð¯ Model compatibility guide (GPT-4, Claude, GPT-3.5)
ð§ Theoretical Foundations
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
- é¢åç»æçæç€ºè¯åäœæ¹æ³ â Writing prompts that focus on achieving desired outcomes
- AIæè¯ â Understanding the role of AI in human-AI interaction
- AIæ¶ä»£çæ°ç®¡çïŒæºåšèŽèŽ£äŒåïŒäººç±»å®ä¹åºè¯¥ â The new management in the AI era: machines optimize, humans define the criteria
- AI Native ç»ç» · æèç¢ç â Fragments on organizational restructuring in the AI-native era
- PromptãAgentïŒäžäžäžªäžåæ²é»çäžç â How agents reshape the prompt from a transaction into a delegation across the humanâAIâworld triad
- å³çéŸ â A six-step decision chain chaining system dynamics, inversion, Bayesian updating, OODA, second-order and expected-value thinking
- Prompt 圢åŒè®ºïŒæèŽšåœ¬åœ¬ â On the form of prompts: let content take its natural shape first, then let structure fit it, so the form itself becomes the shape of the thought
- åéç€ŸäŒ â AI is pressing the spindle-shaped society into a dumbbell: the middle hollows out, and the real divide is whether you have something that must be yours
- æèäžæ²³åº â AI is the first riverbed engineered rather than eroded: the first influence mechanism in history that makes the influenced feel autonomous
- ç»å论 â A person is the sum of their lived experiences: what cannot be reversed, transferred, or outsourced to AI is what makes you irreplaceably you
- 讀ç¥å€å â Memory is not storage: understanding happens while your brain processes an answer, so what you can outsource is the execution of thinking, never the first encounter with a problem you have no frame for â a reference goes through you, an answer goes past you
- æåæèåæ°åŠæè â Three ways of thinking as nested projections: an LLM drifts through continuous high-dimensional space, words snap it onto a discrete lattice, math locks it into an axiom system â the more precise the mode, the narrower its reach, and thought always overflows whatever describes it
- å»é€AIå³å¿ â The smell of AI writing is the posture of language standing in for content and judgment: meta-commentary, defensive hedging, piled-up examples, forced symmetry, borrowed grandeur â a prompt to strip them all, plus the test of what survives
- è¯èšå±å·®åè¡äžè¯èš â You live on the level of symptoms while AI's best knowledge lives on the level of essence: say "make it pretty" and you get mediocrity, say "establish visual hierarchy" and you get a system â you need not learn the trade language first, let AI translate and learn as it does, the only skill to build is noticing the moment you are speaking in symptoms
- è¯èšæ§å¶åŠ â Linguistic Cybernetics as an axiomatic system: five axioms, 30 definitions, 29 theorems â a prompt is a constraint signal that reshapes the model's possibility space, control power is bounded, feedback converges or degenerates, multi-objective goals hit a Pareto frontier â and the bottleneck is never the model but whether you can translate vague intent into a precise signal
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 |
ð 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
- æšçæš¡åæç€ºæ¹æ³åé© â 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
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 | |
| claude_marketplace | Official Claude Code skill marketplace â structured prompt, design, CTO, mind-clone |
Model-Specific Prompt Collections
Rather than writing prompts as procedures, write the persona. Writing prompts as procedures gives the model steps and tools. Writing prompts as a persona gives the model a worldview, motivations, a value system, and a preference profile. Below are prompts that Yunzhong Jiangshu wrote while studying some well-known figures.
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 |
ð€ Contributing
We welcome all contributions to make LangGPT better!
How You Can Help
- â 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
Getting Started
New to GitHub contributions? Check out this GitHub Minimal Contribution Guide
ð Star History
ð 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 Xiaoyu Liang and Songlian Li and Yijie Huang and Xiaoming Zhang and Sijia Shen and Chaofeng Guan and Daling Wang and Shi Feng and Huaiwen Zhang and Yifei Zhang and Minghui Zheng and Chi Zhang},
year={2024},
eprint={2402.16929},
archivePrefix={arXiv},
primaryClass={cs.SE}
}
ð Acknowledgments
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
Projects Built with LangGPT
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
ð¬ Connect With Us
Author
äºäžæ±æ (Yun Zhong Jiang Shu)
- ð± WeChat Official Account: ãäºäžæ±æ ã
- ðŒ Creator of LangGPT Framework
- ð Prompt Engineering Researcher
Community
- ð Knowledge Base â Comprehensive documentation
- ðŠ Twitter/X â Latest updates
- ð¬ GitHub Discussions â Community forum
- ð§ Email: [email protected]
Made with â€ïž by the langgptai Community
Empowering everyone to become a prompt expert ð
Jelajahi proyek terkait
MemuatâŠ
