Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -270,7 +270,7 @@ SYSTEM1 = (
|
|
270 |
"""
|
271 |
You are a PDF research agent with a single tool: mcp_test_search(query: string, k: int).
|
272 |
Act iteratively:
|
273 |
-
1) Split the user question into 1–4 focused sub-queries. Subqueries should be asked as natural language questions
|
274 |
2) For each sub-query, call mcp_test_search (k=5 by default; increase to up to 10 if you need to go deep).
|
275 |
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 be fed the corresponding pages as images in a follow-up message.
|
276 |
4) Stop early when confident; otherwise run new search calls using the tool to find additional missing 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.
|
@@ -288,7 +288,7 @@ Deliverable:
|
|
288 |
SYSTEM2 = """
|
289 |
You are a PDF research agent with a single tool: mcp_test_search_synthetize(query: string, k: int).
|
290 |
Act iteratively:
|
291 |
-
1) Split the user question into 1–4 focused sub-queries. Subqueries should be asked as natural language questions
|
292 |
2) For each sub-query, call mcp_test_search_synthetize (k=5 by default; increase to up to 20 if you need to go deep).
|
293 |
3) Stop early when confident; otherwise refine and repeat, up to 4 iterations and 20 searches in total. If info is missing, try to continue searching using new keywords and queries.
|
294 |
|
@@ -622,7 +622,7 @@ def build_ui():
|
|
622 |
with gr.Row():
|
623 |
with gr.Column(scale=1):
|
624 |
query_box = gr.Textbox(placeholder="Enter your question…", label="Query", lines=4)
|
625 |
-
k_slider = gr.Slider(minimum=1, maximum=
|
626 |
search_button = gr.Button("🔍 Search", variant="primary")
|
627 |
search_synthetize_button = gr.Button("🔍 Search & Synthetize", variant="primary")
|
628 |
|
|
|
270 |
"""
|
271 |
You are a PDF research agent with a single tool: mcp_test_search(query: string, k: int).
|
272 |
Act iteratively:
|
273 |
+
1) Split the user question into 1–4 focused sub-queries. Subqueries should be asked as natural language questions, not just keywords.
|
274 |
2) For each sub-query, call mcp_test_search (k=5 by default; increase to up to 10 if you need to go deep).
|
275 |
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 be fed the corresponding pages as images in a follow-up message.
|
276 |
4) Stop early when confident; otherwise run new search calls using the tool to find additional missing 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.
|
|
|
288 |
SYSTEM2 = """
|
289 |
You are a PDF research agent with a single tool: mcp_test_search_synthetize(query: string, k: int).
|
290 |
Act iteratively:
|
291 |
+
1) Split the user question into 1–4 focused sub-queries. Subqueries should be asked as natural language questions, not just keywords.
|
292 |
2) For each sub-query, call mcp_test_search_synthetize (k=5 by default; increase to up to 20 if you need to go deep).
|
293 |
3) Stop early when confident; otherwise refine and repeat, up to 4 iterations and 20 searches in total. If info is missing, try to continue searching using new keywords and queries.
|
294 |
|
|
|
622 |
with gr.Row():
|
623 |
with gr.Column(scale=1):
|
624 |
query_box = gr.Textbox(placeholder="Enter your question…", label="Query", lines=4)
|
625 |
+
k_slider = gr.Slider(minimum=1, maximum=20, step=1, label="Number of results (k)", value=5)
|
626 |
search_button = gr.Button("🔍 Search", variant="primary")
|
627 |
search_synthetize_button = gr.Button("🔍 Search & Synthetize", variant="primary")
|
628 |
|