[Security Assistant] Starter prompts#224981
Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
| if (docs.length === 0) { | ||
| const isKnowledgeBaseInstalled = await getIsKnowledgeBaseInstalled(kbDataClient); | ||
| if (!isKnowledgeBaseInstalled) { | ||
| // prompt to help user install knowledge base | ||
| return 'The "AI Assistant knowledge base" needs to be installed, containing the Security Labs content. Navigate to the Knowledge Base page in the AI Assistant Settings to install it.'; | ||
| } | ||
| } |
There was a problem hiding this comment.
nit: this could happen before the actual KB search above, no?
This was functionally equivalent when testing so no biggie either way. I am curious why the tool is even being registered though, as we have the KB requirement specified above in isSupported(). I think that might need to be updated (for all tools) as it just checks for a not null kbDataClient, which I believe will always be not null as the client is available even if the KB isn't set up.
No change necessary here as it behaves as expected, more of a note for a future fix/update to isSupported().
There was a problem hiding this comment.
It seems product's preference is to have the tool registered even when KB is not installed in order to inform user to install it. yes it could happen above the kb search, put it below so we're not doing an extra call every time
There was a problem hiding this comment.
Yeah, I concur with this flow as well 👍. Either way, I think we'll need to update isSupported for all the tools later since that old check on the kbClient doesn't appear to be valid anymore.
...ons/security/plugins/security_solution/public/assistant/use_assistant_availability/index.tsx
Show resolved
Hide resolved
spong
left a comment
There was a problem hiding this comment.
Checked out, tested locally and code reviewed -- LGTM!
Great stuff here @stephmilovic! Looks/works great and awesome to see it wired up to out-of-band prompt updates! 😀
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Page load bundle
History
|
logeekal
left a comment
There was a problem hiding this comment.
Codeowner's review looks good 👍
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15875581596 |
(cherry picked from commit b82ab8a)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.19`: - [[Security Assistant] Starter prompts (#224981)](#224981) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"stephanie.milovic@elastic.co"},"sourceCommit":{"committedDate":"2025-06-25T11:52:31Z","message":"[Security Assistant] Starter prompts (#224981)","sha":"b82ab8acb8b5e9e505210943e9f08881c84a20d4","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team: SecuritySolution","Team:Security Generative AI","backport:version","v9.1.0","v8.19.0"],"title":"[Security Assistant] Starter prompts","number":224981,"url":"https://github.com/elastic/kibana/pull/224981","mergeCommit":{"message":"[Security Assistant] Starter prompts (#224981)","sha":"b82ab8acb8b5e9e505210943e9f08881c84a20d4"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224981","number":224981,"mergeCommit":{"message":"[Security Assistant] Starter prompts (#224981)","sha":"b82ab8acb8b5e9e505210943e9f08881c84a20d4"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Summary
Behind feature flag:
Adds new starter prompts to the AI Assistant

EmptyConvopageThe prompts are Security AI Prompts integration, and are included in this PR: elastic/integrations#14296
SecurityLabsToolchangeAs one of these prompts attempts to invoke security labs, I've added a conditional tool response that advises the user to install the knowledge base if this prompt is used when the KB does not exist. See how that works in this trace: https://smith.langchain.com/public/60d222bc-c49d-4245-a189-898b901c8c3b/r