cancel
Showing results for 
Search instead for 
Did you mean: 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Lang Chain Agents

SandipCoder
New Contributor II

This is regarding Agentic framework. We are getting issues while invoking the lang chain agent and need your help to get some suggestions from your expert team to resolve this.

As per our observation Agent is behaving bit weird while calling tools registered in UC :

Code Snippet :

prompt = get_prompt()

tools = get_tools()

agent = create_openai_tools_agent(llm, tools, prompt)

agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

agent_str = ({ "messages": itemgetter("messages")} | agent_executor | itemgetter("output") | StrOutputParser())

 

  1. If the user prompt/demands can be fulfilled with invoking a single tool  ( successful )

SandipCoder_0-1736512522115.png

2. But if the user input demands chaining of tools to be invoked ,sometimes it’s throwing the following error. ( Error )[ But in some run the same code is working and returning valid output]

SandipCoder_1-1736512522122.png

Cluster Used :

  1. ML Cluster runtime 15.4
  2. SQl Warehouse
Sandip Bhowmick
1 REPLY 1

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @SandipCoder,

About point 2, is it working intermittently or failing all the time?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group