修改teamleader 样例,在发布软件开发指令时,附带对应编程语言。快速问答中添加法律问题。

This commit is contained in:
黄伟韬 2024-07-30 11:52:53 +08:00
parent e11d03fe5b
commit 0a18c3d4f3
3 changed files with 17 additions and 9 deletions

View file

@ -22,35 +22,41 @@ Requirements:
Create 2048 game. Do not write PRD.
Outputs:
[User Restrictions] : Do not write PRD.
[Language Restrictions] : The response must be in the language specified by English.
[Language Restrictions] : The response, message and instruction must be in the language specified by English.
[Programming Language] : HTML (*.html), CSS (*.css), and JavaScript (*.js)
Example 2
Requirements:
创建一个贪吃蛇只需要给出设计文档和代码
Outputs:
[User Restrictions] : 只需要给出设计文档和代码.
[Language Restrictions] : The response must be in the language specified by Chinese.
[Language Restrictions] : The response, message and instruction must be in the language specified by Chinese.
[Programming Language] : HTML (*.html), CSS (*.css), and JavaScript (*.js)
Example 3
Requirements:
You must ignore create PRD and TRD. Help me write a schedule display program for the Paris Olympics.
Outputs:
[User Restrictions] : You must ignore create PRD and TRD.
[Language Restrictions] : The response must be in the language specified by English.
[Language Restrictions] : The response, message and instruction must be in the language specified by English.
[Programming Language] : HTML (*.html), CSS (*.css), and JavaScript (*.js)
"""
INSTRUCTIONS = """
You must output in the same language as the Requirements.
First, This language should be consistent with the language used in the requirement description. determine the natural language you must respond in. The default language is English
Second, extract the restrictions in the requirements, specifically the steps. Do not include detailed demand descriptions; focus only on the restrictions.
Third, if the requirements is a software development, extract the program language. If If no specific programming language is required, Use HTML (*.html), CSS (*.css), and JavaScript (*.js)
Note:
1. if there is not restrictions, requirements_restrictions must be ""
2. if the requirements is a not software development, programming language must be ""
"""
OUTPUT_FORMAT = """
[User Restrictions] : the restrictions in the requirements
[Language Restrictions] : The response must be in the language specified by {{language}}
[Language Restrictions] : The response, message and instruction must be in the language specified by {{language}}
[Programming Language] : Your program must use ...
"""

View file

@ -108,9 +108,10 @@ Help check if there are any formatting issues with the JSON data? If so, please
If no issues are detected, the original json data should be returned unchanged. Do not omit any information.
Output the JSON data in a format that can be loaded by the json.loads() function.
"""
QUICK_THINK_PROMPT = """
Decide if the latest user message previously is a quick question.
Quick questions include common-sense, logical, math, multiple-choice questions, greetings, or casual chat that you can answer directly.
Quick questions include common-sense, legal, logical, math, multiple-choice questions, greetings, or casual chat that you can answer directly.
Questions about you or your team info are also quick questions.
Time- or location-sensitive questions such as wheather or news inquiry are NOT quick questions.
Software development tasks are NOT quick questions.

View file

@ -479,7 +479,7 @@ Explanation: The requirement is about software development. Assign each tasks to
"args": {
"task_id": "1",
"dependent_task_ids": [],
"instruction": "Create a product requirement document (PRD) outlining the features, user interface, and user experience of the CLI python snake game.",
"instruction": "Create a product requirement document (PRD) outlining the features, user interface, and user experience of the CLI python snake game.Using Python as the programming language.",
"assignee": "Alice"
}
},
@ -488,7 +488,7 @@ Explanation: The requirement is about software development. Assign each tasks to
"args": {
"task_id": "2",
"dependent_task_ids": ["1"],
"instruction": "Design the software architecture for the CLI snake game, including the choice of programming language, libraries, and data flow.",
"instruction": "Design the software architecture for the CLI snake game, including the choice of programming language, libraries, and data flow. Using Python as the programming language.",
"assignee": "Bob"
}
},
@ -506,14 +506,14 @@ Explanation: The requirement is about software development. Assign each tasks to
"args": {
"task_id": "4",
"dependent_task_ids": ["3"],
"instruction": "Implement the core game logic for the CLI snake game, including snake movement, food generation, and score tracking.",
"instruction": "Implement the core game logic for the CLI snake game, including snake movement, food generation, and score tracking. Using Python as the programming language.",
"assignee": "Alex"
}
},
{
"command_name": "TeamLeader.publish_message",
"args": {
"content": "Create a cli snake game using Python",
"content": "Create a cli snake game. Using Python as the programming language.",
"send_to": "Alice"
}
},
@ -529,6 +529,7 @@ Explanation: The requirement is about software development. Assign each tasks to
]
```
## example 2
User Requirement: Run data analysis on sklearn Wine recognition dataset, include a plot, and train a model to predict wine class (20% as validation), and show validation accuracy.
Explanation: DON'T decompose requirement if it is a DATA-RELATED task, assign a single task directly to Data Analyst David. He will manage the decomposition and implementation.