tikendraw commited on
Commit
b1fb492
·
1 Parent(s): 55d6387

prompt fix

Browse files
core/prompts/cot.py CHANGED
@@ -34,7 +34,7 @@ Instructions
34
  "thought":"Step by step thought process for solving the problem elaborately, given formulas and formations if required, this contails your questions, explorations, clarifications, rectifications, analysis and answers.Think step by step: Prepare few similar questions around the problem that supports the main questions/problem it, have a internal monologue, and then generate an answer based on the internal monologue. Your thoughts may contain the following (not necessarily ) - Clarification, Context, Decomposition, Resources, Analysis, Alternatives, Implications, Validation, Reflection, Application", # use this space as scratchpad for your mind
35
  "step_title":" name this steps based on thoughts",
36
  "answer":"answer or rectified answer to the problem/question, generate an answer based on inner thoughts " ,
37
- "critic" : "now look the the solution, does the answer satisfies the problem, is the approach is correct, is the answer corrent, does the answer need any correction, did it forgot/overlooked anything, can there be alternate approach, have a different perspective, re-evaluate, self verification, if you could make the solutions better what would it be?",
38
  "next_step":true/false, # boolean value - Given and answer and critic , Does the problem require more thinking/ more iteration of self reviewing/more revisions? if yes then set to true, else set to false
39
  "is_final_answer":false, # boolean value - this is not final answer , always false, (this is just dummy field to identify the final answer, always false)
40
  }
@@ -65,14 +65,13 @@ Instructions
65
  - Do not start the review with "Review the solution"
66
  - Do not start with the same line as previous answers, you look boring.
67
  - Generate a json object with this schema , keys: thought, step_title, answer, next_step
68
- - no code block
69
-
70
  Remember to maintain a balanced and objective perspective throughout your review. Your goal is not to discredit the original solution, but to ensure a comprehensive and well-reasoned approach to the problem.
71
 
72
  Provide your review in the structured JSON format as specified in the SYSTEM_PROMPT, using the 'thought' field for your detailed and step by step analysis and the 'critic' field for a concise summary of your key critiques and alternative viewpoints."
73
 
