-
Notifications
You must be signed in to change notification settings - Fork 916
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
Add discover summary error info and button click logic enhancement #8352
Conversation
Signed-off-by: Liyun Xiu <[email protected]>
❌ Empty Changelog SectionThe Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section. |
Signed-off-by: Liyun Xiu <[email protected]>
❌ Empty Changelog SectionThe Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8352 +/- ##
=======================================
Coverage 60.93% 60.93%
=======================================
Files 3767 3767
Lines 89387 89394 +7
Branches 13985 13989 +4
=======================================
+ Hits 54471 54476 +5
Misses 31519 31519
- Partials 3397 3399 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/plugins/query_enhancements/public/query_assist/components/query_assist_summary.tsx
Outdated
Show resolved
Hide resolved
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.
i like this feature. it's cool to see. some questions and suggestions
src/plugins/query_enhancements/public/query_assist/components/query_assist_summary.tsx
Show resolved
Hide resolved
src/plugins/query_enhancements/public/query_assist/components/query_assist_summary.tsx
Outdated
Show resolved
Hide resolved
export const QueryAssistSummary: React.FC<QueryAssistSummaryProps> = (props) => { | ||
const { query, search } = props.data; | ||
const [summary, setSummary] = useState(null); // store fetched data |
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.
do we know for sure the summary will never be ''
. null for me implies no summary was retrieved where as if the summary was an empty string the user might not be able to give feedback on the summary even though the information can be used to capture cases where query assist didn't output any 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.
In case LLM fails to generate summary, we would render an error message. But if LLM is able to generate summary, I believe there's always some outputs.
@@ -76,6 +82,9 @@ export const QueryAssistSummary: React.FC<QueryAssistSummaryProps> = (props) => | |||
defaultMessage: | |||
'Thank you for the feedback. Try again by adjusting your question so that I have the opportunity to better assist you.', | |||
}); | |||
const errorPrompt = i18n.translate('queryEnhancements.queryAssist.summary.errorPrompt', { |
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.
should we consider adding : Try again by adjusting your question so that I have the opportunity to better assist you.
Or do we have an error message that we can display to the user for more insight?
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.
Some errors are not caused by questions, it might be frustrating when there's backend issue but we keep asking users to change questions.
does this go to 2.18? 2.17 next? |
@chishui @ruanyl @joshuali925 @opensearch-project/opensearch-ux should we add a retry button? does query assist support retries with the context that the user didn't think the summary was good enough and will try again? or will it just give back the same summary |
We'll have a new UI which is to add such button to regenerate summary, will make change once receives new design. |
Signed-off-by: Liyun Xiu <[email protected]>
Lets add |
@kavilla @ruanyl @ashwin-pc if you guys have no other questions on this PR, could you help approve? |
@kavilla could you review this PR again? It's been a while, thanks |
onClick={() => onFeedback(true)} | ||
data-test-subj="queryAssist_summary_buttons_thumbup" |
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.
can we disable the button when feedback === FeedbackStatus.THUMB_UP
, so that we don't need to check if (feedback !== FeedbackStatus.NONE) return;
for onFeedback()
…8352) * Add discover summary error info and button click logic enhancement Signed-off-by: Liyun Xiu <[email protected]> * add changelog Signed-off-by: Liyun Xiu <[email protected]> * Address comments Signed-off-by: Liyun Xiu <[email protected]> --------- Signed-off-by: Liyun Xiu <[email protected]> (cherry picked from commit c4049eb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…8352) (#8568) * Add discover summary error info and button click logic enhancement * add changelog * Address comments --------- (cherry picked from commit c4049eb) Signed-off-by: Liyun Xiu <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…pensearch-project#8352) * Add discover summary error info and button click logic enhancement Signed-off-by: Liyun Xiu <[email protected]> * add changelog Signed-off-by: Liyun Xiu <[email protected]> * Address comments Signed-off-by: Liyun Xiu <[email protected]> --------- Signed-off-by: Liyun Xiu <[email protected]>
…pensearch-project#8352) * Add discover summary error info and button click logic enhancement Signed-off-by: Liyun Xiu <[email protected]> * add changelog Signed-off-by: Liyun Xiu <[email protected]> * Address comments Signed-off-by: Liyun Xiu <[email protected]> --------- Signed-off-by: Liyun Xiu <[email protected]>
Description
Improve some logic for discover query assist summary.
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration