-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Is your feature request related to a problem?
The LLM can sometimes produce an invalid JSON or invalid OpenSerarch Query. These will cause OpenSearch Exceptions when run against OpenSearch and the exception reason itself is not sent to the users.
The exceptions should be handled in a better way.
If the JSON produced in invalid, we are returning a default Query currently, this is a silent exception, rather it should thrown an exception with a reason which will be handled by Neural Search.
What solution would you like?
- When there is no valid JSON found, raise a 400 level exception with details about failure to be handled by Conversational Agent and Neural Search for flow agents
- After extracting the JSON validate it by executing the search. If it responds in an error we should throw 400 level exception with details about failure.
What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.
Do you have any additional context?
Add any other context or screenshots about the feature request here.