Skip to content

Comments

[AI Infra] Fix Observability AI assistant product docs missing multilingual support#224274

Merged
darnautov merged 50 commits intoelastic:mainfrom
qn895:add-new-inference-id-arg
Jul 3, 2025
Merged

[AI Infra] Fix Observability AI assistant product docs missing multilingual support#224274
darnautov merged 50 commits intoelastic:mainfrom
qn895:add-new-inference-id-arg

Conversation

@qn895
Copy link
Member

@qn895 qn895 commented Jun 17, 2025

Summary

This PR fixes #222176, and rewired the productDoc installation process to accept an inferenceId argument to the productDocBase installation API. It:

  • Allows for concurrent installation of the product docs with two different models: The default ELSER and the multilingual E5. Kibana will only install the one the user needs, but has capacity for other models if user needs both of them (i.e. ELSER for Security AI Assistant and multilingual E5 for Observability AI Assistant).

  • Modifies the script that generates the artifacts to also allows inferenceId to be passed in.

node scripts/build_product_doc_artifacts.js --product-name=security --stack-version=8.18  --inference-id=.multilingual-e5-small-elasticsearch
  • In parallel with this PR, deploys the public multilingual product doc artifacts for 8.18

  • It modifies the installation logic to append the inferenceId's to the target index name's (to distinguish it from the ELSER default) and define the mapping of the target index to use the E5's model_settings

  • Surfaces up error if there's an error with the installation

    For example, if there's no corresponding artifact available, or if the artifact fails to fetch. Before:

    image

    After, it will prompt the user:

    image

Note for Reviewers:

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@qn895 qn895 self-assigned this Jun 17, 2025
@qn895 qn895 added the :ml label Jun 20, 2025
@qn895 qn895 force-pushed the add-new-inference-id-arg branch from 7849fef to 079bdd5 Compare June 22, 2025 19:01
@qn895 qn895 changed the title [AI Infra] Add option to generate product docs with any Inference ID [AI Infra] Add option to generate product docs with multilingual model E5 Jun 22, 2025
…back to default ELSER. Surface up error if artifact not available with the inference.
@qn895 qn895 force-pushed the add-new-inference-id-arg branch from 079bdd5 to 132c0e6 Compare June 22, 2025 20:18
@qn895
Copy link
Member Author

qn895 commented Jun 22, 2025

/ci

