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

[Security solution] assistantKnowledgeBaseByDefault flag removed #198180

Merged
merged 35 commits into from
Nov 12, 2024

Conversation

stephmilovic
Copy link
Contributor

@stephmilovic stephmilovic commented Oct 29, 2024

Summary

  • Removes the assistantKnowledgeBaseByDefault flag and all of its code paths.
  • Removes dead code related to the old knowledge base model and/or ESQL.

@stephmilovic stephmilovic added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v8.17.0 labels Oct 29, 2024
@stephmilovic stephmilovic added the WIP Work in progress label Oct 29, 2024
@@ -1,478 +0,0 @@
/*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This elasticsearch_store stuff is dead code, could have been deleted in this PR: https://github.com/elastic/kibana/pull/192665/files#r1769323053

Comment on lines -222 to -223
modelId: await this.getElserId(),
v2KnowledgeBaseEnabled: this.v2KnowledgeBaseEnabled,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These properties are unused for the noop pipeline

this.knowledgeBaseDataStream = this.createDataStream({
resource: 'knowledgeBase',
kibanaVersion: this.options.kibanaVersion,
fieldMap: knowledgeBaseFieldMapV2,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that the const knowledgeBaseFieldMapV2 has now been renamed to knowledgeBaseFieldMap. Therefore, createDataStream is called for the "v2" mappings on L95

const isKnowledgeBaseInstalled = await getIsKnowledgeBaseInstalled(kbDataClient);

telemetry?.reportEvent(INVOKE_ASSISTANT_ERROR_EVENT.eventType, {
actionTypeId: actionTypeId ?? '',
model: request.body.model,
errorMessage: error.message,
// TODO rm actionTypeId check when llmClass for bedrock streaming is implemented
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stale comment

Copy link
Contributor

@e40pud e40pud 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 update!

@stephmilovic
Copy link
Contributor Author

stephmilovic commented Nov 6, 2024

Plan is to merge this on Tues Nov 12

@stephmilovic
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 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
@kbn/elastic-assistant-common 375 370 -5

Async chunks

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

id before after diff
securitySolution 13.4MB 13.4MB -3.0KB

Page load bundle

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

id before after diff
securitySolution 86.2KB 86.2KB -35.0B
Unknown metric groups

API count

id before after diff
@kbn/elastic-assistant-common 406 401 -5

History

@stephmilovic stephmilovic merged commit 194de0d into elastic:main Nov 12, 2024
44 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@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 198180

Questions ?

Please refer to the Backport tool documentation

@stephmilovic
Copy link
Contributor 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

stephmilovic added a commit to stephmilovic/kibana that referenced this pull request Nov 12, 2024
stephmilovic added a commit that referenced this pull request Nov 12, 2024
…ved (#198180) (#199859)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security solution] `assistantKnowledgeBaseByDefault` flag removed
(#198180)](#198180)

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

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

<!--BACKPORT [{"author":{"name":"Steph
Milovic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-12T18:10:53Z","message":"[Security
solution] `assistantKnowledgeBaseByDefault` flag removed
(#198180)","sha":"194de0dadb50b37e7b1be5b9228c34c9b3f0f0e6","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:
SecuritySolution","Team:Security Generative
AI","backport:version","v8.17.0"],"number":198180,"url":"https://github.com/elastic/kibana/pull/198180","mergeCommit":{"message":"[Security
solution] `assistantKnowledgeBaseByDefault` flag removed
(#198180)","sha":"194de0dadb50b37e7b1be5b9228c34c9b3f0f0e6"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198180","number":198180,"mergeCommit":{"message":"[Security
solution] `assistantKnowledgeBaseByDefault` flag removed
(#198180)","sha":"194de0dadb50b37e7b1be5b9228c34c9b3f0f0e6"}},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
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
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 release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants