forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LLM tasks] Add product documentation retrieval task (elastic#194379)
## Summary Close elastic#193473 Close elastic#193474 This PR utilize the documentation packages that are build via the tool introduced by elastic#193847, allowing to install them in Kibana and expose documentation retrieval as an LLM task that AI assistants (or other consumers) can call. Users can now decide to install the Elastic documentation from the assistant's config screen, which will expose a new tool for the assistant, `retrieve_documentation` (only implemented for the o11y assistant in the current PR, shall be done for security as a follow up). For more information, please refer to the self-review. ## General architecture <img width="1118" alt="Screenshot 2024-10-17 at 09 22 32" src="https://github.com/user-attachments/assets/3df8c30a-9ccc-49ab-92ce-c204b96d6fc4"> ## What this PR does Adds two plugin: - `productDocBase`: contains all the logic related to product documentation installation, status, and search. This is meant to be a "low level" components only responsible for this specific part. - `llmTasks`: an higher level plugin that will contain various LLM tasks to be used by assistants and genAI consumers. The intent is not to have a single place to put all llm tasks, but more to have a default place where we can introduce new tasks from. (fwiw, the `nlToEsql` task will probably be moved to that plugin). - Add a `retrieve_documentation` tool registration for the o11y assistant - Add a component on the o11y assistant configuration page to install the product doc (wiring the feature to the o11y assistant was done for testing purposes mostly, any addition / changes / enhancement should be done by the owning team - either in this PR or as a follow-up) ## What is NOT included in this PR: - Wire product base feature to the security assistant (should be done by the owning team as a follow-up) - installation - utilization as tool - FTR tests: this is somewhat blocked by the same things we need to figure out for elastic/kibana-team#1271 ## Screenshots ### Installation from o11y assistant configuration page <img width="1476" alt="Screenshot 2024-10-17 at 09 41 24" src="https://github.com/user-attachments/assets/31daa585-9fb2-400a-a2d1-5917a262367a"> ### Example of output #### Without product documentation installed <img width="739" alt="Screenshot 2024-10-10 at 09 59 41" src="https://github.com/user-attachments/assets/993fb216-6c9a-433f-bf44-f6e383d20d9d"> #### With product documentation installed <img width="718" alt="Screenshot 2024-10-10 at 09 55 38" src="https://github.com/user-attachments/assets/805ea4ca-8bc9-4355-a434-0ba81f8228a9"> --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Alex Szabo <[email protected]> Co-authored-by: Matthias Wilhelm <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
1ac0fbd
commit aa8b99c
Showing
150 changed files
with
5,662 additions
and
64 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 47 additions & 1 deletion
48
x-pack/packages/ai-infra/product-doc-artifact-builder/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,49 @@ | ||
# @kbn/product-doc-artifact-builder | ||
|
||
Script to build the knowledge base artifacts | ||
Script to build the knowledge base artifacts. | ||
|
||
## How to run | ||
|
||
``` | ||
node scripts/build_product_doc_artifacts.js --stack-version {version} --product-name {product} | ||
``` | ||
|
||
### parameters | ||
|
||
#### `stack-version`: | ||
|
||
the stack version to generate the artifacts for. | ||
|
||
#### `product-name`: | ||
|
||
(multi-value) the list of products to generate artifacts for. | ||
|
||
possible values: | ||
- "kibana" | ||
- "elasticsearch" | ||
- "observability" | ||
- "security" | ||
|
||
#### `target-folder`: | ||
|
||
The folder to generate the artifacts in. | ||
|
||
Defaults to `{REPO_ROOT}/build-kb-artifacts`. | ||
|
||
#### `build-folder`: | ||
|
||
The folder to use for temporary files. | ||
|
||
Defaults to `{REPO_ROOT}/build/temp-kb-artifacts` | ||
|
||
#### Cluster infos | ||
|
||
- params for the source cluster: | ||
`sourceClusterUrl` / env.KIBANA_SOURCE_CLUSTER_URL | ||
`sourceClusterUsername` / env.KIBANA_SOURCE_CLUSTER_USERNAME | ||
`sourceClusterPassword` / env.KIBANA_SOURCE_CLUSTER_PASSWORD | ||
|
||
- params for the embedding cluster: | ||
`embeddingClusterUrl` / env.KIBANA_EMBEDDING_CLUSTER_URL | ||
`embeddingClusterUsername` / env.KIBANA_EMBEDDING_CLUSTER_USERNAME | ||
`embeddingClusterPassword` / env.KIBANA_EMBEDDING_CLUSTER_PASSWORD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.