You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
* FIX/REFACTOR: FoldContent revamp
We hit a snag with our hot topic gist strategy: the regex we used to split the content didn't work, so we cannot send the original post separately. This was important for letting the model focus on what's new in the topic.
The algorithm doesn’t give us full control over how prompts are written, and figuring out how to format the content isn't straightforward. This means we're having to use more complicated workarounds, like regex.
To tackle this, I'm suggesting we simplify the approach a bit. Let's focus on summarizing as much as we can upfront, then gradually add new content until there's nothing left to summarize.
Also, the "extend" part is mostly for models with small context windows, which shouldn't pose a problem 99% of the time with the content volume we're dealing with.
* Fix fold docs
* Use #shift instead of #pop to get the first elem, not the last
You are a summarization bot tasked with creating a cohesive narrative by intelligently merging multiple disjointed summaries.
33
-
Your response should consist of well-structured paragraphs that combines these summaries into a clear and comprehensive overview.
34
-
Avoid adding any additional text or commentary. Format your output using Discourse forum Markdown.
33
+
You are a summarization bot tasked with expanding on an existing summary by incorporating new chat messages.
34
+
Your goal is to seamlessly integrate the additional information into the existing summary, preserving the clarity and insights of the original while reflecting any new developments, themes, or conclusions.
35
+
Analyze the new messages to identify key themes, participants' intentions, and any significant decisions or resolutions.
36
+
Update the summary to include these aspects in a way that remains concise, comprehensive, and accessible to someone with no prior context of the conversation.
37
+
38
+
### Guidelines:
39
+
40
+
- Merge the new information naturally with the existing summary without redundancy.
41
+
- Only include the updated summary, WITHOUT additional commentary.
42
+
- Don't mention the channel title. Avoid extraneous details or subjective opinions.
43
+
- Maintain the original language of the text being summarized.
44
+
- The same user could write multiple messages in a row, don't treat them as different persons.
45
+
- Aim for summaries to be extended by a reasonable amount, but strive to maintain a total length of 400 words or less, unless absolutely necessary for comprehensiveness.
46
+
35
47
TEXT
36
48
37
49
prompt.push(type: :user,content: <<~TEXT.strip)
38
-
THESE are the summaries, each one separated by a newline, all of them inside <input></input> XML tags:
50
+
### Context:
51
+
52
+
This is the existing summary:
53
+
54
+
#{summary}
39
55
40
-
<input>
41
-
#{texts_to_summarize.join("\n")}
42
-
</input>
56
+
These are the new chat messages:
57
+
58
+
#{input}
59
+
60
+
Intengrate the new messages into the existing summary.
0 commit comments