naman1102 commited on
Commit
096d42a
·
1 Parent(s): b692f0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -195,9 +195,8 @@ class BasicAgent:
195
 
196
  # Regular text question analysis
197
  prompt = (
198
- "You will receive a user question. Think step‑by‑step to decide whether external web search is required. "
199
- "Respond ONLY with a valid Python dict literal in the following format and NOTHING else:\n"
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
- You are an expert assistant. Use ONLY the materials below to answer.
365
 
366
  QUESTION:
367
  {state['question']}
@@ -369,7 +368,7 @@ QUESTION:
369
  MATERIALS:
370
  {search_block}
371
 
372
- Think step-by-step. Write ANSWER: <answer> on its own line.
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)