What's the allowed syntax for the OSQL query tool in the LLM tools?

When some LLM models run the query tool with OSQL, it can often return errors of incorrect syntax. Like ARRAY_CONTAINS or ANY. The only hint that seems to be passed for correction is that the dialect is SPARK. I would like to know the set of allowed commands particularly for SELECT that the tool can do to guide it better.

Hi @JulioM - in general, it is a subset of the Spark SQL syntax, but not all functionality is supported as you’ve observed.

We are working on adding some documentation for supported ontology sql functions in the next week or two. It should be added into the existing SQL dialect documentation, so that you’d have one source of truth for supported syntax for both data and ontolgoy SQL queries.

1 Like