You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I just wanted to give some opinions on where Tools fit in the hierarchy of objects.
I think that the Tool object and the 'tool' decorator tool are some of the coolest parts about LangChain because they can make any function usable by an LLM really easily. This is one of the things that drew me to LangChain in the first place. However, I think that where they fit in the hierarchy of objects doesn't align well with how I think they function.
In the OpenAI API you can input tools directly into a create/predict call, so to me it seems that a Tool should exist at the same level as a ChatModel or an LLM. In a way you can think of a Tool as a special type of message or prompt that goes directly into an LLM when you make a call. However, in LangChain, the Tool type is defined at the level of Agents, which are several layers of abstraction above the LLMs. In fact you don't even learn about tools in the tutorial until after an Agent is defined and you import Tool from langchain.agents. This to me seems like a mistake.
I think it would be better if we treated a Tool as a low level object that could be directly input into LLMs rather than high level objects that are only usable by Agents. I have a strong feeling that function calls are going to be a widely used feature across new models that come out so it seems like it will be more convenient to make tools and function calls easy at the lowest level.
Anyway I am by no means an authority on this, I just want to give my thoughts and start a discussion around this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello I just wanted to give some opinions on where
Tool
s fit in the hierarchy of objects.I think that the Tool object and the 'tool' decorator tool are some of the coolest parts about LangChain because they can make any function usable by an LLM really easily. This is one of the things that drew me to LangChain in the first place. However, I think that where they fit in the hierarchy of objects doesn't align well with how I think they function.
In the OpenAI API you can input tools directly into a create/predict call, so to me it seems that a Tool should exist at the same level as a ChatModel or an LLM. In a way you can think of a Tool as a special type of message or prompt that goes directly into an LLM when you make a call. However, in LangChain, the Tool type is defined at the level of Agents, which are several layers of abstraction above the LLMs. In fact you don't even learn about tools in the tutorial until after an Agent is defined and you import
Tool
fromlangchain.agents
. This to me seems like a mistake.I think it would be better if we treated a Tool as a low level object that could be directly input into LLMs rather than high level objects that are only usable by Agents. I have a strong feeling that function calls are going to be a widely used feature across new models that come out so it seems like it will be more convenient to make tools and function calls easy at the lowest level.
Anyway I am by no means an authority on this, I just want to give my thoughts and start a discussion around this.
Beta Was this translation helpful? Give feedback.
All reactions