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] Use semantic_text for internal knowledge base #186499

Merged
merged 34 commits into from
Nov 14, 2024

Conversation

sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented Jun 20, 2024

@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

…xt-internal-kb

# Conflicts:
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts
…xt-internal-kb

# Conflicts:
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts
@sorenlouv sorenlouv force-pushed the use-semantic-text-internal-kb branch from 9b9d65a to 6987fa5 Compare August 6, 2024 08:47
@sorenlouv sorenlouv marked this pull request as ready for review August 6, 2024 12:13
@sorenlouv sorenlouv requested a review from a team as a code owner August 6, 2024 12:13
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant labels Aug 7, 2024
@kibana-ci
Copy link
Collaborator

kibana-ci commented Aug 7, 2024

💔 Build Failed

Failed CI Steps

History

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

@sorenlouv sorenlouv marked this pull request as draft August 7, 2024 11:01
…xt-internal-kb

# Conflicts:
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts
…xt-internal-kb

# Conflicts:
#	x-pack/packages/kbn-ai-assistant/src/chat/welcome_message_knowledge_base_setup_error_panel.tsx
#	x-pack/packages/kbn-ai-assistant/src/hooks/use_knowledge_base.tsx
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/plugin.ts
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts
@sorenlouv sorenlouv force-pushed the use-semantic-text-internal-kb branch from db31e60 to 035f911 Compare November 7, 2024 18:58
@sorenlouv sorenlouv marked this pull request as ready for review November 7, 2024 22:20
@sorenlouv sorenlouv deleted the use-semantic-text-internal-kb branch November 14, 2024 12:32
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 186499

Questions ?

Please refer to the Backport tool documentation

@sorenlouv
Copy link
Member Author

💚 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

sorenlouv added a commit to sorenlouv/kibana that referenced this pull request Nov 14, 2024
…ic#186499)

Closes elastic/obs-ai-assistant-team#162
Closes elastic#192757

This replaces the ML inference pipeline with `semantic_text` and adds a
migration task that runs automatically when Kibana starts.

Blocked by:
 - elastic/elasticsearch#110027
 - elastic/elasticsearch#110033
 - elastic/ml-team#1298

(cherry picked from commit 671ff30)

