-
Notifications
You must be signed in to change notification settings - Fork 87
Security ai prompts #871
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
Merged
Merged
Security ai prompts #871
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
261c321
## What does this PR do?
andrew-goldstein 45b6984
fix tests
patrykkopycinski 78cf47a
updates from 870
stephmilovic 2d284ba
Merge branch 'main' into security_ai_prompts
stephmilovic 5927910
fix spec/integration/kibana/spec.yml
stephmilovic 77dacdf
rm sample json from good and good_v2
stephmilovic 5945ba6
integration => content
stephmilovic 9551e8f
add space back
stephmilovic e54eb29
move test
stephmilovic ad2c8bf
fix test
stephmilovic b907186
Merge branch 'main' into security_ai_prompts
jsoriano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
12 changes: 12 additions & 0 deletions
12
test/packages/good/kibana/security_ai_prompt/good-security-ai-prompt-1.json
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "attributes": { | ||
| "promptId": "systemPrompt", | ||
| "promptGroupId": "aiAssistant", | ||
| "provider": "openai", | ||
| "prompt": { | ||
| "default": "You are a security analyst and expert in resolving security incidents. Your role is to assist by answering questions about Elastic Security. Do not answer questions unrelated to Elastic Security." | ||
| } | ||
| }, | ||
| "id": "good-security-ai-prompt-1", | ||
| "type": "security-ai-prompt" | ||
| } |
12 changes: 12 additions & 0 deletions
12
test/packages/good_v2/kibana/security_ai_prompt/good_v2-security-ai-prompt-1.json
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "attributes": { | ||
stephmilovic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "promptId": "systemPrompt", | ||
| "promptGroupId": "aiAssistant", | ||
| "provider": "openai", | ||
| "prompt": { | ||
| "default": "You are a security analyst and expert in resolving security incidents. Your role is to assist by answering questions about Elastic Security. Do not answer questions unrelated to Elastic Security." | ||
| } | ||
| }, | ||
| "id": "good_v2-security-ai-prompt-1", | ||
| "type": "security-ai-prompt" | ||
| } | ||
12 changes: 12 additions & 0 deletions
12
test/packages/good_v3/kibana/security_ai_prompt/good_v3-security-ai-prompt-1.json
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "attributes": { | ||
| "promptId": "systemPrompt", | ||
| "promptGroupId": "aiAssistant", | ||
| "provider": "openai", | ||
| "prompt": { | ||
| "default": "You are a security analyst and expert in resolving security incidents. Your role is to assist by answering questions about Elastic Security. Do not answer questions unrelated to Elastic Security." | ||
| } | ||
| }, | ||
| "id": "good_v3-security-ai-prompt-1", | ||
| "type": "security-ai-prompt" | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to add this Kibana asset to content packages? Or is it intended just for integration packages ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure what "content packages" is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading through the the Package specification section of the Integrations Developer Guide, I don't believe this package should be a "content package" since the assets do not include any dashboards, visualizations, or ingest pipelines to enhance the user experience. The assets are JSON saved objects to deliver text at certain points in AI workflows. The user does not see the additional prompting, it is sent to the LLM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or do you mean defining it in the Kibana repo? This is already done: https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/common/types/models/epm.ts#L62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the integrations PR elastic/integrations#13323 you linked, this looks like a candidate to be also available in content packages (under Kibana folder too with the JSON path to remove it in previous versions). Integration packages allow to define data streams, mappings, ingest pipelines and it looks like that all those resources would not be needed for these security AI prompt assets to work (is that right?).
I think it could also be kept as part of integration packages, in case it also needed to add/provide Security AI prompts in integration packages.
WDYT @jsoriano ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have branches of integrations or elastic-package using this change you will need to update the references, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs say that
elastic-packagesupports only the "integration" package type. Is that right? How do I update the references?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably outdated, elastic-package supports integration, input and content packages. Where have you seen this?
These lines should do the trick in the integrations or elastic-package repos:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Here is the outdated doc reference https://www.elastic.co/guide/en/integrations-developer/current/elastic-package.html#_elastic_package_build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating docs elastic/elastic-package#2507