Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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.4
changes:
- description: Remove slo assets when spec versions are less than 3.4.0.
Expand Down
15 changes: 14 additions & 1 deletion spec/integration/kibana/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,25 @@ spec:
contentMediaType: "application/json"
pattern: '^{PACKAGE_NAME}-.+\.json$'
forbiddenPatterns:
- '^.+-(ecs|ECS)\.json$' # ECS suffix is forbidden
- '^.+-(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$'
Copy link
Contributor

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 ?

Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

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 ?

Copy link
Member

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.

Copy link
Contributor

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-package supports only the "integration" package type. Is that right? How do I update the references?

Copy link
Member

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-package supports only the "integration" package type. Is that right?

This is probably outdated, elastic-package supports integration, input and content packages. Where have you seen this?

How do I update the references?

These lines should do the trick in the integrations or elastic-package repos:

go mod edit -replace github.com/elastic/package-spec/v3=github.com/patrykkopycinski/package-spec/v3@security_ai_prompts
go mod tidy

Copy link
Contributor

Choose a reason for hiding this comment

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

elastic-package supports integration, input and content packages. Where have you seen this?

Thank you. Here is the outdated doc reference https://www.elastic.co/guide/en/integrations-developer/current/elastic-package.html#_elastic_package_build

Copy link
Member

Choose a reason for hiding this comment

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

versions:
- before: 3.4.0
patch:
- op: remove
path: "/contents/13" # remove SLO definitions
- before: 3.4.0
patch:
- op: remove
path: "/contents/6" # remove AI prompt definitions
- before: 2.10.0
patch:
- op: remove
Expand Down
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"
}
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_v2-security-ai-prompt-1",
"type": "security-ai-prompt"
}
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"
}