🗒️跟着吴恩达学AI多智能体-2/17-AI智能体
00 分钟
2024-5-25
2024-6-29
type
status
date
summary
slug
tags
category
password
URL
icon
😀
这里写文章的前言: 一个简单的开头,简述这篇文章讨论的问题、目标、人物、背景是什么?并简述你给出的答案。
可以说说你的故事:阻碍、努力、结果成果,意外与转折。
 
 

课程内容

notion image
你可能已经了解大语言模型(LLMs)了吧?它们有各种不同的形态和大小,有许多不同的供应商,例如OpenAI、Hugging Face等。LLMs的作用是预测最可能的下一个词语。如果你尝试与这些LLMs聊天,你会发现你需要不断地给出反馈,以确保通过与你和模型的互动,获得所需的结果。
notion image
让我们用ChatGPT来看看这种互动是如何进行的,以及为什么使用智能体会更好。在这个例子中,我们让ChatGPT帮助我们为Crew AI创建一个营销文案,这是一个用于查看AI智能体的平台。ChatGPT开始编写文案,但结果太长,不适合在Instagram上使用。于是我们给出反馈,让它简化文案。你会发现,通过用户和LLM的反复互动,可以得到更好的结果,但这种互动也可能成为一个障碍,需要你不断参与其中,而不能自由处理其他工作。
notion image
AI智能体可以打破这种局限,使LLM能够自主操作。这是因为LLMs经过大量文本训练,理解文本并具有一定的认知能力,能够合理反应。通过这种方式,你可以让LLM回答问题,并在问答过程中自行优化答案,直到生成令人满意的结果。这个过程中,智能体能够自主思考和优化答案。
notion image
让智能体更加强大的关键在于其使用工具的能力,其他框架可能称之为技能或能力。这使得智能体能够与外部世界互动,如调用API、发布信息或收集数据点等。
notion image
多智能体系统在单个智能体行为的基础上发展起来,其中不仅仅是一个智能体,你可以有多个智能体相互协作。每个智能体可以专注于一个特定任务,例如一个智能体负责研究,另一个负责写作。这种方式不仅能让各个智能体更专注高效地完成任务,还能使用不同的LLMs来提升整体效果。
notion image
在这门课程的所有示例中,我们将使用一个名为Crew AI的开源框架。Crew AI将这些概念分解为非常简单的结构,提供了一种模式来组合这些系统,提供许多现成的工具和技能,并且可以构建自定义工具或智能体。此外,Crew AI还提供了一个将这些智能体投入生产的平台。
notion image
在下一课的开始,我们将深入探讨智能体、任务和团队的构建模块,并构建我们的第一个多智能体系统。如果你对这些示例感兴趣,请继续关注,因为接下来会更加精彩。通过这门课程,你将能够自动化生活和工作中的部分任务,解锁更多潜力。我会全程指导你,希望能在下一课见到你。
 

原文字幕

