Co-authored-by: Roman Rizzi <rizziromanalejandro@gmail.com>
This commit is contained in:
parent
ec97996905
commit
33da27e231
|
@ -100,25 +100,26 @@ module DiscourseAi
|
|||
contents.to_a.map { |item| "(#{item[:id]} #{item[:poster]} said: #{item[:text]} " }
|
||||
|
||||
prompt = DiscourseAi::Completions::Prompt.new(<<~TEXT.strip)
|
||||
You are an advanced summarization bot. Analyze a given conversation and produce a concise,
|
||||
You are an advanced summarization bot. Analyze a given conversation and produce a concise,
|
||||
single-sentence summary that conveys the main topic and current developments to someone with no prior context.
|
||||
|
||||
### Guidelines:
|
||||
|
||||
|
||||
- Emphasize the most recent updates while considering their significance within the original post.
|
||||
- Focus on the central theme or issue being addressed, maintaining an objective and neutral tone.
|
||||
- Exclude extraneous details or subjective opinions.
|
||||
- Use the original language of the text.
|
||||
- Begin directly with the main topic or issue, avoiding introductory phrases.
|
||||
- Limit the summary to a maximum of 20 words.
|
||||
- Return the 20-word summary inside <ai></ai> tags.
|
||||
- Do *NOT* repeat the discussion title in the summary.
|
||||
|
||||
Return the summary inside <ai></ai> tags.\n
|
||||
TEXT
|
||||
|
||||
context = +<<~TEXT
|
||||
### Context:
|
||||
|
||||
#{content_title.present? ? "The discussion title is: " + content_title + ".\n" : ""}
|
||||
|
||||
#{content_title.present? ? "The discussion title is: " + content_title + ". (DO NOT REPEAT THIS IN THE SUMMARY)\n" : ""}
|
||||
|
||||
The conversation began with the following statement:
|
||||
|
||||
|
@ -130,7 +131,7 @@ module DiscourseAi
|
|||
Subsequent discussion includes the following:
|
||||
|
||||
#{statements.join("\n")}
|
||||
|
||||
|
||||
Your task is to focus on these latest messages, capturing their meaning in the context of the initial statement.
|
||||
TEXT
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue