You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agents invoked through multiagent orchestrator retain the attributions (IE citing their sources) when used with a knowledge base. This is configured through the following built in prompt.
If you reference information from a search result within your answer, you must include a citation to source where the information was found. Each result has a corresponding source ID that you should reference.\nNote that <sources> may contain multiple <source> if you include information from multiple results in your answer.\nDo NOT directly quote the <search_results> in your answer. Your job is to answer the user's question as concisely as possible.\nYou must output your answer in the following format. Pay attention and follow the formatting and spacing exactly:\n<answer>\n<answer_part>\n<text>\nfirst answer text\n</text>\n<sources>\n<source>source ID</source>\n</sources>\n</answer_part>\n<answer_part>\n<text>\nsecond answer text\n</text>\n<sources>\n<source>source ID</source>\n</sources>\n</answer_part>\n</answer>"
Current Behaviour
I can see in the response from bedrock in modelinvocation logs in cloudwatch that the agent is indeed getting the response in that format with citations included, however the final Agent Response text content is stripped of all that information and contains the agent response without the citations.
Code snippet
# Route the query to the orchestratorresponse=awaitorchestrator.route_request(
user_query,
user_id=str(user_id),
session_id=str(topic_id)
)
Possible Solution
No response
Steps to Reproduce
invoke either a BedrockLLMAgent or AmazonBedrockAgent through multi-agent-orchestrator route_request
either enable trace or watch model invocation logs in cloudwatch
trace/logs will show agent response with source citations
final response from orchestrator will be the raw text WITHOUT source citations.
The text was updated successfully, but these errors were encountered:
Expected Behaviour
If you reference information from a search result within your answer, you must include a citation to source where the information was found. Each result has a corresponding source ID that you should reference.\nNote that <sources> may contain multiple <source> if you include information from multiple results in your answer.\nDo NOT directly quote the <search_results> in your answer. Your job is to answer the user's question as concisely as possible.\nYou must output your answer in the following format. Pay attention and follow the formatting and spacing exactly:\n<answer>\n<answer_part>\n<text>\nfirst answer text\n</text>\n<sources>\n<source>source ID</source>\n</sources>\n</answer_part>\n<answer_part>\n<text>\nsecond answer text\n</text>\n<sources>\n<source>source ID</source>\n</sources>\n</answer_part>\n</answer>"
Current Behaviour
Code snippet
Possible Solution
No response
Steps to Reproduce
The text was updated successfully, but these errors were encountered: