Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit e0ae713

Browse files
committed
Improve summary prompt so it is less ambiguous
1 parent a9b511d commit e0ae713

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/summarization/strategies/topic_summary.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ def summary_extension_prompt(summary, contents)
4242
- Maintain the original language of the text being summarized.
4343
- Aim for summaries to be 400 words or less.
4444
- Each new post is formatted as "<POST_NUMBER>) <USERNAME> <MESSAGE>"
45-
- Cite specific noteworthy posts using the format [NAME](#{resource_path}/POST_NUMBER)
46-
- Example: link to the 3rd post by sam: [sam](#{resource_path}/3)
45+
- Cite specific noteworthy posts using the format [DESCRIPTION](#{resource_path}/POST_NUMBER)
46+
- Example: links to the 3rd and 6th posts by sam: sam ([#3](#{resource_path}/3), [#6](#{resource_path}/6))
4747
- Example: link to the 6th post by jane: [agreed with](#{resource_path}/6)
48-
- Example: link to the 13th post by joe: [#13](#{resource_path}/13)
48+
- Example: link to the 13th post by joe: [joe](#{resource_path}/13)
4949
- When formatting usernames either use @USERNAME or [USERNAME](#{resource_path}/POST_NUMBER)
5050
TEXT
5151

5252
prompt.push(type: :user, content: <<~TEXT.strip)
5353
### Context:
5454
5555
#{content_title.present? ? "The discussion title is: " + content_title + ".\n" : ""}
56-
56+
5757
Here is the existing summary:
58-
58+
5959
#{summary}
60-
60+
6161
Here are the new posts, inside <input></input> XML tags:
6262
6363
<input>
@@ -84,10 +84,10 @@ def first_summary_prompt(contents)
8484
- Maintain the original language of the text being summarized.
8585
- Aim for summaries to be 400 words or less.
8686
- Each post is formatted as "<POST_NUMBER>) <USERNAME> <MESSAGE>"
87-
- Cite specific noteworthy posts using the format [NAME](#{resource_path}/POST_NUMBER)
88-
- Example: link to the 3rd post by sam: [sam](#{resource_path}/3)
87+
- Cite specific noteworthy posts using the format [DESCRIPTION](#{resource_path}/POST_NUMBER)
88+
- Example: links to the 3rd and 6th posts by sam: sam ([#3](#{resource_path}/3), [#6](#{resource_path}/6))
8989
- Example: link to the 6th post by jane: [agreed with](#{resource_path}/6)
90-
- Example: link to the 13th post by joe: [#13](#{resource_path}/13)
90+
- Example: link to the 13th post by joe: [joe](#{resource_path}/13)
9191
- When formatting usernames either use @USERNMAE OR [USERNAME](#{resource_path}/POST_NUMBER)
9292
TEXT
9393

0 commit comments

Comments
 (0)