Takuya-Omi
Valued Contributor III

I found this to be a very interesting approach.
One important point to consider is that an empty result can also carry meaning. With this in mind, I provided the following instructions to Genie:

When a user's query results in an empty table, first determine whether this outcome is genuinely meaningful (e.g., no records match the query criteria). If you suspect the empty result may be due to an error in the query—such as filtering on non-existent keys or invalid dates (like future dates)—politely inform the user of this possibility. Suggest that they review and revise their query if necessary, and offer assistance in refining the SQL query to achieve the desired results.

It prompts users to carefully interpret the results if they are empty.

While this may not fully meet your requirements, I wanted to share it with you.

The following image shows the result of filtering using a non-existent SKU name, no-serverless.



TakuyaOmi_0-1733368518147.png

 

--------------------------
Takuya Omi (尾美拓哉)