I have been struggling to get to the root of this exception for last couple of days.
My input works perfectly fine when I try it in bedrock agent console test. As soon as I start using the typescript bedrock-agent runtime SDK, I start getting this exception. There's hardly any details on what validation failed. Can someone please help me out here? How do I debug this?
Here's the prompt I'm using while calling the agent from code:
`Generate a friendly and polite response to the query within <query> and </query> tags. After you get a response from the knowledge base for the query, use the information for context in json format within <info> and </info> tags to enrich the response.\n<query>\n${query}\n</query>\n<context>\n${applicationData}\n</context>`
And here's my prompt-template direction in the agent orchestration step:
Human: The user input has two parts. One is the question within the tags <query></query>. This question should be the query to be sent to knowledge base. The second part is the contextual information to respond with a more personalised answer. This contextual information will be within the tags.<context></context>. Both <query> and <context> tags will be inside of $question$. <question>$question$</question>