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][Elastic AI Assistant] Refactors Knowledge Base feature flag to UI feature toggle #167935

Merged
merged 6 commits into from
Oct 3, 2023

Conversation

spong
Copy link
Member

@spong spong commented Oct 3, 2023

Summary

This PR refactors the assistantLangChain code feature flag introduced in #164908, to be a UI feature toggle that users can enable/disable via the Knowledge Base assistant advanced settings.

Left image shows the feature disabled, and the right image shows the feature partly enabled. If ELSER is configured, the UI will attempt to install all resources automatically for a one-click UX, however if ELSER is not configured, or there are failures, the user can manually enable the Knowledge Base or ES|QL base documentation:

Also, since this code feature flag was shared with the model evaluator experimental feature, a modelEvaluatorEnabled flag has been plumbed to fully decouple the two settings. Now only the model evaluator is enabled when setting security Solution Advanced setting:

xpack.securitySolution.enableExperimental: ['assistantModelEvaluation']

and the previous assistantLangChain code feature flag is now enabled by simply toggling on the Knowledge Base in the settings shown above.

Note

Even if ELSER isn't configured, and the knowledge base/docs aren't setup, if the Knowledge Base is enabled, the LangChain code path will still be enabled as intended, but we can change this behavior if testing shows this is not ideal.

Checklist

Delete any items that are not applicable to this PR.

@spong spong added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Security Assistant Security Assistant v8.11.0 labels Oct 3, 2023
@spong spong requested a review from andrew-goldstein October 3, 2023 20:20
@spong spong self-assigned this Oct 3, 2023
@spong spong requested review from a team as code owners October 3, 2023 20:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Copy link
Contributor

@andrew-goldstein andrew-goldstein left a comment

Choose a reason for hiding this comment

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

Thanks @spong for enabling the KB via the UI toggle! 🙏
✅ Desk tested locally
LGTM 🚀

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

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.0MB 13.0MB +9.2KB

History

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

cc @spong

@spong spong merged commit e74e5e2 into elastic:main Oct 3, 2023
@spong spong deleted the assistant-kb-part-deux branch October 3, 2023 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Security Assistant Security Assistant release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants