manu commited on
Commit
7227c5c
·
verified ·
1 Parent(s): e93ac53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -193,7 +193,7 @@ Act iteratively:
193
  1) Split the user question into 1–4 focused sub-queries. Subqueries should be asked as natural language questions in the english language, not just keywords.
194
  2) For each sub-query, call mcp_test_search (k=5 by default; increase to up to 10 if you need to go deep).
195
  3) You will receive the output of mcp_test_search as a list of indices corresponding to page numbers. Stop generating once all the tool calls end. You will later be fed the corresponding pages as images in a follow-up message.
196
- 4) Stop early when confident; otherwise refine and repeat, running new search calls when need be. Use up to 5 iterations and 20 searches in total. If info is missing, try to continue searching using new keywords and queries.
197
 
198
  Workflow:
199
  • Use ONLY the provided images for grounding and cite as (p.<page>).
@@ -274,7 +274,7 @@ def stream_agent(question: str,
274
  nonlocal prev_response_id
275
 
276
  round_state["last_search_indices"] = []
277
- # round_state["final_text"] = ""
278
  # round_state["summary_text"] = ""
279
 
280
  # Build the user content for this round
 
193
  1) Split the user question into 1–4 focused sub-queries. Subqueries should be asked as natural language questions in the english language, not just keywords.
194
  2) For each sub-query, call mcp_test_search (k=5 by default; increase to up to 10 if you need to go deep).
195
  3) You will receive the output of mcp_test_search as a list of indices corresponding to page numbers. Stop generating once all the tool calls end. You will later be fed the corresponding pages as images in a follow-up message.
196
+ 4) Stop early when confident; otherwise run new search calls using the tool when need be to find additional information. Use up to 5 rounds of iterations and 20 searches in total. If info is missing, try to continue searching using new keywords and queries.
197
 
198
  Workflow:
199
  • Use ONLY the provided images for grounding and cite as (p.<page>).
 
274
  nonlocal prev_response_id
275
 
276
  round_state["last_search_indices"] = []
277
+ round_state["final_text"] = "" # reset final text
278
  # round_state["summary_text"] = ""
279
 
280
  # Build the user content for this round