Inject context to Bedrock Agent prompts dynamically

0

I am building a service that can generate SQL query dynamically through AWS Bedrock Agent. To generate a proper SQL, I must feed table schemes to the agent. There are various different table schemes in different scenario and I don't want to feed all the schemes to the agent. Also schemes changes all the time, so it is not practical to feed the schemes whenever them changed. My current method is putting the schemes in the inputText field with the real questions when invoking the agent. But I think it might be not a good practice because the inputText appears in the <question> tag in the default prompt template and the schemes are not parts of the question. I think putting context in the <question> tag might not be a good idea because it may mess up the prompt. I am wondering is there any approach that I can feed the schemes dynamically whenever invoking the agent?

Eric
asked 14 days ago722 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions