View a markdown version of this page

Step 4: Examine how the answer was built - AWS Context

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

  1. 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, by nodeId. In this example, the citations point to the orders and customers tables and their user_id columns.

    • retrievedContext – The content that AWS Context retrieved, such as the description and columns of the orders table.

  2. 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___TraverseAgentContext with the table’s nodeId, a direction (OUTGOING, INCOMING, or BOTH), and a depth of up to 3 hops. One hop out from the orders table returns its nine columns, the glossary terms that it’s tagged with, and its table profile.

  3. 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.