[REACT_QUERY_KEYS.INSTALL_PRODUCT_DOC],
() => {
return productDocBase!.installation.install();
(inferenceId?: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

Imo this should be required. Any scenarios where we don't want to pass inferenceId?

Suggested change
(inferenceId?: string) => {
(inferenceId: string) => {

Copy link
Member Author

@qn895 qn895 Jun 24, 2025

Choose a reason for hiding this comment

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

Here it's because we will always fallback to ELSER by default, but we can make it a strict enforcement to pass in the inferenceId.

id: ENSURE_DOC_UP_TO_DATE_TASK_ID,
taskType: ENSURE_DOC_UP_TO_DATE_TASK_TYPE,
params: {},
params: { inferenceId },
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK ensureScheduled tasks are uniquely scheduled by ID. Meaning that if you have different sources installing for different inferenceId at the same time, only one will be scheduled. Given security solution and the o11y assistant may call it at the same time at startup, this may be an issue

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

So, I really don't think that allowing API consumers to directly control which inferenceId to use when installing the product doc is a good idea. This may lead to the product doc being installed multiple times for different models (e.g security solution and o11y assistant using different models on a deployment - which will occurs in the PR current state given given security solution will still use the default elser), and add a lot of complexity in the installation /management logic.

Why not instead having a single Kibana configuration property? That way, customers (or us during testing) can still control which model to use, but we're making sure there is only one single installation of the product doc (e.g security solution and o11y can't select different models). This seems to answer the initial need, while keeping everything more simple and resilient, WDYT?

@sorenlouv
Copy link
Member

https://github.com/elastic/obs-ai-assistant-team/issues/300 is a follow-up issues that depends on the work in this PR.

@sorenlouv
Copy link
Member

So, I really don't think that allowing API consumers to directly control which inferenceId to use when installing the product doc is a good idea. This may lead to the product doc being installed multiple times for different models (e.g security solution and o11y assistant using different models on a deployment - which will occurs in the PR current state given given security solution will still use the default elser), and add a lot of complexity in the installation /management logic.

Why not instead having a single Kibana configuration property? That way, customers (or us during testing) can still control which model to use, but we're making sure there is only one single installation of the product doc (e.g security solution and o11y can't select different models). This seems to answer the initial need, while keeping everything more simple and resilient, WDYT?

When the inferenceId for the knowledge base changes, we need to update the inferenceId for the product docs. How can we do that if the installProductDocs method doesn't accept inferenceId?

if (!response.installed) {
throw new Error('Installation did not complete successfully');
throw new Error(
`Installation did not complete successfully.\n${response.failureReason ?? ''}`
Copy link
Member

Choose a reason for hiding this comment

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

I think customers will find this error quite confusing:

image

This is particularly cryptic:

End of central directory record signature not found. either not a zip file or file is truncated

What action are users expected to take from seeing this? And under what circumstances does it happen?

Copy link
Member Author

@qn895 qn895 Jun 27, 2025

Choose a reason for hiding this comment

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

Yeah this is coming from cloud bucket where the artifact is missing. I can remove that message entirely.


export function ChangeKbModel({ knowledgeBase }: { knowledgeBase: UseKnowledgeBaseResult }) {
const { overlays } = useKibana().services;
const { selectedInferenceId, setSelectedInferenceId } = useInferenceId();
Copy link
Member

Choose a reason for hiding this comment

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

Do we need useInferenceId? Can't we get the current inference id from knowledgeBase: knowledgeBase.status.value.currentInferenceId ?


export function ProductDocEntry() {
const { overlays } = useKibana().services;
const { selectedInferenceId } = useInferenceId();
Copy link
Member

Choose a reason for hiding this comment

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

Can you use

Suggested change
const { selectedInferenceId } = useInferenceId();
const knowledgeBase = useKnowledgeBase();

and then knowledgeBase.status.value.currentInferenceId?

Copy link
Member Author

Choose a reason for hiding this comment

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

Initially this is what I did, but the UX was confusing. So when you switch to a different model, I wanted to show the product base for that inference is not installed yet. If we still use currently deployed the info is outdated. But happy to switch it back to your suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

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

@sorenlouv Here's the difference for the install doc status. This is with the current approach with the useInferenceId

Screen.Recording.2025-06-27.at.12.59.50.mov

And this is with the knowledgeBase.status.value.currentInferenceId

Screen.Recording.2025-06-27.at.12.59.09.mov

Copy link
Member

Choose a reason for hiding this comment

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

I suggest going with const knowledgeBase = useKnowledgeBase();. It's the simpler option and I don't believe the UX is worse.

@sorenlouv
Copy link
Member

❌ Manual testing failed

I tried running the command in the PR description:

node scripts/build_product_doc_artifacts.js --product-name=observability --stack-version=9.1.0  --inference-id=.multilingual-e5-small-elasticsearch

which returns

Missing required arguments: sourceClusterUrl, sourceClusterUsername, sourceClusterPassword, embeddingClusterUrl, embeddingClusterUsername, embeddingClusterPassword

Afterwards I tried installing the product docs via the UI. It just shows a spinner "Installing..." indefinitely. In the terminal I see these errors:

[2025-06-27T11:05:17.107+02:00][INFO ][plugins.productDocBase.doc-manager] Task ProductDocBase:InstallAllMultilingual scheduled to run soon
[2025-06-27T11:05:20.060+02:00][INFO ][plugins.productDocBase.package-installer] Starting installing documentation for product [kibana] and version [8.18] with inference ID [.multilingual-e5-small-elasticsearch]
[2025-06-27T11:05:20.632+02:00][ERROR][plugins.productDocBase.package-installer] Error during documentation installation of product [kibana]/[8.18] : No artifact available for product [kibana]/[8.18] for Inference ID [.multilingual-e5-small-elasticsearch]. End of central directory record signature not found. Either not a zip file, or file is truncated.
[2025-06-27T11:05:21.456+02:00][ERROR][plugins.taskManager] Task ProductDocBase:InstallAll "ProductDocBase:InstallAllMultilingual" failed: Error: End of central directory record signature not found. Either not a zip file, or file is truncated.

[2025-06-27T11:05:53.040+02:00][INFO ][plugins.productDocBase.package-installer] Starting installing documentation for product [kibana] and version [8.18] with inference ID [.multilingual-e5-small-elasticsearch]
[2025-06-27T11:05:54.842+02:00][ERROR][plugins.productDocBase.package-installer] Error during documentation installation of product [kibana]/[8.18] : No artifact available for product [kibana]/[8.18] for Inference ID [.multilingual-e5-small-elasticsearch]. End of central directory record signature not found. Either not a zip file, or file is truncated.
[2025-06-27T11:05:55.655+02:00][ERROR][plugins.taskManager] Task ProductDocBase:InstallAll "ProductDocBase:InstallAllMultilingual" failed: Error: End of central directory record signature not found. Either not a zip file, or file is truncated.

I assume the error is because I was unable to run the node script. Is that something I need to do because I am a dev and this is in development, or do we expect customers to run this command as well?

@sorenlouv
Copy link
Member

I was able to test this after adding the following to kibana.yml:

xpack.productDocBase.artifactRepositoryUrl: https://storage.googleapis.com/kibana-ai-assistant-kb-artifacts-dev

@qn895 qn895 added the bug Fixes for quality problems that affect the customer experience label Jun 27, 2025
@darnautov darnautov requested a review from stephmilovic July 2, 2025 15:06
@darnautov
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix

@darnautov darnautov added v8.19.0 and removed ci:project-deploy-observability Create an Observability project labels Jul 2, 2025
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Jul 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2025

🤖 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!)

@darnautov darnautov merged commit 4ff731d into elastic:main Jul 3, 2025
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16047278927

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16047284396

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
automaticImport 763 796 +33
elasticAssistant 418 451 +33
productDocBase 7 40 +33
securitySolution 7787 7820 +33
total +132

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
@kbn/product-doc-common 32 34 +2
observabilityAIAssistant 434 438 +4
total +6

Async chunks

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

id before after diff
observabilityAiAssistantManagement 97.4KB 97.6KB +193.0B
securitySolution 9.8MB 9.8MB +69.0B
total +262.0B

Page load bundle

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

id before after diff
productDocBase 2.3KB 2.7KB +387.0B

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
product-doc-install-status 6 7 +1
Unknown metric groups

API count

id before after diff
@kbn/product-doc-common 32 34 +2
llmTasks 24 25 +1
observabilityAIAssistant 440 444 +4
productDocBase 23 24 +1
total +8

History

cc @qn895

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 224274

Questions ?

Please refer to the Backport tool documentation

1 similar comment
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 224274

Questions ?

Please refer to the Backport tool documentation

darnautov pushed a commit to darnautov/kibana that referenced this pull request Jul 3, 2025
…ingual support (elastic#224274)

## Summary

This PR fixes elastic#222176, and
rewired the productDoc installation process to accept an `inferenceId`
argument to the productDocBase installation API. It:

- Allows for concurrent installation of the product docs with two
different models: The default ELSER and the multilingual E5. Kibana will
only install the one the user needs, but has capacity for other models
if user needs both of them (i.e. ELSER for Security AI Assistant and
multilingual E5 for Observability AI Assistant).

- Modifies the script that generates the artifacts to also allows
inferenceId to be passed in.

```
node scripts/build_product_doc_artifacts.js --product-name=security --stack-version=8.18  --inference-id=.multilingual-e5-small-elasticsearch
```

- In parallel with this PR, deploys the public multilingual product doc
artifacts for 8.18
- It modifies the installation logic to append the inferenceId's to the
target index name's (to distinguish it from the ELSER default) and
define the mapping of the target index to use the E5's model_settings
- Surfaces up error if there's an error with the installation

For example, if there's no corresponding artifact available, or if the
artifact fails to fetch. Before:

![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)

	After, it will prompt the user:

![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)

## Note for Reviewers:

- **kibana-core**: Saved object 'product-doc-install-status' was updated
to add a new field `inference_id`

- **Security Gen AI**: With the newly required inferenceId parameter to
the installation endpoints, by default it will use ELSER
'.elser-2-elasticsearch'

- **Observability AI Assistant**: There are 2 at least todos remaining:
1) Make to sure pass the inferenceId to the retrieveDocumentation so
that it reroutes to the right index
https://github.com/elastic/kibana/pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74
2) Handle the change in inference model selection for Product Doc. Here
this is triggering an update to the product doc installation when user
clicks Update model:
https://github.com/elastic/kibana/pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151

- ### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 4ff731d)

# Conflicts:
#	x-pack/solutions/observability/plugins/observability_ai_assistant_app/server/functions/documentation.ts
@darnautov
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.1
8.19

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

Questions ?

Please refer to the Backport tool documentation

darnautov pushed a commit to darnautov/kibana that referenced this pull request Jul 3, 2025
…ingual support (elastic#224274)

## Summary

This PR fixes elastic#222176, and
rewired the productDoc installation process to accept an `inferenceId`
argument to the productDocBase installation API. It:

- Allows for concurrent installation of the product docs with two
different models: The default ELSER and the multilingual E5. Kibana will
only install the one the user needs, but has capacity for other models
if user needs both of them (i.e. ELSER for Security AI Assistant and
multilingual E5 for Observability AI Assistant).

- Modifies the script that generates the artifacts to also allows
inferenceId to be passed in.

```
node scripts/build_product_doc_artifacts.js --product-name=security --stack-version=8.18  --inference-id=.multilingual-e5-small-elasticsearch
```

- In parallel with this PR, deploys the public multilingual product doc
artifacts for 8.18
- It modifies the installation logic to append the inferenceId's to the
target index name's (to distinguish it from the ELSER default) and
define the mapping of the target index to use the E5's model_settings
- Surfaces up error if there's an error with the installation

For example, if there's no corresponding artifact available, or if the
artifact fails to fetch. Before:

![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)

	After, it will prompt the user:

![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)

## Note for Reviewers:

- **kibana-core**: Saved object 'product-doc-install-status' was updated
to add a new field `inference_id`

- **Security Gen AI**: With the newly required inferenceId parameter to
the installation endpoints, by default it will use ELSER
'.elser-2-elasticsearch'

- **Observability AI Assistant**: There are 2 at least todos remaining:
1) Make to sure pass the inferenceId to the retrieveDocumentation so
that it reroutes to the right index
https://github.com/elastic/kibana/pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74
2) Handle the change in inference model selection for Product Doc. Here
this is triggering an update to the product doc installation when user
clicks Update model:
https://github.com/elastic/kibana/pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151

- ### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 4ff731d)

# Conflicts:
#	src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts
#	x-pack/packages/ai-infra/product-doc-artifact-builder/src/build_artifacts.ts
#	x-pack/solutions/observability/plugins/observability_ai_assistant_app/scripts/evaluation/scenarios/documentation/index.spec.ts
#	x-pack/solutions/observability/plugins/observability_ai_assistant_app/server/functions/documentation.ts
darnautov added a commit that referenced this pull request Jul 3, 2025
…multilingual support (#224274) (#226368)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[AI Infra] Fix Observability AI assistant product docs missing
multilingual support
(#224274)](#224274)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Quynh Nguyen
(Quinn)","email":"43350163+qn895@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-03T09:53:13Z","message":"[AI
Infra] Fix Observability AI assistant product docs missing multilingual
support (#224274)\n\n## Summary\n\nThis PR fixes
#222176, and\nrewired the
productDoc installation process to accept an `inferenceId`\nargument to
the productDocBase installation API. It:\n\n- Allows for concurrent
installation of the product docs with two\ndifferent models: The default
ELSER and the multilingual E5. Kibana will\nonly install the one the
user needs, but has capacity for other models\nif user needs both of
them (i.e. ELSER for Security AI Assistant and\nmultilingual E5 for
Observability AI Assistant).\n \n- Modifies the script that generates
the artifacts to also allows\ninferenceId to be passed in.\n\n```\nnode
scripts/build_product_doc_artifacts.js --product-name=security
--stack-version=8.18
--inference-id=.multilingual-e5-small-elasticsearch\n```\n\n- In
parallel with this PR, deploys the public multilingual product
doc\nartifacts for 8.18\n- It modifies the installation logic to append
the inferenceId's to the\ntarget index name's (to distinguish it from
the ELSER default) and\ndefine the mapping of the target index to use
the E5's model_settings\n- Surfaces up error if there's an error with
the installation \n\n\t\nFor example, if there's no corresponding
artifact available, or if the\nartifact fails to fetch.
Before:\n\n\n![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)\n\n\n\t\n\tAfter,
it will prompt the user:
\n\n\n![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)\n\n\n##
Note for Reviewers:\n\n- **kibana-core**: Saved object
'product-doc-install-status' was updated\nto add a new field
`inference_id`\n\n- **Security Gen AI**: With the newly required
inferenceId parameter to\nthe installation endpoints, by default it will
use ELSER\n'.elser-2-elasticsearch'\n\n- **Observability AI Assistant**:
There are 2 at least todos remaining:\n1) Make to sure pass the
inferenceId to the retrieveDocumentation so\nthat it reroutes to the
right
index\nhttps://github.com//pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74\n2)
Handle the change in inference model selection for Product Doc.
Here\nthis is triggering an update to the product doc installation when
user\nclicks Update
model:\nhttps://github.com//pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151\n\n-
### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4ff731dcccaf9f60c5ef49ae014ed96800bacbe7","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug",":ml","release_note:skip","Team:Obs
AI
Assistant","ci:project-deploy-observability","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[AI
Infra] Fix Observability AI assistant product docs missing multilingual
support","number":224274,"url":"https://github.com/elastic/kibana/pull/224274","mergeCommit":{"message":"[AI
Infra] Fix Observability AI assistant product docs missing multilingual
support (#224274)\n\n## Summary\n\nThis PR fixes
#222176, and\nrewired the
productDoc installation process to accept an `inferenceId`\nargument to
the productDocBase installation API. It:\n\n- Allows for concurrent
installation of the product docs with two\ndifferent models: The default
ELSER and the multilingual E5. Kibana will\nonly install the one the
user needs, but has capacity for other models\nif user needs both of
them (i.e. ELSER for Security AI Assistant and\nmultilingual E5 for
Observability AI Assistant).\n \n- Modifies the script that generates
the artifacts to also allows\ninferenceId to be passed in.\n\n```\nnode
scripts/build_product_doc_artifacts.js --product-name=security
--stack-version=8.18
--inference-id=.multilingual-e5-small-elasticsearch\n```\n\n- In
parallel with this PR, deploys the public multilingual product
doc\nartifacts for 8.18\n- It modifies the installation logic to append
the inferenceId's to the\ntarget index name's (to distinguish it from
the ELSER default) and\ndefine the mapping of the target index to use
the E5's model_settings\n- Surfaces up error if there's an error with
the installation \n\n\t\nFor example, if there's no corresponding
artifact available, or if the\nartifact fails to fetch.
Before:\n\n\n![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)\n\n\n\t\n\tAfter,
it will prompt the user:
\n\n\n![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)\n\n\n##
Note for Reviewers:\n\n- **kibana-core**: Saved object
'product-doc-install-status' was updated\nto add a new field
`inference_id`\n\n- **Security Gen AI**: With the newly required
inferenceId parameter to\nthe installation endpoints, by default it will
use ELSER\n'.elser-2-elasticsearch'\n\n- **Observability AI Assistant**:
There are 2 at least todos remaining:\n1) Make to sure pass the
inferenceId to the retrieveDocumentation so\nthat it reroutes to the
right
index\nhttps://github.com//pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74\n2)
Handle the change in inference model selection for Product Doc.
Here\nthis is triggering an update to the product doc installation when
user\nclicks Update
model:\nhttps://github.com//pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151\n\n-
### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4ff731dcccaf9f60c5ef49ae014ed96800bacbe7"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224274","number":224274,"mergeCommit":{"message":"[AI
Infra] Fix Observability AI assistant product docs missing multilingual
support (#224274)\n\n## Summary\n\nThis PR fixes
#222176, and\nrewired the
productDoc installation process to accept an `inferenceId`\nargument to
the productDocBase installation API. It:\n\n- Allows for concurrent
installation of the product docs with two\ndifferent models: The default
ELSER and the multilingual E5. Kibana will\nonly install the one the
user needs, but has capacity for other models\nif user needs both of
them (i.e. ELSER for Security AI Assistant and\nmultilingual E5 for
Observability AI Assistant).\n \n- Modifies the script that generates
the artifacts to also allows\ninferenceId to be passed in.\n\n```\nnode
scripts/build_product_doc_artifacts.js --product-name=security
--stack-version=8.18
--inference-id=.multilingual-e5-small-elasticsearch\n```\n\n- In
parallel with this PR, deploys the public multilingual product
doc\nartifacts for 8.18\n- It modifies the installation logic to append
the inferenceId's to the\ntarget index name's (to distinguish it from
the ELSER default) and\ndefine the mapping of the target index to use
the E5's model_settings\n- Surfaces up error if there's an error with
the installation \n\n\t\nFor example, if there's no corresponding
artifact available, or if the\nartifact fails to fetch.
Before:\n\n\n![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)\n\n\n\t\n\tAfter,
it will prompt the user:
\n\n\n![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)\n\n\n##
Note for Reviewers:\n\n- **kibana-core**: Saved object
'product-doc-install-status' was updated\nto add a new field
`inference_id`\n\n- **Security Gen AI**: With the newly required
inferenceId parameter to\nthe installation endpoints, by default it will
use ELSER\n'.elser-2-elasticsearch'\n\n- **Observability AI Assistant**:
There are 2 at least todos remaining:\n1) Make to sure pass the
inferenceId to the retrieveDocumentation so\nthat it reroutes to the
right
index\nhttps://github.com//pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74\n2)
Handle the change in inference model selection for Product Doc.
Here\nthis is triggering an update to the product doc installation when
user\nclicks Update
model:\nhttps://github.com//pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151\n\n-
### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4ff731dcccaf9f60c5ef49ae014ed96800bacbe7"}}]}]
BACKPORT-->

Co-authored-by: Quynh Nguyen (Quinn) <43350163+qn895@users.noreply.github.com>
darnautov added a commit that referenced this pull request Jul 3, 2025
… multilingual support (#224274) (#226378)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[AI Infra] Fix Observability AI assistant product docs missing
multilingual support
(#224274)](#224274)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Quynh Nguyen
(Quinn)","email":"43350163+qn895@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-03T09:53:13Z","message":"[AI
Infra] Fix Observability AI assistant product docs missing multilingual
support (#224274)\n\n## Summary\n\nThis PR fixes
#222176, and\nrewired the
productDoc installation process to accept an `inferenceId`\nargument to
the productDocBase installation API. It:\n\n- Allows for concurrent
installation of the product docs with two\ndifferent models: The default
ELSER and the multilingual E5. Kibana will\nonly install the one the
user needs, but has capacity for other models\nif user needs both of
them (i.e. ELSER for Security AI Assistant and\nmultilingual E5 for
Observability AI Assistant).\n \n- Modifies the script that generates
the artifacts to also allows\ninferenceId to be passed in.\n\n```\nnode
scripts/build_product_doc_artifacts.js --product-name=security
--stack-version=8.18
--inference-id=.multilingual-e5-small-elasticsearch\n```\n\n- In
parallel with this PR, deploys the public multilingual product
doc\nartifacts for 8.18\n- It modifies the installation logic to append
the inferenceId's to the\ntarget index name's (to distinguish it from
the ELSER default) and\ndefine the mapping of the target index to use
the E5's model_settings\n- Surfaces up error if there's an error with
the installation \n\n\t\nFor example, if there's no corresponding
artifact available, or if the\nartifact fails to fetch.
Before:\n\n\n![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)\n\n\n\t\n\tAfter,
it will prompt the user:
\n\n\n![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)\n\n\n##
Note for Reviewers:\n\n- **kibana-core**: Saved object
'product-doc-install-status' was updated\nto add a new field
`inference_id`\n\n- **Security Gen AI**: With the newly required
inferenceId parameter to\nthe installation endpoints, by default it will
use ELSER\n'.elser-2-elasticsearch'\n\n- **Observability AI Assistant**:
There are 2 at least todos remaining:\n1) Make to sure pass the
inferenceId to the retrieveDocumentation so\nthat it reroutes to the
right
index\nhttps://github.com//pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74\n2)
Handle the change in inference model selection for Product Doc.
Here\nthis is triggering an update to the product doc installation when
user\nclicks Update
model:\nhttps://github.com//pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151\n\n-
### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4ff731dcccaf9f60c5ef49ae014ed96800bacbe7","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug",":ml","release_note:skip","Team:Obs
AI
Assistant","ci:project-deploy-observability","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[AI
Infra] Fix Observability AI assistant product docs missing multilingual
support","number":224274,"url":"https://github.com/elastic/kibana/pull/224274","mergeCommit":{"message":"[AI
Infra] Fix Observability AI assistant product docs missing multilingual
support (#224274)\n\n## Summary\n\nThis PR fixes
#222176, and\nrewired the
productDoc installation process to accept an `inferenceId`\nargument to
the productDocBase installation API. It:\n\n- Allows for concurrent
installation of the product docs with two\ndifferent models: The default
ELSER and the multilingual E5. Kibana will\nonly install the one the
user needs, but has capacity for other models\nif user needs both of
them (i.e. ELSER for Security AI Assistant and\nmultilingual E5 for
Observability AI Assistant).\n \n- Modifies the script that generates
the artifacts to also allows\ninferenceId to be passed in.\n\n```\nnode
scripts/build_product_doc_artifacts.js --product-name=security
--stack-version=8.18
--inference-id=.multilingual-e5-small-elasticsearch\n```\n\n- In
parallel with this PR, deploys the public multilingual product
doc\nartifacts for 8.18\n- It modifies the installation logic to append
the inferenceId's to the\ntarget index name's (to distinguish it from
the ELSER default) and\ndefine the mapping of the target index to use
the E5's model_settings\n- Surfaces up error if there's an error with
the installation \n\n\t\nFor example, if there's no corresponding
artifact available, or if the\nartifact fails to fetch.
Before:\n\n\n![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)\n\n\n\t\n\tAfter,
it will prompt the user:
\n\n\n![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)\n\n\n##
Note for Reviewers:\n\n- **kibana-core**: Saved object
'product-doc-install-status' was updated\nto add a new field
`inference_id`\n\n- **Security Gen AI**: With the newly required
inferenceId parameter to\nthe installation endpoints, by default it will
use ELSER\n'.elser-2-elasticsearch'\n\n- **Observability AI Assistant**:
There are 2 at least todos remaining:\n1) Make to sure pass the
inferenceId to the retrieveDocumentation so\nthat it reroutes to the
right
index\nhttps://github.com//pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74\n2)
Handle the change in inference model selection for Product Doc.
Here\nthis is triggering an update to the product doc installation when
user\nclicks Update
model:\nhttps://github.com//pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151\n\n-
### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4ff731dcccaf9f60c5ef49ae014ed96800bacbe7"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224274","number":224274,"mergeCommit":{"message":"[AI
Infra] Fix Observability AI assistant product docs missing multilingual
support (#224274)\n\n## Summary\n\nThis PR fixes
#222176, and\nrewired the
productDoc installation process to accept an `inferenceId`\nargument to
the productDocBase installation API. It:\n\n- Allows for concurrent
installation of the product docs with two\ndifferent models: The default
ELSER and the multilingual E5. Kibana will\nonly install the one the
user needs, but has capacity for other models\nif user needs both of
them (i.e. ELSER for Security AI Assistant and\nmultilingual E5 for
Observability AI Assistant).\n \n- Modifies the script that generates
the artifacts to also allows\ninferenceId to be passed in.\n\n```\nnode
scripts/build_product_doc_artifacts.js --product-name=security
--stack-version=8.18
--inference-id=.multilingual-e5-small-elasticsearch\n```\n\n- In
parallel with this PR, deploys the public multilingual product
doc\nartifacts for 8.18\n- It modifies the installation logic to append
the inferenceId's to the\ntarget index name's (to distinguish it from
the ELSER default) and\ndefine the mapping of the target index to use
the E5's model_settings\n- Surfaces up error if there's an error with
the installation \n\n\t\nFor example, if there's no corresponding
artifact available, or if the\nartifact fails to fetch.
Before:\n\n\n![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)\n\n\n\t\n\tAfter,
it will prompt the user:
\n\n\n![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)\n\n\n##
Note for Reviewers:\n\n- **kibana-core**: Saved object
'product-doc-install-status' was updated\nto add a new field
`inference_id`\n\n- **Security Gen AI**: With the newly required
inferenceId parameter to\nthe installation endpoints, by default it will
use ELSER\n'.elser-2-elasticsearch'\n\n- **Observability AI Assistant**:
There are 2 at least todos remaining:\n1) Make to sure pass the
inferenceId to the retrieveDocumentation so\nthat it reroutes to the
right
index\nhttps://github.com//pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74\n2)
Handle the change in inference model selection for Product Doc.
Here\nthis is triggering an update to the product doc installation when
user\nclicks Update
model:\nhttps://github.com//pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151\n\n-
### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4ff731dcccaf9f60c5ef49ae014ed96800bacbe7"}}]}]
BACKPORT-->

---------

Co-authored-by: Quynh Nguyen (Quinn) <43350163+qn895@users.noreply.github.com>
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…ingual support (elastic#224274)

## Summary

This PR fixes elastic#222176, and
rewired the productDoc installation process to accept an `inferenceId`
argument to the productDocBase installation API. It:

- Allows for concurrent installation of the product docs with two
different models: The default ELSER and the multilingual E5. Kibana will
only install the one the user needs, but has capacity for other models
if user needs both of them (i.e. ELSER for Security AI Assistant and
multilingual E5 for Observability AI Assistant).
 
- Modifies the script that generates the artifacts to also allows
inferenceId to be passed in.

```
node scripts/build_product_doc_artifacts.js --product-name=security --stack-version=8.18  --inference-id=.multilingual-e5-small-elasticsearch
```

- In parallel with this PR, deploys the public multilingual product doc
artifacts for 8.18
- It modifies the installation logic to append the inferenceId's to the
target index name's (to distinguish it from the ELSER default) and
define the mapping of the target index to use the E5's model_settings
- Surfaces up error if there's an error with the installation 

	
For example, if there's no corresponding artifact available, or if the
artifact fails to fetch. Before:


![image](https://github.com/user-attachments/assets/ac9fe8db-a34e-4e67-8471-56e8f4520fdd)


	
	After, it will prompt the user: 


![image](https://github.com/user-attachments/assets/ff18c6bd-0c20-4227-aac7-913a3032a31f)


## Note for Reviewers:

- **kibana-core**: Saved object 'product-doc-install-status' was updated
to add a new field `inference_id`

- **Security Gen AI**: With the newly required inferenceId parameter to
the installation endpoints, by default it will use ELSER
'.elser-2-elasticsearch'

- **Observability AI Assistant**: There are 2 at least todos remaining:
1) Make to sure pass the inferenceId to the retrieveDocumentation so
that it reroutes to the right index
https://github.com/elastic/kibana/pull/224274/files#diff-e393e350cf2449f8b756cad947fc8a902fddf6e6b30f1363750d469fc7d81b61R74
2) Handle the change in inference model selection for Product Doc. Here
this is triggering an update to the product doc installation when user
clicks Update model:
https://github.com/elastic/kibana/pull/224274/files#diff-7d84fc1bf3106fe3b0cb357c800faefc1b96b853beeb74711f1c3c623ae901b9R151

- ### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience ci:project-deploy-observability Create an Observability project :ml release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AI Infra] Product docs should be shipped with both ELSER and E5 embeddings