Skip to content
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

[AI Assistant] Add scopes to AI assistant #192611

Merged
merged 12 commits into from
Sep 18, 2024

Conversation

sphilipse
Copy link
Member

@sphilipse sphilipse commented Sep 11, 2024

Summary

This adds scopes to the Observability AI Assistant framework so we can start consuming it in different places with different instructions and functions available.

Instructions and functions become responsible for registering which 'scope' they apply to, and the assistant should be called with a scope when chatting so that it can decide which functions are available and which registered instructions to send to the LLM.

@sphilipse sphilipse added release_note:skip Skip the PR/issue when compiling release notes Team:Search v8.16.0 labels Sep 11, 2024
@sphilipse sphilipse marked this pull request as ready for review September 17, 2024 15:57
@sphilipse sphilipse requested review from a team as code owners September 17, 2024 15:57
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team labels Sep 17, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logs-shared changes LGTM

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ML related changes LGTM.

@sphilipse sphilipse enabled auto-merge (squash) September 18, 2024 12:20
@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 18, 2024

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
observabilityAIAssistant 284 291 +7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.5MB 3.5MB -24.0B
infra 1.6MB 1.6MB -6.0B
observabilityAIAssistant 17.6KB 17.7KB +100.0B
observabilityAIAssistantApp 154.3KB 154.4KB +20.0B
profiling 405.9KB 405.9KB -1.0B
total +89.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
observabilityAIAssistant 27 28 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observabilityAIAssistant 46.0KB 46.1KB +86.0B
Unknown metric groups

API count

id before after diff
observabilityAIAssistant 286 293 +7

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sphilipse sphilipse merged commit a65e904 into elastic:main Sep 18, 2024
27 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 18, 2024
## Summary

This adds scopes to the Observability AI Assistant framework so we can
start consuming it in different places with different instructions and
functions available.

Instructions and functions become responsible for registering which
'scope' they apply to, and the assistant should be called with a scope
when chatting so that it can decide which functions are available and
which registered instructions to send to the LLM.

(cherry picked from commit a65e904)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 18, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[AI Assistant] Add scopes to AI assistant
(#192611)](#192611)

<!--- 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-09-18T13:49:09Z","message":"[AI
Assistant] Add scopes to AI assistant (#192611)\n\n##
Summary\r\n\r\nThis adds scopes to the Observability AI Assistant
framework so we can\r\nstart consuming it in different places with
different instructions and\r\nfunctions available.\r\n\r\nInstructions
and functions become responsible for registering which\r\n'scope' they
apply to, and the assistant should be called with a scope\r\nwhen
chatting so that it can decide which functions are available
and\r\nwhich registered instructions to send to the
LLM.","sha":"a65e904ab4bfa5baad98d2c094c7dc08ad0917b6","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","Team:obs-ux-infra_services","Team:obs-ux-management","apm:review","v8.16.0"],"title":"[AI
Assistant] Add scopes to AI
assistant","number":192611,"url":"https://github.com/elastic/kibana/pull/192611","mergeCommit":{"message":"[AI
Assistant] Add scopes to AI assistant (#192611)\n\n##
Summary\r\n\r\nThis adds scopes to the Observability AI Assistant
framework so we can\r\nstart consuming it in different places with
different instructions and\r\nfunctions available.\r\n\r\nInstructions
and functions become responsible for registering which\r\n'scope' they
apply to, and the assistant should be called with a scope\r\nwhen
chatting so that it can decide which functions are available
and\r\nwhich registered instructions to send to the
LLM.","sha":"a65e904ab4bfa5baad98d2c094c7dc08ad0917b6"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192611","number":192611,"mergeCommit":{"message":"[AI
Assistant] Add scopes to AI assistant (#192611)\n\n##
Summary\r\n\r\nThis adds scopes to the Observability AI Assistant
framework so we can\r\nstart consuming it in different places with
different instructions and\r\nfunctions available.\r\n\r\nInstructions
and functions become responsible for registering which\r\n'scope' they
apply to, and the assistant should be called with a scope\r\nwhen
chatting so that it can decide which functions are available
and\r\nwhich registered instructions to send to the
LLM.","sha":"a65e904ab4bfa5baad98d2c094c7dc08ad0917b6"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sander Philipse <94373878+sphilipse@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:review ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team Team:Search v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants