Preventing Genie from Returning Empty Tables as Responses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ11-26-2024 10:30 AM
Hello! I am implementing the use of a Genie Room in my company. During development, we are encountering several situations where Genie returns an empty table.
I understand that an empty table is always an errorโeither due to a mistake in the user's query or an error in Genie's interpretation, but always an error.
In the cases where we identified a user error, situations included requests to filter by a non-existent key or to filter by a non-existent date.
In such cases, I would like Genie to return a textual response, helping the user understand the error in their query.
I have tried various approaches to instruct Genie to perform in this way but have not been successful.
Do you have any recommendations on how to configure Genie to never return an empty table and, in cases where an empty table would be returned, to instead prompt the user to reformulate their query?
- Labels:
-
Genie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ12-04-2024 07:30 PM - edited โ12-04-2024 07:31 PM
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.
![](/skins/images/582998B45490C7019731A5B3A872C751/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/582998B45490C7019731A5B3A872C751/responsive_peak/images/icon_anonymous_message.png)