Bird
0
0

What is wrong with this pipeline step addition?

medium📝 Debug Q7 of 15
Agentic AI - Real-World Agent Applications
What is wrong with this pipeline step addition?
agent.add_step('analyze', function=analyze_data())
AThe function is called immediately instead of passing the reference
BStep name must be a number, not a string
CMissing parentheses after add_step
DFunction name should be a string, not a function
Step-by-Step Solution
Solution:
  1. Step 1: Understand function passing

    Functions should be passed by reference without parentheses to avoid immediate execution.
  2. Step 2: Identify the error

    Using analyze_data() calls the function immediately instead of passing it as a step.
  3. Final Answer:

    The function is called immediately instead of passing the reference -> Option A
  4. Quick Check:

    Pass function reference, not call [OK]
Quick Trick: Pass function without () to add steps [OK]
Common Mistakes:
  • Calling function instead of passing reference
  • Confusing step name types
  • Missing method parentheses

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes