Skip to content

[FEATURE] Agentic Search: Imporve exception handling in Query Planning Tool #4359

@rithin-pullela-aws

Description

@rithin-pullela-aws

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?

  1. 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
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions