Repository navigation
How to disable knowledge base source citations in Bedrock Agent responses #4621
Replies: 2 comments
|
There isn't a boto3 client-side switch in One useful distinction is where you're seeing them. If you're reading the structured So I wouldn't expect a retrieval configuration parameter to solve this. Keep retrieval/citation data available internally if useful, and make the UI/output layer decide whether to display the structured citations. |
|
Thanks @zhang2645795251 for spelling out the exact The lever is on the agent build side, not in
Offline check with boto3/botocore 1.40.76 (no credentials, bedrock_agent.update_agent(
agentId=..., agentName=..., agentResourceRoleArn=..., foundationModel=...,
promptOverrideConfiguration={"promptConfigurations": [{
"promptType": "ORCHESTRATION",
"promptCreationMode": "OVERRIDDEN",
"promptState": "ENABLED",
"basePromptTemplate": template, # the default template for your model, minus the <sources> guideline line
}]},
)
bedrock_agent.prepare_agent(agentId=...)Caveats and where this comes from
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello AWS Bedrock Team,
I'm working with Amazon Bedrock Agents and have encountered an issue where I need to remove knowledge base source citations (such as
<sources>tags or attribution information) from the agent's responses.Current Situation:
When my agent responds to queries using information from a connected knowledge base, it automatically includes source citations (like document references or
<sources>tags) in the output. While this is useful in some cases, I need to disable this feature for certain use cases where I want to present only the clean answer without any source attribution.What I've Tried:
I've attempted configuring the
sessionState.knowledgeBaseConfigurationsparameter in theinvoke_agentAPI call, focusing on theretrievalConfigurationsettings. Here's a simplified version of my configuration:However, this still results in source information being included in the response.
Questions:
Is there an official way to disable knowledge base source citations in the agent's responses?
Are there specific parameters or configurations in the invoke_agent API that control the inclusion of source information?
If this feature isn't currently available, are there any workarounds or plans to support it in future releases?
I've reviewed the Boto3 documentation for AgentsforBedrockRuntime but couldn't find explicit information about controlling source citations.
Any guidance or clarification would be greatly appreciated!
Thanks
All reactions