# LangGPT

A structured, reusable prompt-design framework, described as a programming language for prompts, that lets anyone build high-quality large-language-model prompts from hierarchical, template-based components.

LangGPT is a structured, reusable prompt-design framework that treats writing a prompt more like writing code than trial and error: prompts are organized hierarchically into templates that can be reused and adapted, with variables, commands and conditional logic available where needed, aimed at making prompt creation systematic rather than a collection of scattered tips.

Proposed in 2023, it became widely used within the Chinese AI community, to the point that many mainstream large language models, including ChatGPT, Claude, DeepSeek, Gemini and Qwen, respond to its keywords directly: simply asking a model to answer 'the LangGPT way' is often enough to get a structured, LangGPT-style prompt back, without writing out a template by hand. Dedicated generator tools, including a GPT-4-based generator and a version built for the Kimi model, can also produce a LangGPT-style prompt automatically from a plain description of what is needed.

The framework and its underlying paradigm are documented in an academic paper.

Website: https://github.com/langgptai/LangGPT
