Bird
0
0

Given this code snippet tracing an agent's reasoning chain:

medium📝 Predict Output Q4 of 15
Agentic AI - Agent Observability
Given this code snippet tracing an agent's reasoning chain:
trace = agent.start_trace()
result = agent.run('Calculate sum of 2 and 3')
print(trace.get_steps())

What will the output of trace.get_steps() most likely show?
AA list of reasoning steps the agent took to calculate the sum
BThe final sum value 5
CAn error because get_steps() is not a valid method
DThe agent's configuration settings
Step-by-Step Solution
Solution:
  1. Step 1: Understand what get_steps() returns

    It returns the detailed reasoning steps recorded during the agent's run.
  2. Step 2: Differentiate output types

    The final sum is in 'result', not in trace steps; no error expected if method exists.
  3. Final Answer:

    A list of reasoning steps the agent took to calculate the sum -> Option A
  4. Quick Check:

    trace.get_steps() = reasoning steps [OK]
Quick Trick: trace.get_steps() shows reasoning steps, not final result [OK]
Common Mistakes:
  • Confusing trace output with result
  • Assuming method does not exist

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes