elastic / security-docs

Elastic Security Documentation
Other
61 stars 177 forks source link

[Request] Retrieval Augemented Generation (RAG) for Alerts #4456

Closed dhru42 closed 7 months ago

dhru42 commented 7 months ago

Description

What: We're implementing Retrieval Augmented Generation for Alerts Why: Currently, the AI Assistant provides one alert or event at a time as context to the LLM, but has no way to answer questions about multiple alerts in the alerts index. With this functionality, the assistant can provide the riskiest, latest alerts as context to the LLM, with data anonymized per a user’s settings. Example of new questions users can ask: _- How many alerts are currently open?

How:

Settings

This feature is enabled and configured via the Knowledge Base > Alerts settings in the screenshot below: rag_on_alerts_setting

When the setting above is enabled, up to n alerts (as determined by the slider) that meet the following criteria will be returned:

Background & resources

Which documentation set does this change impact?

ESS and serverless

ESS release

8.12

Serverless release

tbd

Feature differences

N/A

API docs impact

n/a

Prerequisites, privileges, feature flags

Feature flag To use this feature:

Add the assistantRagOnAlerts feature flag to the xpack.securitySolution.enableExperimental setting in config/kibana.yml (or config/kibana.dev.yml in local development environments), per the example below: xpack.securitySolution.enableExperimental: ['assistantRagOnAlerts'] Enable the Alerts toggle in the Assistant's Knowledge Base settings, per the screenshot below: image

dhru42 commented 7 months ago

@benironside @joepeeples please let us know if you want to get together for a live demo of this feature. Given the new guidance regarding FF's, we'd love the ability to release this feature as enabled behind a feature flag if docs are available. Please let us know if that will be possible, and we're happy to help out in any way we can.

cc: @jamesspi @andrew-goldstein @spong

andrew-goldstein commented 7 months ago

Thanks for documenting this feature!

We made a few small changes in this PR: https://github.com/elastic/kibana/pull/173121

updated_settings

context_length_error

We're happy to improve the settings text with your feedback if you're willing to provide it.