Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
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:
|