Bird
0
0

What will happen if a ReAct agent is initialized without specifying agent_type in LangChain?

medium📝 Predict Output Q5 of 15
LangChain - Agents
What will happen if a ReAct agent is initialized without specifying agent_type in LangChain?
AIt automatically uses ReAct agent behavior
BIt defaults to a standard agent, not ReAct behavior
CIt throws a syntax error immediately
DIt disables all tools and returns None
Step-by-Step Solution
Solution:
  1. Step 1: Understand default agent_type behavior

    Without specifying agent_type, LangChain uses a default agent type.
  2. Step 2: Identify what default means for ReAct

    The default is not ReAct, so ReAct-specific behavior is not enabled.
  3. Final Answer:

    It defaults to a standard agent, not ReAct behavior -> Option B
  4. Quick Check:

    Missing agent_type means default agent used = C [OK]
Quick Trick: Always specify agent_type='react' for ReAct agents [OK]
Common Mistakes:
MISTAKES
  • Assuming automatic ReAct behavior
  • Expecting syntax errors
  • Thinking tools get disabled

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LangChain Quizzes