Create Custom Tools for Chatbots in LangChain — LangChain #8

preview_player
Показать описание
Agents are one of the most powerful and fascinating approaches to using Large Language Models (LLMs). The explosion of interest in LLMs has led to agents becoming incredibly prevalent in AI-powered use cases.

Using agents allows us to give LLMs access to tools. These tools present an essentially infinite number of possibilities. With tools, LLMs can search the web, do math, run code, and much more.

The LangChain library provides a substantial selection of prebuilt tools. However, in many real-world projects, we'll often find that there are no tools that quite fit our requirements. Meaning we must modify existing tools or build entirely new ones.

In this video, we will explore how to build custom tools for agents in LangChain.

📌 Code Notebook:

🌲 Pinecone article:

👋🏼 NLP + LLM Consulting:

🎙️ Support me on Patreon:

👾 Discord:

00:00 LangChain agents and tools
01:46 What are LLM tools
03:12 Code notebook setup and prerequisites
05:58 Building a simple LangChain calculator tool
05:50 Initialize the conversational agent
10:08 Updating agent prompts
12:14 Building tools with multiple parameters
15:40 Helping ChatGPT understand images
23:05 What else can LangChain agents do

#artificialintelligence #langchain #openai #nlp
Рекомендации по теме
Комментарии
Автор

Perfect video, thank you so much. Anyone making use of langchain should watch this video to see the opportunities and how easy and simple it is to implement.

alperakbash
Автор

Thank you for all the insight. I have watched quite a few of your appearances across the web dealing the AI memory spectrum etc and just wanted to say thanks for your work in this matter 😃

jidun
Автор

This is SOOO cool. Can't wait to get going with this. Integrating this even with home automation APIs would be epic

code-grammardude
Автор

Such a freaking coincidence!! I was working on making a custom tool myself and was getting stuck and here you are with a video dedicated to it. Its my lucky day! Thanks a lot!!

rhiteshkumarsingh
Автор

Super interesting, and now a lot of videos dive that deep! Thanks James, really appreciate it.

mysticaltech
Автор

AMAZING work. Can't wait to build something incredible with this.

subodh.r
Автор

Thank you so much. Your videos are invaluable!
Please more content about LangChain, agents, tools, and everything around this topic.

ptim
Автор

Thanks a lot for your work James. It has been really useful for me.

nicolasstegmann
Автор

This is amazing James! Thanks for sharing so much. This open a very big door for me and the exploration I'm currently working on using AI models

initgod
Автор

Appreciate your work - you're a great teacher.

robxmccarthy
Автор

really fascinating to see how AI agents can be integrated with custom tools for language models. Your Jupyter Notebook tutorial was super helpful and I appreciate the time and effort you've put into creating this content.

As a beginner, I'm finding it a bit challenging to deploy these AI chatbots, especially when it comes to integrating them with a GUI, like React or other tools. I would love to see a video on that topic, as I believe it would be beneficial for many of us who are new to this field. Thanks again for the amazing content, and I look forward to learning more from your future videos!

mikemansour
Автор

Great videos! I would love to see a video on different agent types. This area is not covered that well out there but that seems to be the biggest difference between different awesome systems that are coming out like baby GPT and hugging GPT. I'd love to know how to plug & play them and what exactly is the difference between them.

dusanbosnjakovic
Автор

really fascinating to see how AI agents can be integrated with custom tools for language models. Your Jupyter

emanahmed
Автор

I love your content and have learned so much from your work. And those shirts...!! I love the collection. 🏅

crisgath
Автор

Hey James, thank you very much for your videos :)
They really helped me to get a basic understanding in the ever evolving GPT jungle, keep it up!

But I also have a Video request:
Could you explain how these Tools/Agents work behind the scenes? Like:
- What is the final prompt that is issued to the GPT (with available tools, formatting etc.)
- What is the answer from the GPT?
- How is the answer parsed to identify that a tool should be used
- How are the tool parameters extracted from the GPT answer and given to the actual Python code
- How is the answer given back?
- Maybe, how could you make it so certain Agents talk to each other before returning to the main GPT prompt?

It looks like the GPT is instructed to indicate tool usage by using json format? But I'm not sure.
Maybe an in-depth explanation would help clear the fog for me (and possibly some others)
Thanks! :)

Evox
Автор

Thanks for the info, on image captioning, why are we plugging it into the LLM, what does the LLM bring on?

AI_Financier
Автор

Very kind intro to tools, now I know how I'll release mine : would there be like a pypi repo for langhcain tool ?

AdrienSales
Автор

Regarding tools with multiple inputs, if not enough inputs are initially provided, can the chat agent ask the human to supply more info?

magick
Автор

Can we stack agent on top of each other just like agent as a tool ? Please suggest

peterball
Автор

This is one of the most useful videos I have seen on AI.
*I had an error with latest version of LangChain, but this solved it:
pip install --force-reinstall -v langchain==v0.0.147

One thing that I am thinking is to be able to accept lightning payments per search, eg micropayments of Satoshis per search to make a public facing site.

lordmelbury