LangGPT  by langgptai

Structured prompting framework for LLM prompt engineering

Created 3 years ago
12,365 stars

Top 4.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

LangGPT provides a structured, programming-language-like framework for designing high-quality prompts for Large Language Models (LLMs). It aims to democratize prompt engineering by replacing ad-hoc tips with a systematic approach using templates, variables, and commands, making prompt creation as intuitive as object-oriented programming.

How It Works

LangGPT treats prompt design as a form of programming. Its core is the "Role" template, a Markdown structure defining a persona's Profile (description, skills), Rules, Workflow, and Initialization. This structured approach allows for reusable, configurable prompts, akin to classes in programming, enabling complex interactions and consistent outputs from LLMs.

Quick Start & Requirements

  • Install/Run: Use GPT-4 or Claude directly in a chat interface.
  • Prerequisites: Familiarity with Markdown.
  • Resources: No specific hardware or software installation required beyond access to GPT-4 or Claude.
  • Docs: LangGPT Paper, 中文版教程

Highlighted Details

  • Programming Paradigm: Adopts a structured, template-based approach similar to programming languages for prompt design.
  • Role Template: A core Markdown structure for defining LLM personas, rules, and workflows.
  • Variable & Command Support: Enables dynamic prompt generation and control flow within prompts.
  • Extensive Examples: Offers numerous pre-built prompts for various use cases (e.g., Code Master, FitnessGPT).

Maintenance & Community

  • Community: Active development with contributions welcomed. Links to community resources are not explicitly provided in the README.
  • Roadmap: Development plan outlines features like advanced syntax, prompt chaining, and JSON/YAML support.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive for commercial use and integration with closed-source applications.

Limitations & Caveats

The project is described as being in its "early and primitive stages" with a "significant workload," indicating ongoing development and potential for breaking changes. Advanced features and documentation enhancements are still in progress.

Health Check
Last Commit

1 month ago

Responsiveness

1 week

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
6 more.

prompt-engine by microsoft

0%
3k
NPM library for LLM prompt engineering
Created 4 years ago
Updated 3 years ago
Feedback? Help us improve.