-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Search Assistant] Use scopes to modify behavior contextually #195785
Conversation
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
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.
Just 2 minor comments. Approving to unblock from the Core POV.
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.
x-pack/test_serverless/tsconfig.json
changes LGTM
Is there a plan to separate out kibana privileges? Currently if a user doesn't have access to observability AI Assistant, they won't have access to the Search assistant. |
Yes, I've got a task to set up a separate feature for the Search assistant and have one grant access to the other (because they're the same thing, really). I'll do that in a separate PR. |
Couple other things:
|
Thanks for the reviews and thoughtful comments @neptunian!
The scope I'm adding isn't user-facing so I'm not very concerned about the confusion. We can always change the wording if we find ourselves getting confused.
Yes, the long-term plan is to have one settings page across all assistants. For now we'll adjust the observability settings to be "for observability and search" in a follow-up PR. I also have a follow-up task scheduled to set the scope based on some more complicated rules involving solution nav, where it was opened last, and where the user is now. I'll address that next week. Once that's in I'll also add a functional test to make sure the scope changes correctly.
Yes, that's not a concern because that separate page will be going away as well--we don't want to surface the search assistant on its own page, only in the flyout. |
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.
LGTM!
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11300452200 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…c#195785) ## Summary This actually uses the Search Assistant scope to modify the assistant's behavior depending on the context they're in. The assistant now: - Defaults to Observability mode - Is a Search assistant in the Search pages - Switches dynamically, changing available functions, prompts and instructions based on context --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit ee341d5)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11306209404 |
…c#195785) ## Summary This actually uses the Search Assistant scope to modify the assistant's behavior depending on the context they're in. The assistant now: - Defaults to Observability mode - Is a Search assistant in the Search pages - Switches dynamically, changing available functions, prompts and instructions based on context --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit ee341d5)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…195785) (#196014) # Backport This will backport the following commits from `main` to `8.x`: - [[Search Assistant] Use scopes to modify behavior contextually (#195785)](#195785) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sander Philipse","email":"94373878+sphilipse@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-11T23:09:06Z","message":"[Search Assistant] Use scopes to modify behavior contextually (#195785)\n\n## Summary\r\n\r\nThis actually uses the Search Assistant scope to modify the assistant's\r\nbehavior depending on the context they're in. The assistant now:\r\n- Defaults to Observability mode\r\n- Is a Search assistant in the Search pages\r\n- Switches dynamically, changing available functions, prompts and\r\ninstructions based on context\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ee341d5f801ca42ed26acf0544b0bc59948d0214","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","Team:Obs AI Assistant","ci:project-deploy-observability","v8.16.0","backport:version"],"title":"[Search Assistant] Use scopes to modify behavior contextually","number":195785,"url":"https://github.com/elastic/kibana/pull/195785","mergeCommit":{"message":"[Search Assistant] Use scopes to modify behavior contextually (#195785)\n\n## Summary\r\n\r\nThis actually uses the Search Assistant scope to modify the assistant's\r\nbehavior depending on the context they're in. The assistant now:\r\n- Defaults to Observability mode\r\n- Is a Search assistant in the Search pages\r\n- Switches dynamically, changing available functions, prompts and\r\ninstructions based on context\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ee341d5f801ca42ed26acf0544b0bc59948d0214"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195785","number":195785,"mergeCommit":{"message":"[Search Assistant] Use scopes to modify behavior contextually (#195785)\n\n## Summary\r\n\r\nThis actually uses the Search Assistant scope to modify the assistant's\r\nbehavior depending on the context they're in. The assistant now:\r\n- Defaults to Observability mode\r\n- Is a Search assistant in the Search pages\r\n- Switches dynamically, changing available functions, prompts and\r\ninstructions based on context\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ee341d5f801ca42ed26acf0544b0bc59948d0214"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/196013","number":196013,"state":"OPEN"}]}] BACKPORT--> Co-authored-by: Sander Philipse <94373878+sphilipse@users.noreply.github.com>
…195785) (#196013) # Backport This will backport the following commits from `main` to `8.x`: - [[Search Assistant] Use scopes to modify behavior contextually (#195785)](#195785) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sander Philipse","email":"94373878+sphilipse@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-11T23:09:06Z","message":"[Search Assistant] Use scopes to modify behavior contextually (#195785)\n\n## Summary\r\n\r\nThis actually uses the Search Assistant scope to modify the assistant's\r\nbehavior depending on the context they're in. The assistant now:\r\n- Defaults to Observability mode\r\n- Is a Search assistant in the Search pages\r\n- Switches dynamically, changing available functions, prompts and\r\ninstructions based on context\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ee341d5f801ca42ed26acf0544b0bc59948d0214","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","Team:Obs AI Assistant","ci:project-deploy-observability","v8.16.0","backport:version"],"number":195785,"url":"https://github.com/elastic/kibana/pull/195785","mergeCommit":{"message":"[Search Assistant] Use scopes to modify behavior contextually (#195785)\n\n## Summary\r\n\r\nThis actually uses the Search Assistant scope to modify the assistant's\r\nbehavior depending on the context they're in. The assistant now:\r\n- Defaults to Observability mode\r\n- Is a Search assistant in the Search pages\r\n- Switches dynamically, changing available functions, prompts and\r\ninstructions based on context\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ee341d5f801ca42ed26acf0544b0bc59948d0214"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195785","number":195785,"mergeCommit":{"message":"[Search Assistant] Use scopes to modify behavior contextually (#195785)\n\n## Summary\r\n\r\nThis actually uses the Search Assistant scope to modify the assistant's\r\nbehavior depending on the context they're in. The assistant now:\r\n- Defaults to Observability mode\r\n- Is a Search assistant in the Search pages\r\n- Switches dynamically, changing available functions, prompts and\r\ninstructions based on context\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ee341d5f801ca42ed26acf0544b0bc59948d0214"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Summary
This actually uses the Search Assistant scope to modify the assistant's behavior depending on the context they're in. The assistant now: