Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ZhangHanDong/prompt-description-language
Prompt Description Language [POC]
https://github.com/ZhangHanDong/prompt-description-language
Last synced: 24 days ago
JSON representation
Prompt Description Language [POC]
- Host: GitHub
- URL: https://github.com/ZhangHanDong/prompt-description-language
- Owner: ZhangHanDong
- License: mit
- Created: 2023-05-20T06:55:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-27T07:31:08.000Z (over 1 year ago)
- Last Synced: 2024-08-04T04:09:11.875Z (4 months ago)
- Language: Rust
- Homepage: https://zhanghandong.github.io/prompt-description-language/
- Size: 50.8 KB
- Stars: 247
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hacking-lists - ZhangHanDong/prompt-description-language - Prompt Description Language [POC] (Rust)
README
# Prompt Description Language (V0.1.1 POC)
## Description
PDL (Prompt Description Language) format provides an extensible way to describe the behavior and characteristics of prompts. Inspired by `json/yaml/toml/markdown` designs, PDL aims to minimize the token count compared to `json/yaml/toml/markdown`.
## Basic Syntax Description
The basic rules of the PDL structure are as follows:
- `{}` represents a structure, and `.` is also used to express hierarchical structure.
- `@` represents a reference to a specified structure field.
- `import` signifies the importation of the structure referenced by `@`.
- In `Key: Value` key-value pairs, the Key generally does not need to be enclosed in quotes (unless it contains other special characters, in which case single or double quotes can be used). Value can take the following forms:
- `Key: "value"`
- `Key: ["v1", "v2"]`
- `Key: {k1: 'v1', k2: 'v2', k3: 'v3', ...}`
- `Key: {'1/3': 'v1', '2/3': 'v2', '3/3': 'v3'}`
- `Key: ""`
- `Key: "" / None`
- `Key [ v1, v2, ...]`, used to define a sequence.## Usage Case`
Example:[Mr.Trans](https://github.com/Illumine-Labs/Mr.trans)
## TODO
Despite its advantages in design, PDL still has some potential drawbacks or limitations:
- Complexity: The syntax of PDL can be relatively complex, especially for those unfamiliar with programming or scripting languages. This may make it difficult to create and modify PDL files, especially for complex model behaviors.
- Lack of documentation and tutorials: Since PDL is a specialized language that is not widely used, there may be a lack of sufficient tutorials and documentation, which can increase the difficulty for new users to learn and use it.
- Scalability and flexibility: Although PDL is designed to be an extensible language, it may still encounter situations where it cannot accommodate certain specific needs, especially when dealing with uncommon or unusual AI model behaviors.
- Tool support: Due to PDL not being a widely adopted language, there may be a lack of corresponding development and debugging tools, which can impact development efficiency and quality.
- Readability and maintainability: If a PDL file becomes too large or its structure becomes overly complex, it can affect its readability and maintainability. This is particularly true when lacking proper documentation and comments, which can make subsequent maintenance work difficult.Based on actual use cases and requirements, there may be additional specific challenges and issues that need to be addressed.