Update app.py
Browse files
app.py
CHANGED
@@ -195,9 +195,8 @@ class BasicAgent:
|
|
195 |
|
196 |
# Regular text question analysis
|
197 |
prompt = (
|
198 |
-
"
|
199 |
-
"
|
200 |
-
"{\n 'needs_search': bool,\n 'search_query': str\n} \n\n"
|
201 |
f"Question: {state['question']}"
|
202 |
)
|
203 |
try:
|
@@ -361,7 +360,7 @@ class BasicAgent:
|
|
361 |
search_block = "\n".join(materials) if materials else "No artefacts available."
|
362 |
|
363 |
prompt = f"""
|
364 |
-
|
365 |
|
366 |
QUESTION:
|
367 |
{state['question']}
|
@@ -369,7 +368,7 @@ QUESTION:
|
|
369 |
MATERIALS:
|
370 |
{search_block}
|
371 |
|
372 |
-
|
373 |
"""
|
374 |
try:
|
375 |
raw = self._call_llm(prompt, 300)
|
|
|
195 |
|
196 |
# Regular text question analysis
|
197 |
prompt = (
|
198 |
+
"Decide if this question needs web search. Respond with a Python dict:\n"
|
199 |
+
"{\n 'needs_search': bool,\n 'search_query': str\n}\n\n"
|
|
|
200 |
f"Question: {state['question']}"
|
201 |
)
|
202 |
try:
|
|
|
360 |
search_block = "\n".join(materials) if materials else "No artefacts available."
|
361 |
|
362 |
prompt = f"""
|
363 |
+
Answer this question using ONLY the materials provided.
|
364 |
|
365 |
QUESTION:
|
366 |
{state['question']}
|
|
|
368 |
MATERIALS:
|
369 |
{search_block}
|
370 |
|
371 |
+
Write ANSWER: <answer> on its own line.
|
372 |
"""
|
373 |
try:
|
374 |
raw = self._call_llm(prompt, 300)
|