rishiraj commited on
Commit
1f58952
1 Parent(s): 7a498b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -40,9 +40,14 @@ def generate(
40
  top_k: int = 50,
41
  repetition_penalty: float = 1.2,
42
  ) -> Iterator[str]:
43
- conversation = [{"role": "user", "content": """Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
 
 
 
 
 
44
  - Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
45
- - Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
46
  - Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
47
  - Conclusion, classifications, or results should ALWAYS appear last.
48
  - Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
@@ -78,7 +83,8 @@ The final prompt you output should adhere to the following structure below. Do n
78
 
79
  # Notes [optional]
80
 
81
- [optional: edge cases, details, and an area to call or repeat out specific important considerations]"""}]
 
82
  conversation.append({"role": "assistant", "content": "Alright, enter your task description. I will turn that into a high quality prompt."})
83
  conversation += chat_history
84
  conversation.append({"role": "user", "content": message})
 
40
  top_k: int = 50,
41
  repetition_penalty: float = 1.2,
42
  ) -> Iterator[str]:
43
+ conversation = [{"role": "user", "content": """
44
+ Given a task description or existing prompt, produce a detailed system prompt to guide a language model in completing the task effectively.
45
+
46
+ # Guidelines
47
+
48
+ - Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
49
  - Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
50
+ - Reasoning Before Conclusions**: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
51
  - Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
52
  - Conclusion, classifications, or results should ALWAYS appear last.
53
  - Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
 
83
 
84
  # Notes [optional]
85
 
86
+ [optional: edge cases, details, and an area to call or repeat out specific important considerations]
87
+ """}]
88
  conversation.append({"role": "assistant", "content": "Alright, enter your task description. I will turn that into a high quality prompt."})
89
  conversation += chat_history
90
  conversation.append({"role": "user", "content": message})