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] Add LLM-based query review #193267

Open
pgayvallet opened this issue Sep 18, 2024 · 0 comments
Open

[NL-to-ESQL] Add LLM-based query review #193267

pgayvallet opened this issue Sep 18, 2024 · 0 comments
Labels
Team:AI Infra AppEx AI Infrastructure Team

Comments

@pgayvallet
Copy link
Contributor

pgayvallet commented Sep 18, 2024

To improve validation, we could try to run the query through the syntax checker and, in case of errors, ask the LLM to fix them.

If we "know" the query is targeting existing indices, we could even try to execute the query (e.g. with a limit 1) to see if it is valid.

The esql tooling exposes a validation function, which validate the syntax:

import { validateQuery } from '@kbn/esql-validation-autocomplete';

One issue might be extracting errors from those validators to a format the LLM could more easily understand.

If we have other way to check / validate the query, we should also experiment with those.

@pgayvallet pgayvallet added the Team:AI Infra AppEx AI Infrastructure Team label Sep 18, 2024
@pgayvallet pgayvallet changed the title [NL-to-ESQL] execute query during validation [NL-to-ESQL] run esql syntax checker during validation Oct 22, 2024
@pgayvallet pgayvallet changed the title [NL-to-ESQL] run esql syntax checker during validation [NL-to-ESQL] Add LLM-based query review 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

1 participant