Spaces:
Runtime error
Runtime error
Commit
·
0f5901d
1
Parent(s):
63e37b1
fix
Browse files- __pycache__/agents.cpython-310.pyc +0 -0
- __pycache__/app.cpython-310.pyc +0 -0
- agents.py +9 -2
- app.py +1 -0
- prompts/__pycache__/deep_research_agent_promts.cpython-310.pyc +0 -0
- prompts/deep_research_agent_promts.py +1 -0
- searcher/__pycache__/sementic_search.cpython-310.pyc +0 -0
- searcher/sementic_search.py +0 -2
__pycache__/agents.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/agents.cpython-310.pyc and b/__pycache__/agents.cpython-310.pyc differ
|
|
|
__pycache__/app.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
|
agents.py
CHANGED
|
@@ -82,8 +82,15 @@ class DeepResearchAgent:
|
|
| 82 |
while len(current_papers) == 0 and cnt < 10:
|
| 83 |
paper = self.reader.search(query,1,paper_list=self.read_papers,llm=self.llm,rerank_query=f"{topic}",publicationDate=self.publicationData)
|
| 84 |
if paper and len(paper) > 0 and paper[0]:
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
else:
|
| 88 |
failed_query.append(query)
|
| 89 |
prompt = get_deep_rewrite_query_prompt(failed_query,topic)
|
|
|
|
| 82 |
while len(current_papers) == 0 and cnt < 10:
|
| 83 |
paper = self.reader.search(query,1,paper_list=self.read_papers,llm=self.llm,rerank_query=f"{topic}",publicationDate=self.publicationData)
|
| 84 |
if paper and len(paper) > 0 and paper[0]:
|
| 85 |
+
for p in paper:
|
| 86 |
+
prompt = get_deep_judge_relevant_prompt(p.title,p.abstract,self.topic)
|
| 87 |
+
messages = self.wrap_messages(prompt)
|
| 88 |
+
response = self.get_openai_response(messages)
|
| 89 |
+
relevant = extract(response,"relevant")
|
| 90 |
+
if relevant == "1":
|
| 91 |
+
print(f"{p.title} is relevant to the topic {self.topic},have added to the queue")
|
| 92 |
+
self.read_papers.add(p.title)
|
| 93 |
+
current_papers.append(p)
|
| 94 |
else:
|
| 95 |
failed_query.append(query)
|
| 96 |
prompt = get_deep_rewrite_query_prompt(failed_query,topic)
|
app.py
CHANGED
|
@@ -15,6 +15,7 @@ import uuid
|
|
| 15 |
import yaml
|
| 16 |
import os
|
| 17 |
|
|
|
|
| 18 |
lock = threading.Lock()
|
| 19 |
app = FastAPI()
|
| 20 |
|
|
|
|
| 15 |
import yaml
|
| 16 |
import os
|
| 17 |
|
| 18 |
+
|
| 19 |
lock = threading.Lock()
|
| 20 |
app = FastAPI()
|
| 21 |
|
prompts/__pycache__/deep_research_agent_promts.cpython-310.pyc
CHANGED
|
Binary files a/prompts/__pycache__/deep_research_agent_promts.cpython-310.pyc and b/prompts/__pycache__/deep_research_agent_promts.cpython-310.pyc differ
|
|
|
prompts/deep_research_agent_promts.py
CHANGED
|
@@ -256,6 +256,7 @@ Novelty:
|
|
| 256 |
1. Distinguish your proposed method from existing methods (preferably by naming specific approaches).
|
| 257 |
2. Detail the improvements your method brings compared to previous work.
|
| 258 |
3. Clearly outline at least three contributions your idea offers to the field, including the problems it resolves and the benefits it delivers.
|
|
|
|
| 259 |
|
| 260 |
Method:
|
| 261 |
1. Present a detailed description of your idea, focusing on the core method, the specific problem it solves, and enhancements over earlier research (citing relevant literature with titles).
|
|
|
|
| 256 |
1. Distinguish your proposed method from existing methods (preferably by naming specific approaches).
|
| 257 |
2. Detail the improvements your method brings compared to previous work.
|
| 258 |
3. Clearly outline at least three contributions your idea offers to the field, including the problems it resolves and the benefits it delivers.
|
| 259 |
+
4. Try to avoid stitching existing methods as much as possible, and instead continue to delve deeper to propose your own innovative points.
|
| 260 |
|
| 261 |
Method:
|
| 262 |
1. Present a detailed description of your idea, focusing on the core method, the specific problem it solves, and enhancements over earlier research (citing relevant literature with titles).
|
searcher/__pycache__/sementic_search.cpython-310.pyc
CHANGED
|
Binary files a/searcher/__pycache__/sementic_search.cpython-310.pyc and b/searcher/__pycache__/sementic_search.cpython-310.pyc differ
|
|
|
searcher/sementic_search.py
CHANGED
|
@@ -171,8 +171,6 @@ Abstract: {paper['abstract']}
|
|
| 171 |
if len(paper_list) == 0:
|
| 172 |
return []
|
| 173 |
paper_list = [paper for paper in paper_list if paper]
|
| 174 |
-
if len(paper_list) >= 50:
|
| 175 |
-
paper_list = random.sample(paper_list,50)
|
| 176 |
paper_contents = []
|
| 177 |
for paper in paper_list:
|
| 178 |
paper_content = f"""
|
|
|
|
| 171 |
if len(paper_list) == 0:
|
| 172 |
return []
|
| 173 |
paper_list = [paper for paper in paper_list if paper]
|
|
|
|
|
|
|
| 174 |
paper_contents = []
|
| 175 |
for paper in paper_list:
|
| 176 |
paper_content = f"""
|