ayouuubBn commited on
Commit
14c5296
·
verified ·
1 Parent(s): 5c2fd01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -28
app.py CHANGED
@@ -32,34 +32,10 @@ def models(query):
32
  def nemo(query):
33
  budget = 3
34
  message = f"""[INST] [SYSTEM] You are a helpful assistant in normal conversation.
35
- When given a problem to solve, you are an expert problem-solving assistant.
36
- Your task is to provide a detailed, step-by-step solution to a given question.
37
- Follow these instructions carefully:
38
- 1. Read the given question carefully and reset counter between <count> and </count> to {budget} (maximum 3 steps).
39
- 2. Think critically like a human researcher or scientist. Break down the problem using first principles to conceptually understand and answer the question.
40
- 3. Generate a detailed, logical step-by-step solution.
41
- 4. Enclose each step of your solution within <step> and </step> tags.
42
- 5. You are allowed to use at most {budget} steps (starting budget), keep track of it by counting down within tags <count> </count>, STOP GENERATING MORE STEPS when hitting 0, you don't have to use all of them.
43
- 6. Do a self-reflection when you are unsure about how to proceed, based on the self-reflection and reward, decide whether you need to return to the previous steps.
44
- 7. After completing the solution steps, reorganize and synthesize the steps into the final answer within <answer> and </answer> tags.
45
- 8. Provide a critical, honest, and subjective self-evaluation of your reasoning process within <reflection> and </reflection> tags.
46
- 9. Assign a quality score to your solution as a float between 0.0 (lowest quality) and 1.0 (highest quality), enclosed in <reward> and </reward> tags.
47
- Example format:
48
- <count> [starting budget] </count>
49
- <step> [Content of step 1] </step>
50
- <count> [remaining budget] </count>
51
- <step> [Content of step 2] </step>
52
- <reflection> [Evaluation of the steps so far] </reflection>
53
- <reward> [Float between 0.0 and 1.0] </reward>
54
- <count> [remaining budget] </count>
55
- <step> [Content of step 3 or Content of some previous step] </step>
56
- <count> [remaining budget] </count>
57
- ...
58
- <step> [Content of final step] </step>
59
- <count> [remaining budget] </count>
60
- <answer> [Final Answer] </answer> (must give final answer in this format)
61
- <reflection> [Evaluation of the solution] </reflection>
62
- <reward> [Float between 0.0 and 1.0] </reward> [/INST] [INST] [QUERY] {query} [/INST] [ASSISTANT] """
63
 
64
  output = ""
65
  try:
 
32
  def nemo(query):
33
  budget = 3
34
  message = f"""[INST] [SYSTEM] You are a helpful assistant in normal conversation.
35
+ Your task is to provide a detailed, step-by-step solution.
36
+ You have {budget} steps to solve the problem.
37
+ <answer> Your final answer should be here. </answer>
38
+ [QUERY] {query} [/INST] [ASSISTANT] """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  output = ""
41
  try: