- Newest
- Most votes
- Most comments
How about this:
-
Use Advanced Prompt Templates Customize the agent’s behavior by editing the orchestration prompt: • Instruct the agent to only respond using knowledge base content • Add a fallback message like: "If no relevant information is found in the knowledge base, respond with: 'I'm sorry, I don't have information on that topic.'" You can do this via the Advanced Prompts feature.
-
Disable Default Model Knowledge To prevent the agent from using its own model knowledge: • Ensure the agent is in Focus Mode • Use only one knowledge base • Avoid enabling user input outside the KB context • Do not include action groups unless necessary This setup ensures the agent relies solely on the KB and not its general model knowledge.
-
Customize Fallback Behavior in Orchestration Strategy You can define fallback behavior in the orchestration strategy: • Set a condition: If KB returns no results → trigger fallback response • This can be done by modifying the orchestration flow or using session state attributes to track KB hits
https://docs.aws.amazon.com/bedrock/latest/userguide/agents-customize.html
Hello,
Thank you for your query regarding the customization of your Bedrock agent's response behavior. I understand you want to ensure the agent only responds based on your configured knowledge base and provides a controlled fallback message when information isn't found. Please correct me if I have misunderstood any aspect of your requirement.
Here are the detailed steps to help you achieve this:
-
Use Advanced Prompt Templates
- You can precisely customize your agent's behavior by editing the orchestration prompt
- This allows you to:
- Instruct the agent to strictly respond using knowledge base content only
- Define a specific fallback message (e.g., "I apologize, but I don't have information about that topic in my knowledge base.")
- These modifications can be implemented through the Advanced Prompts feature in your agent configuration
-
Disable Default Model Knowledge For ensuring the agent strictly adheres to your knowledge base:
- Enable Focus Mode on your agent
- Configure with a single knowledge base
- Avoid enabling user input outside the knowledge base context
- Keep action groups minimal unless specifically required
-
Customize Fallback Behavior Within the orchestration strategy, you can:
- Set specific conditions for fallback responses
- Configure the system to trigger your custom fallback message when no knowledge base results are found
- Implement this through orchestration flow modifications or by utilizing session state attributes
These solutions should give you full control over your agent's responses while maintaining a professional interaction with your users.
Is there anything specific about any of these approaches you'd like me to elaborate on?
Have an AWSome day!
References [1] https://docs.aws.amazon.com/bedrock/latest/userguide/agents-customize.html
answered a year ago
Relevant content
asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
