[Observability AI Assistant] Auto-correct for ES|QL SORT commands adds duplicate backticks #184404
Labels
bug
Fixes for quality problems that affect the customer experience
Team:Obs AI Assistant
Observability AI Assistant
Milestone
We have a process where we auto-correct common ES|QL mistakes. One of them is using an expression in a STATS command as the sorting expression. ES|QL does not support this, it does however create a column with the same name as the sorting expression, so we can add backticks to make it work.
E.g.,
becomes:
However, if an expression is already escaped, we add more backticks:
This leads to an invalid query, and causes the LLM to get confused because even when it has sent the right query, we introduce a syntax mistake that the LLM cannot correct.
The text was updated successfully, but these errors were encountered: