elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.48k stars 8.04k forks source link

[AI Assistant] Add Knowledge base for Painless Scripting #184285

Open BenB196 opened 1 month ago

BenB196 commented 1 month ago

Describe the feature:

The AI Assistant currently has prebuilt knowledge bases (as of 8.13.4 it only has lens). I think it would be useful to have a knowledge base for Painless.

Describe a specific use case for the feature:

Painless scripting plays a large role in a number of Elastic features (Ingest pipelines, Runtime fields, etc...) however, it can become somewhat complex to write, especially to people new to it. Having the AI Assistant understand how Painless works, would potentially allow for easier adoption/usage of painless making downstream features that use it, easier to use as well.

A more specific example: Runtime fields are pretty cool as they allow you to do some interesting things, however, trying to teach a less "technical" person how to create them can often be a time-consuming endeavor. Having the AI assistant be able to assist a user build and iterate through a runtime field would allow offloading some of the work from Elastic Stack operators.

elasticmachine commented 3 weeks ago

Pinging @elastic/kibana-management (Team:Kibana Management)

alisonelizabeth commented 1 week ago

@elastic/obs-ai-assistant - would this fall under your area?

sorenlouv commented 4 days ago

@alisonelizabeth : Thanks for the ping. Yes, this belongs to our team.

@BenB196 We have invested heavily in esql support which to some extends mitigates the need for painless. Can you provide examples/use cases that you'd like to do with painless? Feel free to share the prompts that you want the assistant to be able to respond to.

BenB196 commented 3 days ago

Hi @sorenlouv there are a few examples that still require painless:

  1. 25820 - requires painless/runtime field to workaround limitation (missing from ES|QL support - https://github.com/elastic/elasticsearch/issues/105637)

  2. Elasticsearch Ingest Pipelines still rely heavily on painless for both the script processor & conditions

While ES|QL does mitigate the need for some areas to use painless, querying isn't the only place that painless is used, and there doesn't seem to be an effort (at least publicly facing) to change how ingest pipelines work.