Step 4: Examine how the answer was built
Every answer from AWS Context includes the context that it used, so you can check where each claim came from.
To examine the answer
-
Ask your agent to show the raw response from the tool call, or expand the tool result in Claude Code. The response contains:
-
answer– The text of the answer. -
citations– For each part of the answer, the entities that support it, bynodeId. In this example, the citations point to theordersandcustomerstables and theiruser_idcolumns. -
retrievedContext– The content that AWS Context retrieved, such as the description and columns of theorderstable.
-
-
To follow the relationships around one of the cited entities, ask your agent to traverse from it. For example:
Traverse the agent context from the orders table and list its columns.The agent calls
context___TraverseAgentContextwith the table’snodeId, a direction (OUTGOING,INCOMING, orBOTH), and a depth of up to 3 hops. One hop out from theorderstable returns its nine columns, the glossary terms that it’s tagged with, and its table profile. -
To see every step that AWS Context took, ask the same question in the console. On the agent-context-sample page, choose Chat with context, select Details, and then review the steps, the SQL, and Trace details.