kwabs22
commited on
Commit
•
0020877
1
Parent(s):
c3af779
front end prompt eng buttons suggested by mistral, opus and gpt 4
Browse files
app.py
CHANGED
@@ -96,7 +96,19 @@ def custom_generate_response(cust_user_message, prompt_index, category):
|
|
96 |
yield from generate_response(cust_user_message)
|
97 |
|
98 |
Allprompts = {
|
99 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
("Write a Class Diagram based on the following text:", "Class Diagram:"),
|
101 |
("Write a Pydot code based on the following text:", "Pydot Code:"),
|
102 |
("Describe what a standard happy scene in any movie would be planned in great detail, based on the following text:", "Scene Details"),
|
@@ -104,7 +116,6 @@ Allprompts = {
|
|
104 |
("Explain the manufacturing of the product mentioned in the following text:", "Manufacturing Details:"),
|
105 |
("Explain the marketing considerations of the product mentioned in the following text:", "Considerations:"),
|
106 |
("Explain the target users considerations of the product mentioned in the following text:", "Target Users Considerations:"),
|
107 |
-
("My problem to solve is", "- please make 10 sub problems have to solve from this:"),
|
108 |
],
|
109 |
"Business Prompts" : [
|
110 |
("Suggest Product ideas just based off the following text:", "Products:"),
|
@@ -118,20 +129,112 @@ Allprompts = {
|
|
118 |
("Write an example of a detailed report for a Financial Projections for " , "Financial Projections:"),
|
119 |
("Explain how this to make this product unique from competitors:", "Considerations:"),
|
120 |
],
|
121 |
-
"Programming Pattern Prompts"
|
122 |
("Demonstrate a builder pattern in go:", ""),
|
123 |
-
("Demonstrate
|
124 |
("Demonstrate a builder pattern in rust:", ""),
|
125 |
-
("Demonstrate
|
126 |
("Explain how RAII pattern affects rust:", ""),
|
127 |
("Demonstrate a builder pattern in c++:", ""),
|
128 |
("Explain when to consider using a builder pattern in go:", ""),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
],
|
130 |
-
"Creativity Prompts (Rule observation)"
|
|
|
131 |
("Make the following text more vague:", "Vague version:"),
|
132 |
("Turn the following text into a bunch of rules:", "Rules:"),
|
133 |
("What Syllogisms can be made from this text:", "Syllogisms:"),
|
134 |
("Reimagine the following text:", ""),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
],
|
136 |
"Game Based" : [
|
137 |
{"Write a story in 10 short sentences (6 words or less):", "1. "},
|
@@ -162,34 +265,6 @@ with gr.Blocks() as iface:
|
|
162 |
MainOutput = gr.TextArea(placeholder='Output will show here')
|
163 |
CustomButtonInput = gr.TextArea(lines=1, placeholder='Prompt goes here')
|
164 |
|
165 |
-
# with gr.Accordion("Random Ideas"):
|
166 |
-
# with gr.Group():
|
167 |
-
# for index, (prompt, _) in enumerate(CustomPrompts):
|
168 |
-
# button = gr.Button(prompt)
|
169 |
-
# # Pass CustomPrompts list as an argument
|
170 |
-
# button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(CustomPrompts)], outputs=MainOutput)
|
171 |
-
|
172 |
-
# with gr.Accordion("General Product and Business based", open=False):
|
173 |
-
# with gr.Group():
|
174 |
-
# for index, (prompt, _) in enumerate(BusinessPrompts):
|
175 |
-
# button = gr.Button(prompt)
|
176 |
-
# # Pass BusinessPrompts list as an argument
|
177 |
-
# button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(BusinessPrompts)], outputs=MainOutput)
|
178 |
-
|
179 |
-
# with gr.Accordion("General Programming Pattern based", open=False):
|
180 |
-
# with gr.Group():
|
181 |
-
# for index, (prompt, _) in enumerate(ProgrammingPatternPrompts):
|
182 |
-
# button = gr.Button(prompt)
|
183 |
-
# # Pass BusinessPrompts list as an argument
|
184 |
-
# button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(ProgrammingPatternPrompts)], outputs=MainOutput)
|
185 |
-
|
186 |
-
# with gr.Accordion("General Creativity Pattern based", open=False):
|
187 |
-
# with gr.Group():
|
188 |
-
# for index, (prompt, _) in enumerate(CreativityPrompts):
|
189 |
-
# button = gr.Button(prompt)
|
190 |
-
# # Pass BusinessPrompts list as an argument
|
191 |
-
# button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(CreativityPrompts)], outputs=MainOutput)
|
192 |
-
|
193 |
for category_name, category_prompts in Allprompts.items():
|
194 |
with gr.Accordion(f"General {category_name} Pattern based", open=False):
|
195 |
with gr.Group():
|
|
|
96 |
yield from generate_response(cust_user_message)
|
97 |
|
98 |
Allprompts = {
|
99 |
+
"Expansive Problem solving": [
|
100 |
+
("My problem to solve is", "- please make 10 sub problems have to solve from this:"),
|
101 |
+
("My process to solve is", "- please make 10 sub processes have to solve from this:"),
|
102 |
+
("My goal to solve is", "- please make 10 sub goals have to solve from this:"),
|
103 |
+
("My task to solve is", "- please make 10 sub tasks have to solve from this:"),
|
104 |
+
("My phase to solve is", "- please make 10 sub phases have to solve from this:"),
|
105 |
+
("My component to solve is", "- please make 10 sub components have to solve from this:"),
|
106 |
+
("My element to solve is", "- please make 10 sub elements have to solve from this:"),
|
107 |
+
("A brief description of my current situation:", "- please list the most important task to pay attention to:"),
|
108 |
+
("A brief description of my current situation to analyse:", "- please conduct a situational analysis:"),
|
109 |
+
("A brief description of my current situation to decompose:", "- please conduct a problem decomposition:"),
|
110 |
+
],
|
111 |
+
"Random Custom Prompts" : [
|
112 |
("Write a Class Diagram based on the following text:", "Class Diagram:"),
|
113 |
("Write a Pydot code based on the following text:", "Pydot Code:"),
|
114 |
("Describe what a standard happy scene in any movie would be planned in great detail, based on the following text:", "Scene Details"),
|
|
|
116 |
("Explain the manufacturing of the product mentioned in the following text:", "Manufacturing Details:"),
|
117 |
("Explain the marketing considerations of the product mentioned in the following text:", "Considerations:"),
|
118 |
("Explain the target users considerations of the product mentioned in the following text:", "Target Users Considerations:"),
|
|
|
119 |
],
|
120 |
"Business Prompts" : [
|
121 |
("Suggest Product ideas just based off the following text:", "Products:"),
|
|
|
129 |
("Write an example of a detailed report for a Financial Projections for " , "Financial Projections:"),
|
130 |
("Explain how this to make this product unique from competitors:", "Considerations:"),
|
131 |
],
|
132 |
+
"Programming Pattern Prompts": [
|
133 |
("Demonstrate a builder pattern in go:", ""),
|
134 |
+
("Demonstrate zero cost abstractions in go:", ""),
|
135 |
("Demonstrate a builder pattern in rust:", ""),
|
136 |
+
("Demonstrate Polymorphism in rust:", ""),
|
137 |
("Explain how RAII pattern affects rust:", ""),
|
138 |
("Demonstrate a builder pattern in c++:", ""),
|
139 |
("Explain when to consider using a builder pattern in go:", ""),
|
140 |
+
("Demonstrate a factory pattern in go:", ""),
|
141 |
+
("Explain the use of trait objects in rust:", ""),
|
142 |
+
("Demonstrate a singleton pattern in rust:", ""),
|
143 |
+
("Explain how to implement the strategy pattern in c++:", ""),
|
144 |
+
("Demonstrate a decorator pattern in go:", ""),
|
145 |
+
("Explain the observer pattern in rust:", ""),
|
146 |
+
("Demonstrate a command pattern in c++:", ""),
|
147 |
+
("Explain when to consider using a factory pattern in go:", ""),
|
148 |
+
("Demonstrate a prototype pattern in rust:", ""),
|
149 |
+
("Explain the use of lifetimes in rust and their impact on patterns:", ""),
|
150 |
+
("Demonstrate an adapter pattern in c++:", ""),
|
151 |
+
("Explain the difference between a decorator and a proxy pattern in go:", ""),
|
152 |
+
("Demonstrate a flyweight pattern in rust:", ""),
|
153 |
+
("Explain how to implement the iterator pattern in c++:", ""),
|
154 |
+
("Demonstrate a chain of responsibility pattern in go:", ""),
|
155 |
+
("Explain the use of smart pointers in c++ and their impact on patterns:", ""),
|
156 |
+
("Demonstrate a mediator pattern in rust:", ""),
|
157 |
+
("Explain when to consider using a singleton pattern in go:", ""),
|
158 |
+
("Demonstrate a memento pattern in c++:", ""),
|
159 |
+
("Explain the state pattern in rust:", ""),
|
160 |
+
("Demonstrate a visitor pattern in go:", ""),
|
161 |
+
("Explain how to implement the template method pattern in c++:", ""),
|
162 |
+
("Explain how the observer pattern works in c++:", ""),
|
163 |
+
("Explain the advantages of using a facade pattern in rust:", ""),
|
164 |
+
("Explain how the template method pattern can be used in go:", ""),
|
165 |
+
("Demonstrate a strategy pattern in rust:", ""),
|
166 |
+
("Explain the benefits of using a command pattern in c++:", ""),
|
167 |
+
("Demonstrate a proxy pattern in go:", ""),
|
168 |
+
("Explain how the chain of responsibility pattern works in rust:", ""),
|
169 |
+
("Demonstrate a bridge pattern in c++:", ""),
|
170 |
+
("Explain when to use a mediator pattern in go:", ""),
|
171 |
+
("Explain the advantages of using a composite pattern in c++:", ""),
|
172 |
+
("Explain how the state pattern can be used in rust:", ""),
|
173 |
+
("Explain the benefits of using an iterator pattern in go:", ""),
|
174 |
+
("Demonstrate a memento pattern in rust:", ""),
|
175 |
+
("Explain how the interpreter pattern works in c++:", ""),
|
176 |
+
("Demonstrate a null object pattern in go:", ""),
|
177 |
+
("Explain when to consider using a dependency injection pattern in rust:", ""),
|
178 |
+
("Demonstrate a fluent interface pattern in c++:", ""),
|
179 |
+
("Explain the advantages of using a repository pattern in go:", ""),
|
180 |
+
("Demonstrate a circuit breaker pattern in rust:", ""),
|
181 |
+
("Explain how the throttling pattern can be used in c++:", ""),
|
182 |
+
("Demonstrate a retry pattern in go:", ""),
|
183 |
+
("Explain the benefits of using a bulkhead pattern in rust:", ""),
|
184 |
+
("Demonstrate a CQRS pattern in c++:", ""),
|
185 |
+
("Explain when to use an event sourcing pattern in go:", ""),
|
186 |
+
("Demonstrate a saga pattern in rust:", ""),
|
187 |
+
("Explain how the two-phase commit pattern works in c++:", ""),
|
188 |
],
|
189 |
+
"Creativity Prompts (Rule observation)": [
|
190 |
+
("Mention things not stated in the following text:", "Unconsidered, Unmentioned"),
|
191 |
("Make the following text more vague:", "Vague version:"),
|
192 |
("Turn the following text into a bunch of rules:", "Rules:"),
|
193 |
("What Syllogisms can be made from this text:", "Syllogisms:"),
|
194 |
("Reimagine the following text:", ""),
|
195 |
+
("Extrapolate future scenarios based on the following text:", "Future scenarios:"),
|
196 |
+
("Compare and contrast the perspectives in this text with those from another text:", "Comparison:"),
|
197 |
+
("Design a debate based on the arguments presented in this text:", "Debate design:"),
|
198 |
+
("Create a flowchart that outlines the decision-making process described in this text:", "Flowchart representation:"),
|
199 |
+
("Transform the main ideas of this text into a board game concept:", "Board game concept:"),
|
200 |
+
("Identify the underlying assumptions in the following text:", "Assumptions:"),
|
201 |
+
("Rewrite the following text from a different perspective:", "Alternate perspective:"),
|
202 |
+
("Summarize the main points of the following text in a haiku:", "Haiku summary:"),
|
203 |
+
("Create a metaphor for the main idea of the following text:", "Metaphor:"),
|
204 |
+
("Identify the logical fallacies in the following text:", "Logical fallacies:"),
|
205 |
+
("Rewrite the following text as a dialogue between two characters:", "Dialogue:"),
|
206 |
+
("Create a visual representation of the following text:", "Visual representation:"),
|
207 |
+
("Identify the emotions conveyed in the following text:", "Emotions:"),
|
208 |
+
("Rewrite the following text in the style of a fairy tale:", "Fairy tale version:"),
|
209 |
+
("Create a series of questions that challenge the ideas in the following text:", "Challenging questions:"),
|
210 |
+
("Identify the cultural context and biases in the following text:", "Cultural context and biases:"),
|
211 |
+
("Rewrite the following text as a news article:", "News article:"),
|
212 |
+
("Create a poem inspired by the following text:", "Inspired poem:"),
|
213 |
+
("Identify the implications and consequences of the ideas in the following text:", "Implications and consequences:"),
|
214 |
+
("Rewrite the following text as a series of tweets:", "Tweet series:"),
|
215 |
+
("Create a short story that expands on the following text:", "Short story:"),
|
216 |
+
("Identify the target audience for the following text:", "Target audience:"),
|
217 |
+
("Rewrite the following text as a persuasive speech:", "Persuasive speech:"),
|
218 |
+
("Create a series of emojis that represent the main ideas of the following text:", "Emoji representation:"),
|
219 |
+
("Identify the historical context of the following text:", "Historical context:"),
|
220 |
+
("Rewrite the following text as a scientific abstract:", "Scientific abstract:"),
|
221 |
+
("Create a series of memes inspired by the following text:", "Meme series:"),
|
222 |
+
("Identify the ethical considerations related to the following text:", "Ethical considerations:"),
|
223 |
+
("Create a parody of the following text:", "Parody:"),
|
224 |
+
("Identify the subtext and hidden meanings in the following text:", "Subtext and hidden meanings:"),
|
225 |
+
("Find the implicit assumptions in the following text:", "Implicit assumptions:"),
|
226 |
+
("Make the following text more abstract:", "Abstract version:"),
|
227 |
+
("What are the potential consequences of the following text?:", "Consequences:"),
|
228 |
+
("Rewrite the following text using metaphors:", "Metaphor version:"),
|
229 |
+
("What questions does the following text raise?:", "Questions raised:"),
|
230 |
+
("Identify any cause-and-effect relationships in the following text:", "Cause-and-effect:"),
|
231 |
+
("Make the following text more precise:", "Precise version:"),
|
232 |
+
("What are the underlying values expressed in the following text?:", "Underlying values:"),
|
233 |
+
("Rewrite the following text using analogies:", "Analogy version:"),
|
234 |
+
("What are the potential implications of the following text?:", "Implications:"),
|
235 |
+
("Identify any paradoxes in the following text:", "Paradoxes:"),
|
236 |
+
("Rewrite the following text using personification:", "Personification version:"),
|
237 |
+
("What are the potential biases in the following text?:", "Biases:"),
|
238 |
],
|
239 |
"Game Based" : [
|
240 |
{"Write a story in 10 short sentences (6 words or less):", "1. "},
|
|
|
265 |
MainOutput = gr.TextArea(placeholder='Output will show here')
|
266 |
CustomButtonInput = gr.TextArea(lines=1, placeholder='Prompt goes here')
|
267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
for category_name, category_prompts in Allprompts.items():
|
269 |
with gr.Accordion(f"General {category_name} Pattern based", open=False):
|
270 |
with gr.Group():
|