Skip to content

[8.x] [SIEM Rule Migration] Minor prompt improvements (#201941)#202383

Merged
semd merged 1 commit intoelastic:8.xfrom
semd:backport/8.x/pr-201941
Nov 30, 2024
Merged

[8.x] [SIEM Rule Migration] Minor prompt improvements (#201941)#202383
semd merged 1 commit intoelastic:8.xfrom
semd:backport/8.x/pr-201941

Conversation

@semd
Copy link
Copy Markdown
Contributor

@semd semd commented Nov 30, 2024

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Adding some minor improvements and modifies the format on some of the
prompts used in the siem_migration process, a few specifics below:

1. Moved prebuilt rules matching to JSON output parsing, as its less
prone for issues on some models.
2. Moved some of the formatting of the prompts to focus on xml-like
tags, as it often gives good results on multiple models. Also context
that is relevant to perform an action is moved to system, while context
related to the question (and to the response) is kept in the human
prompt.
3. Moved process_query to ChatPromptTemplate, moved the collection of
ResourceContext outside of the prompt because of this.

(cherry picked from commit eb87889)

# Conflicts:
#	x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/nodes/match_prebuilt_rule/match_prebuilt_rule.ts
@semd semd requested a review from kibanamachine as a code owner November 30, 2024 12:31
@semd semd added the backport This PR is a backport of another PR label Nov 30, 2024
@semd semd enabled auto-merge (squash) November 30, 2024 12:31
@semd semd merged commit 7f4366f into elastic:8.x Nov 30, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants