-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(feedback): API endpoint for AI feedback summary #93134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d uses create_feedback
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #93134 +/- ##
==========================================
- Coverage 88.00% 87.95% -0.05%
==========================================
Files 10260 10300 +40
Lines 591960 592519 +559
Branches 22978 22789 -189
==========================================
+ Hits 520939 521138 +199
- Misses 70531 70951 +420
+ Partials 490 430 -60 |
# is this a bad use of patch? | ||
@patch( | ||
"sentry.api.endpoints.organization_feedback_summary.MAX_FEEDBACKS_TO_SUMMARIZE_CHARS", | ||
1000, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad use of patch?
are we waiting for a review on this from someone else? |
let's get @cmanallen to look at it |
Some tests in |
tests/sentry/api/endpoints/test_organization_feedback_summary.py
Outdated
Show resolved
Hide resolved
def make_input_prompt( | ||
feedbacks, | ||
): | ||
feedbacks_string = "\n".join(f"- {msg}" for msg in feedbacks) | ||
return f"""Task: | ||
Instructions: You are an AI assistant that analyzes customer feedback. | ||
Create a summary based on the user feedbacks that is at most three sentences, and complete the sentence "Users say...". Be concise, but specific in the summary. | ||
|
||
User Feedbacks: | ||
|
||
{feedbacks_string} | ||
|
||
Output Format: | ||
|
||
Summary: <1-3 sentence summary> | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be aware. The AI team wants everything prompt related in Seer. I think its low risk to leave this here for now. But a future refactor should be considered where you proxy Seer.
""" | ||
|
||
|
||
SUMMARY_REGEX = re.compile(r"Summary:\s*(.*)", re.DOTALL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now. But we can get structured output. There's many examples in Seer. Here's one I recently wrote: https://github.com/getsentry/seer/pull/2741/files#diff-798e03ed205a63e1198b21d0837bef5af0862f83704afafb084d68cff456ee4eR220-R251
Updated this PR based on the reviews, currently waiting for tests to pass, is there anything else we need to do for this? |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Linear ticket: https://linear.app/getsentry/issue/REPLAY-292/api-endpoint-to-generate-summary-for-feedbacks With tests - Includes changes from #92932 (adding the `feedbacksummaries` usecase) - Q: Should the feature flag be added in this PR? - Todo: add the `feedbacksummaries` usecase with its respective model in getsentry options -- - PR to add feedbacksummaries LLM usecase: getsentry/getsentry#17647 - PRs to add feature flag: #93162 and getsentry/sentry-options-automator#4115
Linear ticket: https://linear.app/getsentry/issue/REPLAY-292/api-endpoint-to-generate-summary-for-feedbacks
With tests
feedbacksummaries
usecase)feedbacksummaries
usecase with its respective model in getsentry options--