Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,7 @@ def plan_node(state: AgentState) -> AgentState:
|
|
50 |
|
51 |
system_msg = SystemMessage(
|
52 |
content=(
|
|
|
53 |
"You are an agent that must do two things in one JSON output:\n\n"
|
54 |
" 1) Provide a concise, direct answer to the user's question (no explanation).\n"
|
55 |
" 2) Judge whether that answer is reliable:\n"
|
@@ -203,7 +204,9 @@ def inspect_node(state: AgentState) -> AgentState:
|
|
203 |
messages_for_llm.append(SystemMessage(content=f"INTERIM_ANSWER: {interim}"))
|
204 |
messages_for_llm.append(SystemMessage(content="Please write a polished final answer, with no explanation at all."))
|
205 |
# (4) Prompt GPT to produce a polished final answer
|
|
|
206 |
prompt = (
|
|
|
207 |
"You have the user’s question, any relevant tool results above,"
|
208 |
" and a draft answer (INTERIM_ANSWER).\n"
|
209 |
"Using all of that, write a concise, polished final answer. "
|
|
|
50 |
|
51 |
system_msg = SystemMessage(
|
52 |
content=(
|
53 |
+
|
54 |
"You are an agent that must do two things in one JSON output:\n\n"
|
55 |
" 1) Provide a concise, direct answer to the user's question (no explanation).\n"
|
56 |
" 2) Judge whether that answer is reliable:\n"
|
|
|
204 |
messages_for_llm.append(SystemMessage(content=f"INTERIM_ANSWER: {interim}"))
|
205 |
messages_for_llm.append(SystemMessage(content="Please write a polished final answer, with no explanation at all."))
|
206 |
# (4) Prompt GPT to produce a polished final answer
|
207 |
+
|
208 |
prompt = (
|
209 |
+
"You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER]. YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string."
|
210 |
"You have the user’s question, any relevant tool results above,"
|
211 |
" and a draft answer (INTERIM_ANSWER).\n"
|
212 |
"Using all of that, write a concise, polished final answer. "
|