Skip to content

System Prompt for Bedrock Agent being ignored

0

There is this information mentioned in the bedrock agent: To optimize agent performance, the agent doesn't use instructions if all of the following conditions are true: This agent has no action groups There is only one Knowledge Base associated to this agent No advanced prompts are overridden User input and code interpreter are disabled Multi agent collaboration is disabled If any of the above conditions is false, the agent will use the instructions

Now when I make all of these above conditions True, according to this information my agent should not use the system prompt but when I check the traces, I can see that my agent is using the system prompt. Why and is this normal behaviour or is my interpretation of the statement incorrect.

asked a year ago615 views

2 Answers
0

Your interpretation of the statement is correct, but there's an important distinction to understand about what's happening.

When all the conditions you listed are true (single knowledge base, no action groups, default prompts, disabled user input, etc.), the agent enters an optimized performance mode. In this mode, the agent instructions (system prompt) are technically not "honored" or fully applied in the traditional sense, but they aren't completely ignored either.

What's happening is that the agent is using a streamlined flow optimized for simple knowledge base queries. You may still see your system prompt appearing in the traces because the system is still processing it as part of the request, but the agent's behavior is primarily driven by the optimized flow rather than following all the nuances of your custom instructions.

This optimization is specifically designed for simple use cases with a single knowledge base to improve latency. If you need the agent to strictly follow your custom instructions, you would need to change at least one of the conditions - for example, by overriding an advanced prompt, adding another knowledge base, or enabling an action group.

If you need precise control over the agent's behavior, including how it responds when information isn't found in the knowledge base, you should consider disabling this optimization by changing one of the conditions.
Sources
Customize agent for your use case - Amazon Bedrock
How to modify or disable the fall back message of the bedrock agent. | AWS re:Post
Optimize performance for Amazon Bedrock agents using a single knowledge base - Amazon Bedrock

answered a year ago

0

Hi There,

Thank you for reaching out to AWS Premium Support,

With regards to System Prompting / Agent Instructions,

  • The system isn't completely ignoring the instructions.
  • Rather, it's using a streamlined flow where the instructions are processed but not fully "honored" in the traditional sense.
  • This is done to optimize performance for simple knowledge base queries.

Should you want the Agent to follow strict instruction, you may do the following:

  • Change at least one condition (e.g. add action group, enable another knowledge base).
  • This will disable the optimization and ensure full instruction adherence.

For additional support, kindly log a support case and we will have a closer look at your environment and review accordingly.

AWS

answered a year ago

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.