74
  {
75
- "thought":"Step by step thought process for solving the problem elaborately, given formulas and formations if required, this contails your questions, explorations, clarifications, rectifications, analysis and answers. Prepare few similar questions around the problem that supports the main questions/problem it, have a internal monologue, and then generate an answer based on the internal monologue. Your thoughts may contain the following (not necessarily ) - Clarification, Context, Decomposition, Resources, Analysis, Alternatives, Implications, Validation, Reflection, Application", # use this space as scratchpad for your mind
76
  "step_title":" name this steps based on thoughts",
77
  "answer":"answer or rectified answer to the problem/question, generate an answer based on inner thoughts " ,
78
  "critic" : "now look the the solution, does the answer satisfies the problem, is the approach is correct, is the answer corrent, does the answer need any correction, did it forgot/overlooked anything, can there be alternate approach, have a different perspective, re-evaluate, self verification, if you could make the solutions better what would it be?",
@@ -89,12 +88,12 @@ Instructions
89
  - Generate a json object with this schema , keys: thought, step_title, answer, next_step
90
  - Your thinking should happen inside the thought in json
91
  - Only one dictionary in the json , no code block
92
- - Very Elaborated Thought process
93
 
94
 
95
  {
96
- "thought":"final conclusion from the thoughts, formulate last and final thought process for the final answer,Think step by step: take all the thoughts and considerations that went into the final answer.User is not gonna see previous thoughts so do not acknowledge them, those are thoughts, have them, here you will give a final thoughts on how you reached to the answer , what are the thinks you considered, and other necessary things that let to the answer, do not say, review thoughts, summing of or that kind of thing.
97
- "step_title":" name this steps based on thoughts",
98
  "answer":"final answer or rectified answer to the problem/question" , # generate an answer based on inner thoughts
99
  "critic" : "review the final answer", # criticize the answer, if it is wrong, then correct it
100
  "next_step":false, # boolean value - this is final answer no next step required,
 
34
  "thought":"Step by step thought process for solving the problem elaborately, given formulas and formations if required, this contails your questions, explorations, clarifications, rectifications, analysis and answers.Think step by step: Prepare few similar questions around the problem that supports the main questions/problem it, have a internal monologue, and then generate an answer based on the internal monologue. Your thoughts may contain the following (not necessarily ) - Clarification, Context, Decomposition, Resources, Analysis, Alternatives, Implications, Validation, Reflection, Application", # use this space as scratchpad for your mind
35
  "step_title":" name this steps based on thoughts",
36
  "answer":"answer or rectified answer to the problem/question, generate an answer based on inner thoughts " ,
37
+ "critic" : "write a feedback about the solution above, look the the solution, does the answer satisfies the problem, is the approach is correct, is the answer corrent, does the answer need any correction, did it forgot/overlooked anything, can there be alternate approach, have a different perspective, re-evaluate, self verification, if you could make the solutions better what would it be?, if you could rewrite the answers what improvements would you have made?",
38
  "next_step":true/false, # boolean value - Given and answer and critic , Does the problem require more thinking/ more iteration of self reviewing/more revisions? if yes then set to true, else set to false
39
  "is_final_answer":false, # boolean value - this is not final answer , always false, (this is just dummy field to identify the final answer, always false)
40
  }
 
65
  - Do not start the review with "Review the solution"
66
  - Do not start with the same line as previous answers, you look boring.
67
  - Generate a json object with this schema , keys: thought, step_title, answer, next_step
68
+ - Consider the previous answer and its critic and feedbacks, try to improve on it.
 
69
  Remember to maintain a balanced and objective perspective throughout your review. Your goal is not to discredit the original solution, but to ensure a comprehensive and well-reasoned approach to the problem.
70
 
71
  Provide your review in the structured JSON format as specified in the SYSTEM_PROMPT, using the 'thought' field for your detailed and step by step analysis and the 'critic' field for a concise summary of your key critiques and alternative viewpoints."
72
 
73
  {
74
+ "thought":"Step by step thought process for solving the problem elaborately, given formulas and formations if required, this contails your questions, explorations, clarifications, rectifications, analysis and answers.have a internal monologue, and then generate an answer based on the internal monologue. Your thoughts may contain the following (not necessarily ) - Clarification, Context, Decomposition, Resources, Analysis, Alternatives, Implications, Validation, Reflection, Application", # use this space as scratchpad for your mind
75
  "step_title":" name this steps based on thoughts",
76
  "answer":"answer or rectified answer to the problem/question, generate an answer based on inner thoughts " ,
77
  "critic" : "now look the the solution, does the answer satisfies the problem, is the approach is correct, is the answer corrent, does the answer need any correction, did it forgot/overlooked anything, can there be alternate approach, have a different perspective, re-evaluate, self verification, if you could make the solutions better what would it be?",
 
88
  - Generate a json object with this schema , keys: thought, step_title, answer, next_step
89
  - Your thinking should happen inside the thought in json
90
  - Only one dictionary in the json , no code block
91
+ - write Very Elaborated Thought process
92
 
93
 
94
  {
95
+ "thought":"Generate a one complete answer from the previous thoughts, formulate last and final thought process for the final answer,Think step by step: take all the thoughts and considerations from previous thoughts and answers .User is not gonna see previous thoughts so do not acknowledge them, those are thoughts, have them, here you will give a final thoughts on how you reached to the answer , what are the thinks you considered, and other necessary things that lead to the answer, do not say, review thoughts, summing of or that kind of thing.
96
+ "step_title":" name this steps based on thoughts, don't say final thoughts or concluding something",
97
  "answer":"final answer or rectified answer to the problem/question" , # generate an answer based on inner thoughts
98
  "critic" : "review the final answer", # criticize the answer, if it is wrong, then correct it
99
  "next_step":false, # boolean value - this is final answer no next step required,
core/prompts/decision_prompt.py CHANGED
@@ -80,25 +80,19 @@ if its a cot problem, then you will create three prompts in a dict as: ,
80
 
81
 
82
  here are few examples for better undertanting:
 
83
  {
84
- 'problem': 'What is 15 percent of 80?',
85
- 'decision': 'Direct Answer',
86
- 'reasoning': 'This is a straightforward calculation that can be done in one or two steps. While it involves math, it's simple enough that most people can perform it quickly without needing a detailed explanation. A direct answer with the result should be sufficient.'
87
  'prompts':
88
  {
89
- 'system_prompt': 'You are a helpful assistant that answers questions'
 
 
90
  }
91
  }
92
 
93
- {
94
- 'problem': 'What were the main causes of World War I?',
95
- 'decision': 'Chain-of-Thought',
96
- 'reasoning': 'This question requires analyzing multiple historical factors and their interconnections. While it involves factual recall, the complexity of historical events benefits from a CoT approach. This allows us to explore various causes, their relationships, and how they collectively led to the war, providing a more comprehensive understanding.'
97
- 'prompts': [
98
- {
99
- 'system_prompt':
100
- }
101
-
102
 
103
  EXAMPLE:
104
 
@@ -197,6 +191,7 @@ Conclude with a powerful statement that encapsulates why this solution is the be
197
  Based on the above guidelines and the nature of the problem, do you recommend using Chain-of-Thought or Direct Answering? Briefly justify your choice.
198
 
199
 
 
200
  ** json Output Format:**
201
 
202
  {
 
80
 
81
 
82
  here are few examples for better undertanting:
83
+
84
  {
85
+ 'problem': 'states users problem',
86
+ 'decision': 'Direct Answer or Chain-of-Thought',
87
+ 'reasoning': 'state why you chose this decision',
88
  'prompts':
89
  {
90
+ 'system_prompt': 'prompt for generating a very good, satisfying answer to the given problem',
91
+ 'review_prompt': 'prompt for reviewing the answer, criticizing it, and suggesting a better one' # not required if decision is cot,
92
+ 'final_answer_prompt': 'prompt for generating a final answer based on previous chain of thoughs, and giving a final answer' # not required if decision is cot,
93
  }
94
  }
95
 
 
 
 
 
 
 
 
 
 
96
 
97
  EXAMPLE:
98
 
 
191
  Based on the above guidelines and the nature of the problem, do you recommend using Chain-of-Thought or Direct Answering? Briefly justify your choice.
192
 
193
 
194
+ Instructions:
195
  ** json Output Format:**
196
 
197
  {