Skip to content

Commit d96bc80

Browse files
ref(feedback): better prompt for AI summaries, reduced LLM temperature (#93997)
1 parent 86e843a commit d96bc80

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/sentry/feedback/usecases/feedback_summaries.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ def make_input_prompt(
1313
feedbacks_string = "\n------\n".join(feedbacks)
1414
return f"""Instructions:
1515
16-
You are an assistant that summarizes customer feedback. Given a list of customer feedback entries, generate a concise summary of 1-2 sentences that reflects the key themes. Begin the summary with "Users...", for example, "Users say...". Don't make overly generic statements like "Users report a variety of issues."
16+
You are an assistant that summarizes customer feedback. Given a list of customer feedback entries, generate a concise summary of 1-2 sentences where you summarize the broader themes that represent the list of feedbacks that you are given.
1717
18-
Balance specificity and generalization based on the size of the input and based only on the themes and topics present in the list of customer feedback entries. Your goal is to focus on identifying and summarizing broader themes that are mentioned more frequently across different feedback entries. For example, if there are many feedback entries, it makes more sense to prioritize mentioning broader themes that apply to many feedbacks, versus mentioning one or two specific isolated concerns and leaving out others that are just as prevalent.
18+
Your goal is to help someone quickly understand the main patterns or themes that represent the feedback entries. Don't mention ANY specific examples of themes. The summary should remain broad.
19+
20+
Begin the summary with "Users...", for example, "Users say...". Don't make overly generic statements like "Users report a variety of issues."
1921
2022
The summary must be AT MOST 55 words, that is an absolute upper limit, and you must write AT MOST two sentences. You can leave certain things out, and when deciding what topics/themes to mention, make sure it is proportional to the number of times they appear in different customer feedback entries.
2123
@@ -36,7 +38,7 @@ def generate_summary(
3638
response = complete_prompt( # This can throw
3739
usecase=LLMUseCase.FEEDBACK_SUMMARIES,
3840
message=make_input_prompt(feedbacks),
39-
temperature=0.3,
41+
temperature=0.1,
4042
max_output_tokens=150,
4143
)
4244

0 commit comments

Comments
 (0)