So you probably know LLMS, right? They come with all those different shapes and sizes and forms, and there's a bunch of different vendors. You have open it up, you have Hugging Face, you're having a drama, you have a bunch of different options to tap into this. And what those LMS do is predict the most likely next token. What happens is if you try to chat with some of these LLMS, you're going to quickly realize that you're going to end up having like a regular prompting experience, similar to one you get with ChatGPT, where you kind of got to give feedback to it to make sure that through the interactions between you and this LM, you get the results that you need.
{ 0:53 }
All right, so let's use ChatGPT for a second to see how exactly does that interaction works and why it could be better if we use it agents. So in this case, let's ask ChatGPT to help us create a marketing copy for Crew AI, a platform for viewing AI agents. So in here, you can see that as regular ChatGPT is going to start to write it down, what should be this copy, But it turns out to be too long. I don't necessarily want something this long. I want to make sure that it's a smaller something that I can maybe use on an Instagram post or whatever it might be. So now I get the chance to provide some feedback and say like, hey, this is too long. Let's summarize in So once that you say that, you can see that it starts to get better. But the only reason why we can get not only GPT but any LLM to get better results is true interaction, right?
{ 1:56 }
Is the iteration between the user and the LLM and the feedback that you provided to it that allow it to kind of correct its wrongs and get better results. So what you quickly realize here is that through the interactions, you can get better results, but you quickly become a blocker. You got to be in there. They're kind of like answering these questions and interacting with it in order to get good results. So it's not a free new web to do other work. It's just like enhancing you. But AI agents actually can break up that and allow you to do other work while allowing the LLM to operate autonomously. And the reason why we can do that is that because these LLMS were trained in so much text and they understand text, they create a state where they kind of have cognition. And by that I mean that they can reasonably react. They can choose between A&B and left and right because they can put words together in a way that makes sense.
{ 2:54 }
So when you achieve that state, if you can have the LLM to kind of answer some questions and an agent is born. So the agent is born when you get this LLM to engage in their thinking process throughout it asks questions and answer the same questions itself to the point that it can move on and get a better by itself. So once that you get into that stage, it allows you to pass a task into this agent. And throughout this thinking process, this agent can then come up with a better answer. It's not the first answer that it would have given you, but it can then think through and optimize the answer up to the point that satisfies itself and then spits it out. But there is one thing missing here, a big component that makes this agent super powerful, and that's the ability to use tools. Other frameworks might call them SKUs or capabilities, but what they allow you to do is to your agent to interact with the external world.
{ 3:59 }
It allows your agent to do more things that doesn't necessarily would be able to do itself. It could be calling an API, it could be posting something, it could be gathering A at a point, whatever that might be. And this this is a fully fledged agent. So let's talk real quick about what are multi agent systems. So multi agent systems grow on top of the agent behavior that we just described, where instead of having just one agent, you can now can have multiple of them. So whenever you task an agent with something, this agent can also task another agent with another task and in the end you get one single final answer. But you might be wondering what are the benefits of having that instead of having one single agent? Well, I will name a few, but we're going to dig into that in further lessons.
{ 4:56 }
The first thing here is that you can have each agent be customized to do one single thing and do it well. You can have one agent, for example, being a researcher and another agent being a writer. So that allows your agent that is a researcher to focus on doing one thing and making sure that it finds all the sources that check all the sources that include all the sources and your writer just use that in order to create the most amazing material ever. And the other good thing is that because you have multiple agents, you can have them run from different LLMS. So you can have your researcher running on gamma tree while your writers running on GPT 4. You can also have your own fine-tuned version model powering summing of those agents.
{ 5:41 }
So you can see how multi agent systems can be so much more powerful than single agents because allows you to get very focused agents that will be able to achieve better results than if they're trying to do everything themselves, while also tapping into this ability to use different models from different sources. And we could keep going even one step further where you can actually say, well, now I want multiple, multiple agents, but this is getting to matter. So let's just step back for a second and let's first build our first multi agent system. For all the examples in this course, we're going to be using a super powerful framework. It's called Crew AI and it's open source. It's simple and it's designed for production use cases. It also offers a platform to bring your agents into production. But all the concepts that we're going to discuss here apply to all major frameworks out there. Before we jump into examples, let's talk about what is Crew AI. I want to take a solid moment to describe why all of the options that we have out there, we are using Query AI on this course. Query AI is a framework and a platform, and there's a few things that it offers that makes it super easy and super meaningful for us.
{ 6:59 }
The first thing is it breaks all these concepts into very simple structures, so it makes super simple for you to pick up on them. The second one is that it provides a pattern to put these systems together, so you don't need to think about how you're going to string out of this because it already kind of offers you an opinion on that. The third thing is that it provides many tools and skills that are ready to be used and we are going to use them throughout the course. And the 4th one is that it gives you a model to build custom tools or agents. In some of our lessons, we're going to get to build some of those custom tools, and you're going to see how helpful that is. And also as a final touch point, it also offers a platform for bringing these agents into production. So whatever you're building throughout this course, you're going to be able to also deploy in production through the Query AI platform if you choose. So all right, so let's start looking at some of our initial building blocks, in this case, agents, tasks and crews.
{ 7:58 }
We're going to be diving into those and building our first multi agent system at the beginning of our next lesson. So if you like what you heard so far, if you got excited about any of the examples that you mentioned, I recommend you to stick around because things are only going to get more interested from here on. And there's so much they're going to be able to build with AI agents that I promise that they're going to be impressed by the end of this course. It's going to allow you to automate parts of your life, automate parts of your job, and honestly unlock a lot of potential. So I hope you stick around for our next lesson where we're going to actually build our first agent systems ourselves. And I'm going to guide you throughout the way. So thank you so much. And I see you in the next lesson.
💡
有关Notion安装或者使用上的问题,欢迎您在底部评论区留言,一起交流~
上一篇
跟着吴恩达学AI多智能体-3/17-创建多AI智能体
下一篇
跟着吴恩达学AI多智能体-1/17-课程总览