Bird
0
0

Given this code snippet tracing an agent's reasoning:

medium📝 Predict Output Q13 of 15
Agentic AI - Agent Observability
Given this code snippet tracing an agent's reasoning:
trace = agent.start_trace()
result = agent.answer('What is 2 + 2?')
steps = trace.get_steps()
What will steps contain?
AAn error because get_steps() is not defined
BA list of reasoning steps the agent took to answer 'What is 2 + 2?'
CThe final answer only, e.g., 4
DAn empty list because tracing was not started
Step-by-Step Solution
Solution:
  1. Step 1: Understand the tracing process

    Starting trace records the agent's reasoning steps during the answer process.
  2. Step 2: Analyze what get_steps() returns

    get_steps() returns the list of recorded reasoning steps, not just the final answer or an error.
  3. Final Answer:

    A list of reasoning steps the agent took to answer 'What is 2 + 2?' -> Option B
  4. Quick Check:

    get_steps() = reasoning steps list [OK]
Quick Trick: get_steps() returns all reasoning steps, not just final answer [OK]
Common Mistakes:
  • Thinking get_steps() returns only the final answer
  • Assuming get_steps() causes an error
  • Forgetting to start tracing before calling get_steps()

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes