Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spec/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
- description: Add support for semantic_text field definition.
type: enhancement
link: https://github.com/elastic/package-spec/pull/807
- description: Add kibana/security_ai_prompt to support security AI prompt assets.
type: enhancement
link: https://github.com/elastic/package-spec/pull/871
- version: 3.3.5-next
changes:
- description: Allow security_rule assets in content package.
Expand Down
11 changes: 11 additions & 0 deletions spec/content/kibana/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ spec:
pattern: '^{PACKAGE_NAME}-.+\.json$'
forbiddenPatterns:
- '^.+-(ecs|ECS)\.json$' # ECS suffix is forbidden
- description: Folder containing security AI prompt assets
type: folder
name: "security_ai_prompt"
required: false
contents:
- description: A security AI prompt asset file
type: file
contentMediaType: "application/json"
pattern: '^{PACKAGE_NAME}-.+\.json$'
- description: Folder containing rules
type: folder
name: "security_rule"
Expand All @@ -41,5 +50,7 @@ spec:
versions:
- before: 3.4.0
patch:
- op: remove
path: "/contents/3" # remove AI prompt definitions
- op: remove
path: "/contents/2" # remove SLO definitions
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_content-security-ai-prompt-1",
"type": "security-ai-prompt"
}
Copy link
Member

Choose a reason for hiding this comment

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

I am still missing a sample with a real use case. Is the idea to distribute a package with a collection of prompts? Or to associate prompts to specific data?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I'm confused what else you need here? All the package does is distribute prompts as saved objects. The prompts are looked up with the saved object API within security solution. If no saved object prompt exists, a fallback prompt value exists. https://github.com/elastic/kibana/blob/0d415a6d3a09200dad48a58851d89d81ef897b81/x-pack/solutions/security/packages/security-ai-prompts/src/get_prompt.ts#L109-L113

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure about the package that is planned after this new asset is supported. Will it be a package that will contain only a collection of prompts? Or will prompts be added to other packages?

Copy link
Contributor

Choose a reason for hiding this comment

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

There will be one new package that contains only a collection of prompts as saved objects, see here: https://github.com/elastic/integrations/pull/13323/files

Copy link
Member

Choose a reason for hiding this comment

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

Ok, then the model proposed here based on content package will fit great.