Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Enhance log rate analysis API for use with AI Assistant #178501

Closed
grabowskit opened this issue Mar 12, 2024 · 11 comments
Closed

[ML] Enhance log rate analysis API for use with AI Assistant #178501

grabowskit opened this issue Mar 12, 2024 · 11 comments
Assignees
Labels
:ml Team:obs-knowledge Observability Experience Knowledge team

Comments

@grabowskit
Copy link

grabowskit commented Mar 12, 2024

Log rate analysis is a Kibana API that uses several steps to get its relevant fields. This is too slow for the AI Assistant to be able to call and needs an updated API that can be called ideally in a single step depending on feasibility.

@dgieselaar

@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 12, 2024
@grabowskit grabowskit added Team:obs-knowledge Observability Experience Knowledge team and removed needs-team Issues missing a team label labels Mar 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-knowledge-team (Team:obs-knowledge)

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@walterra
Copy link
Contributor

I created an additional issue that will cover this use case here: #178613

Let me know if you have any suggestions about the API request body and what you'd like to pass on when calling this via AI Assistant.

@walterra
Copy link
Contributor

Can you elaborate a bit on the requirements regarding speed related to AI Assistant? Are there some kind of thresholds, what does the AI Assistant consider too slow?

@dgieselaar
Copy link
Member

@walterra I think this API should not take more than 2-3s to return. Generally I think we want more control here over the actual analysis that is being performed - e.g. there are some steps where we can take advantage of the fact that we know the schema to speed things up/get back more useful results.

@peteharverson peteharverson changed the title ML log rate analysis API for use with AI Assistant [ML] Enhance log rate analysis API for use with AI Assistant Mar 18, 2024
@mwtyang
Copy link

mwtyang commented Mar 19, 2024

cc @arisonl

@emma-raffenne
Copy link
Contributor

@walterra and @sorenlouv
Please can you sync on the progress of this and the requirements from our side for the AI Assistant?
Thanks

@walterra
Copy link
Contributor

We also have an issue in the ml-team repo to track work from our side which I updated just yesterday: https://github.com/elastic/ml-team/issues/1182#issuecomment-2107506340

So far I didn't hit any limitations regarding the AI Assistant, the recent updates with starter prompts are great and I was able to now use setScreenContext properly to pass on custom data from Kibana pages. More details can be found in issue I linked.

@sorenlouv
Copy link
Member

sorenlouv commented May 14, 2024

@walterra I'd like to try out the log rate analysis in a rest API that will be consumed by the AI Assistant. If I pull your branch, how can I invoke the log rate analysis function that your proposed here?

@walterra
Copy link
Contributor

Summarizing our ZOOM here:

  • The current PoC so far focused on a registered function for the AI Assistant.
  • The use case Søren is after is to make log rate analysis available for the "contextual insight" variant of the AI assistant.

In that case it doesn't need to be a registered function, it just needs to be a function that can be used on Kibana's server side as part of the API call that gathers the data for the initial prompt. I'll try to expose such a function from the @kbn/aiops-log-rate-analysis package to get us started.

walterra added a commit that referenced this issue Aug 28, 2024
…nsight. (#187690)

## Summary

Part of #178501.

This adds log rate analysis results to the prompt used for contextual
insights on alert details pages:

<img width="1149" alt="image"
src="https://github.com/user-attachments/assets/80b0f8e6-1ea1-4dbf-86ff-82c2ef175aa6">

<img width="1129" alt="image"
src="https://github.com/user-attachments/assets/a538cc3c-6f13-43e4-ad7d-8a93a779d349">


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
@emma-raffenne
Copy link
Contributor

Log rate analysis has been added to contextual insights in alert detail pages by #187690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Team:obs-knowledge Observability Experience Knowledge team
Projects
None yet
Development

No branches or pull requests

8 participants