# Conflicts:
#	x-pack/plugins/translations/translations/zh-CN.json
sorenlouv added a commit that referenced this pull request Nov 14, 2024
…186499) (#200243)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[AI Assistant] Use `semantic_text` for internal knowledge base
(#186499)](#186499)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-14T12:30:13Z","message":"[AI
Assistant] Use `semantic_text` for internal knowledge base
(#186499)\n\nCloses
elastic/obs-ai-assistant-team#162 \r\nCloses
https://github.com/elastic/kibana/issues/192757\r\n\r\nThis replaces the
ML inference pipeline with `semantic_text` and adds a\r\nmigration task
that runs automatically when Kibana starts.\r\n\r\nBlocked by:\r\n -
https://github.com/elastic/elasticsearch/pull/110027\r\n -
https://github.com/elastic/elasticsearch/pull/110033\r\n -
https://github.com/elastic/ml-team/issues/1298","sha":"671ff30516f2ca302962efffae7585dcd7ddfce9","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","backport:prev-minor","Team:Obs
AI Assistant","ci:project-deploy-observability","8.16
candidate"],"number":186499,"url":"https://github.com/elastic/kibana/pull/186499","mergeCommit":{"message":"[AI
Assistant] Use `semantic_text` for internal knowledge base
(#186499)\n\nCloses
elastic/obs-ai-assistant-team#162 \r\nCloses
https://github.com/elastic/kibana/issues/192757\r\n\r\nThis replaces the
ML inference pipeline with `semantic_text` and adds a\r\nmigration task
that runs automatically when Kibana starts.\r\n\r\nBlocked by:\r\n -
https://github.com/elastic/elasticsearch/pull/110027\r\n -
https://github.com/elastic/elasticsearch/pull/110033\r\n -
https://github.com/elastic/ml-team/issues/1298","sha":"671ff30516f2ca302962efffae7585dcd7ddfce9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186499","number":186499,"mergeCommit":{"message":"[AI
Assistant] Use `semantic_text` for internal knowledge base
(#186499)\n\nCloses
elastic/obs-ai-assistant-team#162 \r\nCloses
https://github.com/elastic/kibana/issues/192757\r\n\r\nThis replaces the
ML inference pipeline with `semantic_text` and adds a\r\nmigration task
that runs automatically when Kibana starts.\r\n\r\nBlocked by:\r\n -
https://github.com/elastic/elasticsearch/pull/110027\r\n -
https://github.com/elastic/elasticsearch/pull/110033\r\n -
https://github.com/elastic/ml-team/issues/1298","sha":"671ff30516f2ca302962efffae7585dcd7ddfce9"}}]}]
BACKPORT-->
sorenlouv added a commit that referenced this pull request Nov 15, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 15, 2024
sorenlouv added a commit that referenced this pull request Nov 15, 2024
Follow up to #186499

This removes `modelId` from the config file. We don't need it anymore
since it can be supplied as a url param. Currently it's only needed in
the setup route (`POST /internal/observability_ai_assistant/kb/setup`)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 15, 2024
Follow up to elastic#186499

This removes `modelId` from the config file. We don't need it anymore
since it can be supplied as a url param. Currently it's only needed in
the setup route (`POST /internal/observability_ai_assistant/kb/setup`)

(cherry picked from commit 875313e)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…ic#186499)

Closes elastic/obs-ai-assistant-team#162 
Closes elastic#192757

This replaces the ML inference pipeline with `semantic_text` and adds a
migration task that runs automatically when Kibana starts.

Blocked by:
 - elastic/elasticsearch#110027
 - elastic/elasticsearch#110033
 - elastic/ml-team#1298
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
Follow up to elastic#186499

This removes `modelId` from the config file. We don't need it anymore
since it can be supplied as a url param. Currently it's only needed in
the setup route (`POST /internal/observability_ai_assistant/kb/setup`)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…ic#186499)

Closes elastic/obs-ai-assistant-team#162 
Closes elastic#192757

This replaces the ML inference pipeline with `semantic_text` and adds a
migration task that runs automatically when Kibana starts.

Blocked by:
 - elastic/elasticsearch#110027
 - elastic/elasticsearch#110033
 - elastic/ml-team#1298
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
Follow up to elastic#186499

This removes `modelId` from the config file. We don't need it anymore
since it can be supplied as a url param. Currently it's only needed in
the setup route (`POST /internal/observability_ai_assistant/kb/setup`)
sorenlouv added a commit that referenced this pull request Dec 3, 2024
Currently the knowledge base creates index assets (index templates, index components) lazily when the user interacts with the assistant. This prevents running the semantic text migrations (added in #186499) when Kibana starts because the mappings have not yet been updated.

Additionally, this PR also increases `min_number_of_allocations` to 1 to
ensure at least one ML node is available at all times.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 3, 2024
Currently the knowledge base creates index assets (index templates, index components) lazily when the user interacts with the assistant. This prevents running the semantic text migrations (added in elastic#186499) when Kibana starts because the mappings have not yet been updated.

Additionally, this PR also increases `min_number_of_allocations` to 1 to
ensure at least one ML node is available at all times.

(cherry picked from commit b217f1a)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 3, 2024
Currently the knowledge base creates index assets (index templates, index components) lazily when the user interacts with the assistant. This prevents running the semantic text migrations (added in elastic#186499) when Kibana starts because the mappings have not yet been updated.

Additionally, this PR also increases `min_number_of_allocations` to 1 to
ensure at least one ML node is available at all times.

(cherry picked from commit b217f1a)
kibanamachine added a commit that referenced this pull request Dec 3, 2024
…#202727)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Obs AI Assistant] Perform index creation at startup
(#201362)](#201362)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-03T13:48:19Z","message":"[Obs
AI Assistant] Perform index creation at startup (#201362)\n\nCurrently
the knowledge base creates index assets (index templates, index
components) lazily when the user interacts with the assistant. This
prevents running the semantic text migrations (added in
#186499) when Kibana starts
because the mappings have not yet been updated.\r\n\r\nAdditionally,
this PR also increases `min_number_of_allocations` to 1 to\r\nensure at
least one ML node is available at all
times.","sha":"b217f1acbdce4d9c0288c87e9afa470038cf6557","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:Obs
AI Assistant","ci:project-deploy-observability","v8.17.0"],"title":"[Obs
AI Assistant] Perform index creation at
startup","number":201362,"url":"https://github.com/elastic/kibana/pull/201362","mergeCommit":{"message":"[Obs
AI Assistant] Perform index creation at startup (#201362)\n\nCurrently
the knowledge base creates index assets (index templates, index
components) lazily when the user interacts with the assistant. This
prevents running the semantic text migrations (added in
#186499) when Kibana starts
because the mappings have not yet been updated.\r\n\r\nAdditionally,
this PR also increases `min_number_of_allocations` to 1 to\r\nensure at
least one ML node is available at all
times.","sha":"b217f1acbdce4d9c0288c87e9afa470038cf6557"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201362","number":201362,"mergeCommit":{"message":"[Obs
AI Assistant] Perform index creation at startup (#201362)\n\nCurrently
the knowledge base creates index assets (index templates, index
components) lazily when the user interacts with the assistant. This
prevents running the semantic text migrations (added in
#186499) when Kibana starts
because the mappings have not yet been updated.\r\n\r\nAdditionally,
this PR also increases `min_number_of_allocations` to 1 to\r\nensure at
least one ML node is available at all
times.","sha":"b217f1acbdce4d9c0288c87e9afa470038cf6557"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Søren Louv-Jansen <[email protected]>
kibanamachine added a commit that referenced this pull request Dec 3, 2024
…202728)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Obs AI Assistant] Perform index creation at startup
(#201362)](#201362)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-03T13:48:19Z","message":"[Obs
AI Assistant] Perform index creation at startup (#201362)\n\nCurrently
the knowledge base creates index assets (index templates, index
components) lazily when the user interacts with the assistant. This
prevents running the semantic text migrations (added in
#186499) when Kibana starts
because the mappings have not yet been updated.\r\n\r\nAdditionally,
this PR also increases `min_number_of_allocations` to 1 to\r\nensure at
least one ML node is available at all
times.","sha":"b217f1acbdce4d9c0288c87e9afa470038cf6557","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:Obs
AI Assistant","ci:project-deploy-observability","v8.17.0"],"title":"[Obs
AI Assistant] Perform index creation at
startup","number":201362,"url":"https://github.com/elastic/kibana/pull/201362","mergeCommit":{"message":"[Obs
AI Assistant] Perform index creation at startup (#201362)\n\nCurrently
the knowledge base creates index assets (index templates, index
components) lazily when the user interacts with the assistant. This
prevents running the semantic text migrations (added in
#186499) when Kibana starts
because the mappings have not yet been updated.\r\n\r\nAdditionally,
this PR also increases `min_number_of_allocations` to 1 to\r\nensure at
least one ML node is available at all
times.","sha":"b217f1acbdce4d9c0288c87e9afa470038cf6557"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201362","number":201362,"mergeCommit":{"message":"[Obs
AI Assistant] Perform index creation at startup (#201362)\n\nCurrently
the knowledge base creates index assets (index templates, index
components) lazily when the user interacts with the assistant. This
prevents running the semantic text migrations (added in
#186499) when Kibana starts
because the mappings have not yet been updated.\r\n\r\nAdditionally,
this PR also increases `min_number_of_allocations` to 1 to\r\nensure at
least one ML node is available at all
times.","sha":"b217f1acbdce4d9c0288c87e9afa470038cf6557"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Søren Louv-Jansen <[email protected]>
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Dec 5, 2024
Currently the knowledge base creates index assets (index templates, index components) lazily when the user interacts with the assistant. This prevents running the semantic text migrations (added in elastic#186499) when Kibana starts because the mappings have not yet been updated.

Additionally, this PR also increases `min_number_of_allocations` to 1 to
ensure at least one ML node is available at all times.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
Currently the knowledge base creates index assets (index templates, index components) lazily when the user interacts with the assistant. This prevents running the semantic text migrations (added in elastic#186499) when Kibana starts because the mappings have not yet been updated.

Additionally, this PR also increases `min_number_of_allocations` to 1 to
ensure at least one ML node is available at all times.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
Currently the knowledge base creates index assets (index templates, index components) lazily when the user interacts with the assistant. This prevents running the semantic text migrations (added in elastic#186499) when Kibana starts because the mappings have not yet been updated.

Additionally, this PR also increases `min_number_of_allocations` to 1 to
ensure at least one ML node is available at all times.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.16 candidate backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:enhancement Team:Obs AI Assistant Observability AI Assistant v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Obs AI Assistant] Update knowledge base setup route to accept a model id
8 participants