Update app.py
Browse files
app.py
CHANGED
@@ -350,14 +350,22 @@ Organize the result in JSON format as follows:
|
|
350 |
os.environ["OPENAI_API_KEY"] = self.api
|
351 |
client = AsyncOpenAI()
|
352 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
if self.enable_rag:
|
354 |
messages=[
|
355 |
-
{"role": "system", "content": f"Read the following content from several papers to gain knowledge in the relevant field. Using this knowledge, review a new scientific paper in this field. Based on existing research, identify the limitations of the 'Paper to Review'. Generate {str(self.limit_num)} major limitations related to its {self.aspect} in this paper
|
356 |
{"role": "user", "content": text},
|
357 |
]
|
358 |
else:
|
359 |
messages=[
|
360 |
-
{"role": "system", "content": f"Read the following scientific paper and generate {str(self.limit_num)} major limitations in this paper about its {self.aspect}
|
361 |
{"role": "user", "content": text},
|
362 |
]
|
363 |
|
@@ -410,7 +418,7 @@ Organize the result in JSON format as follows:
|
|
410 |
messages = []
|
411 |
for limitation in limitations:
|
412 |
message=[
|
413 |
-
{"role": "system", "content": f"Read the following scientific paper and a limitation of the paper.
|
414 |
{"role": "user", "content": f"{text}\nLimitation: {limitation}"},
|
415 |
]
|
416 |
messages.append(message)
|
|
|
350 |
os.environ["OPENAI_API_KEY"] = self.api
|
351 |
client = AsyncOpenAI()
|
352 |
|
353 |
+
if self.aspect == "Methodology":
|
354 |
+
hint = "focusing on the fundamental approaches and techniques employed in the research. These include issues such as inappropriate choice of methods, unstated assumptions that may not hold, and problems with data quality or preprocessing that could introduce bias."
|
355 |
+
elif self.aspect == "Result Analysis":
|
356 |
+
hint = "focusing on weaknesses in how the research validates its claims. These include issues such as insufficient baseline comparisons, limited datasets that may not represent the full problem space, and lack of ablation studies to isolate the contribution of different components."
|
357 |
+
elif self.aspect == "Experimental Design":
|
358 |
+
hint = "focusing on how findings are evaluated and interpreted. This includes using inadequate evaluation metrics that may not capture important aspects of performance, insufficient error analysis, and lack of statistical significance testing."
|
359 |
+
elif self.aspect == "Literature Review":
|
360 |
+
hint = "focusing on how the research connects to and builds upon existing work. This includes missing citations of relevant prior work, mischaracterization of existing methods, and failure to properly contextualize contributions within the broader research landscape."
|
361 |
if self.enable_rag:
|
362 |
messages=[
|
363 |
+
{"role": "system", "content": f"Read the following content from several papers to gain knowledge in the relevant field. Using this knowledge, review a new scientific paper in this field. Based on existing research, identify the limitations of the 'Paper to Review'. Generate {str(self.limit_num)} major limitations related to its {self.aspect} in this paper, {hint} Do not include any limitation explicitly mentioned in the paper itself. Return only the limitations in the following JSON format: {{\"limitations\": <a list of limitations>"} ,
|
364 |
{"role": "user", "content": text},
|
365 |
]
|
366 |
else:
|
367 |
messages=[
|
368 |
+
{"role": "system", "content": f"Read the following scientific paper and generate {str(self.limit_num)} major limitations in this paper about its {self.aspect}, {hint} Do not include any limitation explicitly mentioned in the paper itself. Return only the limitations in the following JSON format: {{\"limitations\": <a list of limitations>"} ,
|
369 |
{"role": "user", "content": text},
|
370 |
]
|
371 |
|
|
|
418 |
messages = []
|
419 |
for limitation in limitations:
|
420 |
message=[
|
421 |
+
{"role": "system", "content": f"Read the following scientific paper and a limitation of the paper. Based on this information, provide a highly specific and actionable suggestion to address the limitation. If suggesting an additional dataset, specify the exact dataset(s) by name. If proposing a methodological change, describe the specific modification. Keep the response within 50 words."} ,
|
422 |
{"role": "user", "content": f"{text}\nLimitation: {limitation}"},
|
423 |
]
|
424 |
messages.append(message)
|