opensearch-project / dashboards-assistant

Dashboard assistant is a way for users on OpenSearch Dashboards to interact with an assistant through chat or the different OSD pages
https://opensearch.org/
Apache License 2.0
17 stars 22 forks source link

Support insight with RAG #266

Closed qianheng-aws closed 1 week ago

qianheng-aws commented 2 weeks ago

Description

The alert analysis assistant has supported summary generation now. This PR provides insight with RAG if related insight has been configured. There could be 2 types of knowledge base:

  1. OpenSearch’ technical knowledge base for cluster alerts, which is setup by default
  2. Customized knowledge base for customer’s own alerts, which is configured by customers and setup by CloudFormation workflow.

Apart from supporting insight, this feature also refines the UX. Screen Snapshot:

  1. Alerting page with assistant icon image
  2. Show loading content if clicked the assistant icon image
  3. Show summary and insight tip icon if detecting related insight agent image
  4. Click insight tip icon to jump to view insight, the title has back button to go back to summary image
  5. We won't show insight tip icon if not having detected related insight agent image

Issues Resolved

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.64%. Comparing base (4f33fa0) to head (3ba3482). Report is 10 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #266 +/- ## ========================================== - Coverage 90.34% 88.64% -1.71% ========================================== Files 59 60 +1 Lines 1575 1700 +125 Branches 377 419 +42 ========================================== + Hits 1423 1507 +84 - Misses 150 191 +41 Partials 2 2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

opensearch-trigger-bot[bot] commented 1 week ago

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-assistant/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-assistant/backport-2.x
# Create a new branch
git switch --create backport/backport-266-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4e68047cd0700c33c016cf5bf0ad43f66f2ed7ba
# Push it to GitHub
git push --set-upstream origin backport/backport-266-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-assistant/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-266-to-2.x.

songkant-aws commented 1 week ago

Looks like we need to backport this PR to 2.x. Since #267 resolved some conflicts based on this PR, could you @qianheng-aws fix the backport to unblock #267 backport?