QuestionQ89

Application Development

A Generative AI Engineer uses LangGraph to define multiple tools within a single agentic application. They want the main orchestrator LLM to independently determine which tools are most appropriate to call for a given prompt. To accomplish this, they must identify the general code flow.

Which sequence accomplishes this?

  • A
    1. Define or import the tools 2. Add tools and LLM to the agent 3. Create the ReAct agent
  • B
    1. Define or import the tools 2. Define the agent 3. Initialize the agent with ReAct, the LLM, and the tools
  • C
    1. Define the tools 2. Load each tool into a separate agent 3. Instruct the LLM to use ReAct to call the appropriate agent
  • D
    1. Define the tools inside the agents 2. Load the agents into the LLM 3. Instruct the LLM to use CoT reasoning to determine the appropriate agent
Explanation

A ReAct agent is initialized with an LLM and a collection of defined or imported tools. The model is thereby given the tools it may call and can select the appropriate one during the agent loop. LangGraph’s current documentation shows the equivalent pattern: define tools and provide them with the model when creating the agent.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!