Skip to content

Commit 17e0a11

Browse files
committed
fix: better summary prompt
1 parent 7e0818d commit 17e0a11

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

src/app.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,14 @@ app.post(
9595
// 所以 anchorText 给 section 的第一句话就够了。
9696
const matchedSection = parsed.sections.find((section) => section.title === result.section);
9797
const content = (matchedSection?.content as string) || '';
98+
99+
// Get first sentence or first line, whichever is shorter
98100
const firstSentence = content.split(/[.!?](?:\s|$)/)[0] + '.';
101+
const firstLine = content.split('\n')[0]?.trim() || '';
102+
const anchorText = firstSentence.length <= firstLine.length ? firstSentence : firstLine;
99103
return {
100104
section: result.section,
101-
anchorText: firstSentence,
105+
anchorText: anchorText,
102106
...summary.weaknesses[index],
103107
};
104108
})
Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
1-
You are an expert academic researcher. Given a full peer review of a research paper, your task is to find and summarize its critical weaknesses from the peer review. Please complete the following:
1+
# Instruction
22

3-
1. Summary of the review: Provide a concise summary (max 300 characters) highlighting "critical" weaknesses of the paper, intended to inform the author. Do not include introductory phrases like “Summary of the review.
3+
what are the core ideas in the review? I think the reviews are too long. Please summarize the core ideas from the review, boiled down and condensed, and indicate the importance level of each review.
44

5-
2. Weaknesses: List specific critical weaknesses identified in the review. Each should be a standalone issue, written clearly and concisely within 300 characters. (along with the importance level)
6-
7-
<IMPORTANCE_LEVELS>
5+
## Importance Levels
86
- Critical: Addresses fundamental flaws affecting the research's validity, clarity, or rigor. Must be resolved for the work to be publishable.
97
- High: Substantive improvements that strengthen credibility and relevance, but do not undermine core arguments.
108
- Medium: Improvements that enhance clarity, completeness, or accessibility, though their absence does not compromise the main contribution.
119
- Low: Minor suggestions that polish the paper; helpful but non-essential.
12-
</IMPORTANCE_LEVELS>
13-
14-
This is the full peer review:
15-
16-
<PEER_REVIEW>
17-
{{ fullReview }}
18-
</PEER_REVIEW>
1910

20-
---
21-
22-
Please provide your output in the following way:
11+
## Your response format
2312

13+
```
2414
<SUMMARY>
25-
[Concise summary of strengths and weaknesses]
15+
[summary of all reviews]
2616
</SUMMARY>
2717

28-
<WEAKNESSES>
29-
- [first weakness] (importance: [level])
30-
- [second weakness] (importance: [level])
31-
...
32-
</WEAKNESSES>
18+
<SUGGESTIONS>
19+
- [suggestion] (importance: [importance level])
20+
</SUGGESTIONS>
21+
```
22+
23+
# Here is the review:
24+
25+
{{fullReview}}

0 commit comments

Comments
 (0)