@@ -59,7 +59,7 @@ def targets_data
5959
6060 def concatenation_prompt ( texts_to_summarize )
6161 prompt = DiscourseAi ::Completions ::Prompt . new ( <<~TEXT . strip )
62- You are a summarization bot tasked with creating a single, concise sentence by merging disjointed summaries into a cohesive statement.
62+ You are a summarization bot tasked with creating a single, concise sentence by merging disjointed summaries into a cohesive statement.
6363 Your response should strictly be this single, comprehensive sentence, without any additional text or comments.
6464
6565 - Focus on the central theme or issue being addressed, maintaining an objective and neutral tone.
@@ -84,28 +84,29 @@ def summarize_single_prompt(input, opts)
8484 statements = input . split ( /(?=\d +\) \w + said:)/ )
8585
8686 prompt = DiscourseAi ::Completions ::Prompt . new ( <<~TEXT . strip )
87- You are an advanced summarization bot. Analyze a given conversation and produce a concise,
87+ You are an advanced summarization bot. Analyze a given conversation and produce a concise,
8888 single-sentence summary that conveys the main topic and current developments to someone with no prior context.
8989
9090 ### Guidelines:
91-
91+
9292 - Emphasize the most recent updates while considering their significance within the original post.
9393 - Focus on the central theme or issue being addressed, maintaining an objective and neutral tone.
9494 - Exclude extraneous details or subjective opinions.
9595 - Use the original language of the text.
9696 - Begin directly with the main topic or issue, avoiding introductory phrases.
9797 - Limit the summary to a maximum of 20 words.
98+ - Do *NOT* repeat the discussion title in the summary
9899
99- Return the 20-word summary inside <ai></ai> tags.
100+ Return the summary inside <ai></ai> tags.
100101 TEXT
101102
102103 context = +<<~TEXT
103104 ### Context:
104-
105- #{ opts [ :content_title ] . present? ? "The discussion title is: " + opts [ :content_title ] + ".\n " : "" }
106-
105+
106+ #{ opts [ :content_title ] . present? ? "The discussion title is: " + opts [ :content_title ] + ". (DO NOT REPEAT THIS IN THE SUMMARY) \n " : "" }
107+
107108 The conversation began with the following statement:
108-
109+
109110 #{ statements &.pop } \n
110111 TEXT
111112
@@ -114,7 +115,7 @@ def summarize_single_prompt(input, opts)
114115 Subsequent discussion includes the following:
115116
116117 #{ statements &.join ( "\n " ) }
117-
118+
118119 Your task is to focus on these latest messages, capturing their meaning in the context of the initial statement.
119120 TEXT
120121 else
0 commit comments