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

[NL-to-ESQL] Retrieve context from cluster / indices #198954

Open
pgayvallet opened this issue Nov 5, 2024 · 1 comment
Open

[NL-to-ESQL] Retrieve context from cluster / indices #198954

pgayvallet opened this issue Nov 5, 2024 · 1 comment
Labels
Team:AI Infra AppEx AI Infrastructure Team

Comments

@pgayvallet
Copy link
Contributor

To improve the ESQL task, we could try to retrieve some context from the customer cluster.

We could for example fetch the list of all indices / aliases / datastreams the current user has access to, and then ask the LLM to guess, based on the user query, which one(s) are the most likely to be the target of the query. Then from there we could retrieve the mappings and provide it to the LLM, so that it has better knowledge of the existing fields.

The major downside here would be that we would be performing more LLM calls during the task, impacting the overall generation time. So we would probably need to make that opt-in by the caller.

One other option could be to let the caller pass the information regarding which index/index-patterns should be targeted, and we would then retrieve the mappings from that information. This could make a lot of sense for features like discover or visualize, when the application that would call the ESQL generation knows which index/indices the user is currently visualizing.

@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 5, 2024
@pgayvallet pgayvallet added the Team:AI Infra AppEx AI Infrastructure Team label Nov 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-ai-infra (Team:AI Infra)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:AI Infra AppEx AI Infrastructure Team
Projects
None yet
Development

No branches or pull requests

2 participants