How I Made AI Assistants Do My Work For Me: CrewAI

Maya Akim
15 Jan 202419:21

Summary

TLDRIn this insightful video, the presenter explores the limitations of current AI language models, highlighting their reliance on fast, automatic thinking. By introducing innovative methods like 'tree of thought' prompting and custom AI agents, viewers learn how to enhance AI's problem-solving capabilities. The video also demonstrates practical applications, including creating a startup concept and generating content from real-time data sources like Reddit. Ultimately, it showcases the potential of AI in automating tasks while discussing the challenges and costs associated with using advanced models, encouraging experimentation and local model deployment.

Takeaways

  • 😀 System 1 thinking is fast and automatic, while System 2 thinking is slow and rational, as described by Daniel Kahneman in 'Thinking, Fast and Slow.'
  • 🤖 Current large language models (LLMs) operate primarily on System 1 thinking, lacking deep, rational processing capabilities.
  • 🧠 Tree of Thought prompting allows LLMs to consider multiple perspectives for decision-making, simulating rational thinking.
  • 🛠️ Custom agent systems like CreAI enable users to build AI agents that collaborate to solve complex problems.
  • 👥 The tutorial illustrates how to set up a team of AI agents with distinct roles: a marketer, a technologist, and a business development expert.
  • 📊 Each AI agent is assigned specific tasks, and the output from one agent serves as the input for the next, forming a sequential process.
  • 🔍 Enhancing agents' intelligence involves integrating real-time data through built-in tools and custom scraping tools like a Reddit scraper.
  • 📈 The quality of output can vary significantly based on the sources of information used by the agents.
  • ⚙️ Local AI models are explored as alternatives to API calls, with varying levels of performance observed among different models.
  • 💬 Viewers are encouraged to share their experiences with CreAI and other AI tools, fostering a community of knowledge sharing.

Q & A

  • What is the main focus of the video?

    -The video discusses the limitations of current large language models (LLMs) in performing complex problem-solving, and introduces methods to enhance their capabilities by creating teams of AI agents.

  • What are the two types of thinking described in the video?

    -The video describes two types of thinking: System 1, which is fast and automatic, and System 2, which is slow and requires conscious effort. Current LLMs primarily operate using System 1 thinking.

  • What is 'Tree of Thought' prompting?

    -'Tree of Thought' prompting is a method that forces LLMs to consider an issue from multiple perspectives or experts before arriving at a conclusion, simulating System 2 thinking.

  • How does CreAI allow users to build custom AI agents?

    -CreAI enables users, even non-programmers, to create custom agents that can collaborate on complex tasks by utilizing APIs or local models, making the process accessible and flexible.

  • What are the roles of the three AI agents in the startup example?

    -In the startup example, the three AI agents are assigned the roles of a market researcher expert, a technologist, and a business development expert, each with specific tasks to contribute to the business plan.

  • What was the outcome of the business plan created by the AI agents?

    -The business plan included ten bullet points, five business goals, a time schedule, and suggestions for using technologies like 3D printing, machine learning, and sustainable materials.

  • What tools can be added to make AI agents smarter?

    -Users can enhance the intelligence of AI agents by integrating built-in tools that provide access to real-time data, such as text-to-speech capabilities, Google search results, and various APIs.

  • How does the video suggest improving the quality of information generated by AI agents?

    -To improve the quality of information, the video suggests using better sources, such as local subreddits, and creating custom tools for scraping relevant data, thus ensuring the agents produce more accurate and relevant outputs.

  • What were some limitations of the local models tested?

    -The local models faced challenges in understanding tasks effectively, often producing generic outputs and failing to grasp specific instructions, indicating variability in performance among different models.

  • What was the overall conclusion regarding the use of local models versus API models?

    -The conclusion highlighted that while local models can avoid API costs and maintain privacy, they often struggle with task comprehension, and performance varies significantly across different models.

Outlines

00:00

😀 The Dilemma of Decision-Making

In this part, the speaker explores the complex thought processes behind making purchasing decisions, likening it to the concept of 'system two thinking' as discussed in Daniel Kahneman's book 'Thinking, Fast and Slow.' They describe the contrast between 'system one' (fast, subconscious thinking) and 'system two' (slow, deliberate thinking). The speaker emphasizes that current large language models (LLMs) primarily operate on system one thinking, lacking the capability for deep, rational analysis. To address this limitation, they introduce two methods for simulating rational thinking in AI: tree of thought prompting and the use of collaborative AI agent systems like Crew AI. The speaker sets the stage for demonstrating how to build a team of AI agents to tackle complex problems effectively.

05:01

🛠️ Building Your Team of AI Agents

This part outlines the process of creating a team of AI agents using Crew AI. The speaker demonstrates how to set up three specific agents: a market researcher, a technologist, and a business development expert. Each agent is assigned a clear role and goal to analyze and refine a startup concept involving innovative plugs for Crocs. The speaker explains the importance of defining tasks with specific outcomes and how agents collaborate sequentially. After instantiating the team and running the script, they observe results that provide a business plan, emphasizing the potential of AI agents in generating meaningful insights.

10:01

📈 Enhancing AI Agents with Real-Time Data

In this segment, the speaker discusses how to make AI agents smarter by providing them access to real-world data through built-in tools and custom solutions. They illustrate how to implement a Google scraping tool to gather information for a blog about the latest AI and machine learning innovations. Despite achieving the required format for the newsletter, the initial quality of the information is subpar. The speaker emphasizes the need for better data sources and introduces the concept of building a custom Reddit scraping tool to fetch relevant posts and comments from the local llama subreddit, showcasing the effectiveness of their approach.

15:03

🔍 Fine-Tuning AI Outputs with Custom Tools

This part delves into the creation of a custom scraping tool for Reddit to improve the quality of information fed into the AI agents. The speaker explains the code and methodology behind the tool, which compiles data from the subreddit. Despite initial setbacks with various local models, the speaker finds success with a regular llama model that provides meaningful output from the subreddit. They share insights on the performance of different models tested, revealing the challenges faced when working with local AI solutions and the importance of customizing tools to enhance output quality.

💰 Cost-Effective AI Solutions and Performance Insights

In the final part, the speaker reflects on the costs associated with running scripts using various AI models, emphasizing the need for budget-friendly options. They discuss their experiences with different local models, noting that while many failed to produce satisfactory results, some, like the regular llama model, showed promise. The speaker concludes with a summary of their findings, offering guidance on selecting the best-performing local models and inviting viewers to share their own experiences with AI tools. They provide links to their code and further resources for those interested in exploring AI agent systems.

Mindmap

Keywords

💡Aptitude

Aptitude refers to an individual's natural ability or talent to learn or excel in a particular area. In the context of the video, it highlights the importance of recognizing one's strengths and interests, which can guide personal and professional development. For example, the script emphasizes that understanding one's aptitude can lead to more informed career choices and enhance job satisfaction.

💡Learning

Learning is the process of acquiring knowledge or skills through experience, study, or teaching. The video underscores that learning is not just a formal process; it can occur in various environments, including personal experiences and social interactions. The script mentions how continuous learning is crucial for adapting to changing circumstances and improving one's aptitude.

💡Career Development

Career development refers to the ongoing process of managing life, learning, and work in a way that progresses one's career. The video stresses that understanding your aptitude is vital for effective career development, enabling individuals to pursue paths that align with their skills and interests. An example from the script illustrates how individuals who follow their aptitudes tend to achieve greater success and fulfillment in their careers.

💡Personal Growth

Personal growth involves activities that develop a person's capabilities and potential, fostering a sense of self-awareness and identity. The video connects personal growth to the concept of aptitude by suggesting that recognizing and cultivating one’s strengths can lead to enhanced self-esteem and a clearer sense of purpose. The script indicates that personal growth often requires stepping outside of one’s comfort zone and embracing new challenges.

💡Self-Discovery

Self-discovery is the process of gaining insight into one’s character, values, and motivations. The video emphasizes that self-discovery is essential for understanding one’s aptitude, as it helps individuals identify their passions and areas of interest. An example in the script refers to the importance of reflection and exploration in uncovering hidden talents and preferences.

💡Education

Education is the systematic instruction or training to impart knowledge and skills. The video points out that education plays a critical role in shaping an individual’s aptitude by providing the necessary knowledge and skills to thrive in various fields. The script discusses how formal education, combined with self-directed learning, can significantly enhance one’s opportunities for success.

💡Motivation

Motivation is the internal drive that prompts an individual to take action toward achieving a goal. In the context of the video, motivation is closely linked to aptitude, as individuals are more likely to pursue activities aligned with their innate talents. The script includes examples of how finding motivation can lead to perseverance and resilience, particularly in challenging situations.

💡Passion

Passion refers to a strong enthusiasm or interest in a particular subject or activity. The video posits that when individuals engage in activities that resonate with their aptitudes, they often develop a passion for those pursuits. The script provides examples of how following one’s passion can lead to a more fulfilling career and greater overall happiness.

💡Skills

Skills are the abilities acquired through practice, training, or experience. The video makes a distinction between natural aptitudes and learned skills, arguing that while some skills may come easily, others require significant effort to develop. The script highlights that recognizing one’s natural skills can guide effective skill-building and professional development.

💡Adaptability

Adaptability is the ability to adjust to new conditions and changes in the environment. The video stresses the importance of adaptability in today's rapidly changing world, particularly in relation to career paths. The script mentions that individuals who are aware of their aptitudes are better equipped to adapt and thrive in diverse situations.

Highlights

The inner dialogue illustrates the difference between System 1 and System 2 thinking, as described by Daniel Kahneman in 'Thinking, Fast and Slow'.

Current large language models (LLMs) primarily operate on System 1 thinking, providing rapid, automatic responses.

To achieve System 2 thinking, which involves more rational and deliberate processing, two innovative prompting methods have been developed.

The first method, 'Tree of Thought' prompting, encourages the LLM to consider various perspectives before arriving at a consensus.

The second method utilizes platforms like Crew AI to build custom agents that collaborate to tackle complex tasks.

Demonstration of setting up a team of AI agents to refine a startup concept, illustrating the practical application of the discussed methods.

Agents in Crew AI can have specific roles and goals, enhancing the collaborative nature of AI problem-solving.

Using Crew AI, a detailed business plan was generated by three specialized agents, each focusing on different aspects of the startup.

The process of defining tasks for agents is critical, with tasks needing specific descriptions and expected outcomes.

Incorporating real-world data tools into agents can significantly enhance their outputs and overall intelligence.

Implementation of custom tools, such as a Reddit scraper, to gather timely and relevant information for generating content.

A demonstration of how to build a custom tool for scraping the latest Reddit posts highlights the flexibility of AI agents.

Local models were tested to reduce dependency on paid API calls while maintaining privacy and reducing costs.

Different local models showed varying levels of performance, emphasizing the importance of model selection for task completion.

Despite challenges, one local model successfully produced relevant outputs based on Reddit data, showcasing its utility.

The session concluded with a reflection on personal experiences with Crew AI, inviting viewer engagement for shared experiences.

Transcripts

play00:01

have you ever found yourself on the

play00:02

verge of making a controversial purchase

play00:05

just as you're about to click on that

play00:07

buy button an unexpected thought

play00:09

suddenly crosses your mind wait a minute

play00:11

they look a little bit like soy cheese

play00:13

don't they no no no no no they're

play00:15

absolutely beautiful and Kanye West

play00:17

loves them he wears them all the time

play00:19

but if I like things that Kanye likes is

play00:21

that really a good thing okay I need to

play00:22

relax everything is fine and buying

play00:24

these makes me a Visionary a trend

play00:26

Setter do these holes exist for

play00:27

ventilation purposes oh okay time for a

play00:30

break I need to urgently distress from

play00:32

all this thinking with some Pringles

play00:34

wait is you think this like really

play00:37

unhealthy so that inner dialogue you

play00:39

just witness is what Daniel conman

play00:41

author of Book Thinking Fast and Slow

play00:43

calls system to thinking it's a slow

play00:46

conscious type of thinking that requires

play00:48

deliberate effort and time the opposite

play00:51

of that is system one or fast thinking

play00:53

system one is subconscious and automatic

play00:56

for example when you effortlessly

play00:58

recognize a familiar face in a a crowd

play01:00

but why am I talking about this in a

play01:02

video about AI assistance well in order

play01:05

to understand that I have to mention an

play01:07

amazing YouTube video posted by Andre

play01:10

karpati a great engineer at open AI in

play01:13

that video Andre clarifies that right

play01:15

now all large language models are only

play01:17

capable of system one thinking they're

play01:20

like Auto predict on steroids none of

play01:22

the current llms can take let's say 40

play01:25

minutes to process a request think about

play01:28

a problem from various angles

play01:30

and then offer a very rational solution

play01:33

to a complex problem and this rational

play01:35

or system to thinking is what we

play01:38

ultimately want from AI but some smart

play01:41

people found a way to work around this

play01:42

limitation actually they came up with

play01:44

two different methods the first and

play01:47

simpler way to simulate this type of

play01:48

rational thinking is with tree of

play01:51

thought prompting you might have heard

play01:53

of it so this involves forcing the llm

play01:56

to consider an issue from multiple

play01:58

perspectives or from perspectives of

play02:00

various experts these experts then make

play02:02

a final decision together by respecting

play02:05

everyone's contribution the second

play02:07

method utilizes platforms like crew aai

play02:09

and agent systems crei allows anyone

play02:13

literally anyone even non-programmers to

play02:15

build their own custom agents or experts

play02:18

that can collaborate with each other

play02:20

thereby solving complex tasks you can

play02:23

tap into any model that has an API or

play02:26

run local models through AMA another

play02:28

very cool platform

play02:30

and in this video I want to show you how

play02:32

to assemble your own team of smart AI

play02:34

agents to solve tricky complex problems

play02:37

and I'll also demonstrate how to make

play02:39

them even more intelligent by giving

play02:41

them access to real world data like

play02:44

emails or redit conversations and

play02:47

finally I'll explain how to avoid paying

play02:49

fees to companies and exposing your

play02:51

private info by running models locally

play02:54

instead and speaking of local models

play02:57

I've actually made some really

play02:58

surprising discoveries and I'm going to

play03:01

talk about it a little bit later so

play03:03

let's build an agent team I'll guide you

play03:05

through getting started in a way that's

play03:08

simple to follow along even if you're

play03:10

not a programmer in my first example

play03:13

I'll set up three agents to analyze and

play03:15

refine my startup concept okay so let's

play03:18

begin first open vs code and open a new

play03:21

terminal I've already created and

play03:24

activated my virtual environment and I

play03:26

recommend you do the same and once

play03:28

that's done you can actually install

play03:31

crew AI by typing the following in the

play03:34

terminal Next Step will be to import

play03:37

necessary modules and packages and

play03:40

you're going to need an open API key so

play03:43

in this case I'm going to need the

play03:45

standard module and I need to import

play03:48

agent task processing crew from crew AI

play03:51

you can set the open AI as the

play03:53

environmental variable so by default

play03:55

crew AI is going to use GPT 4 and if you

play03:59

want to use use GPT 3.5 you have to

play04:01

actually specify that but I don't think

play04:04

that you're going to get amazing results

play04:06

with 3.5 I actually recommend use GPT 4

play04:10

now let's define three agents that are

play04:13

going to help me with my startup there's

play04:15

no actual coding here this is just good

play04:18

old prompting so let's instantiate three

play04:21

agents like this each agent must have a

play04:24

specific role and I want one of my

play04:27

agents to be a market researcher expert

play04:30

so I'm going to assign it or this

play04:32

specific role also each agent should

play04:35

have a clearly defined goal in my case I

play04:38

want this research expert agent to help

play04:40

me understand if there is a substantial

play04:42

need for my products and provide

play04:45

guidance on how to reach the widest

play04:47

possible target audience and finally I

play04:49

need a backstory for my agent something

play04:52

that's going to additionally explain to

play04:54

the agent what this role what this role

play04:56

is about lastly you can set verbos to

play05:00

True which will enable agents to create

play05:02

detailed outputs and by setting this

play05:05

parameter to true I'm allowing my agents

play05:07

to collaborate with each other so I will

play05:10

save this agent as a marketer and I'm

play05:14

going to do the same for two other

play05:16

agents so overall I I'll have a marketer

play05:20

a technologist and a business

play05:22

development expert on my team of AI

play05:25

agents so once this part is done it's

play05:28

time to Define tasks tasks are always

play05:31

specific and results um in this case it

play05:34

can be let's say a detailed business

play05:37

plan or market analysis for example

play05:39

agents should be defined as Blueprints

play05:42

and they should be reused for different

play05:45

goals but tasks should always be defined

play05:49

as specific results that you want to get

play05:51

in the end and tasks should have a

play05:54

description always something that

play05:57

describes what the task is about

play06:00

and they should also always have an

play06:03

agent that's going to be assigned to

play06:05

every specific test so in my case I want

play06:08

to have three specific tasks my business

play06:11

idea is to create elegant looking plugs

play06:13

for Crocs so this iconic Footwear looks

play06:16

less like Swiss chees I will assign the

play06:20

first task to a marketer agent and this

play06:25

agent will analyze the potential demand

play06:27

for these super cool plugs in advis on

play06:30

how to reach the largest possible

play06:32

customer base another task is going to

play06:34

be given to a technologist and this

play06:37

agent will provide the analysis and

play06:39

suggestions for how to make these plugs

play06:41

and the final task will be given to a

play06:44

business cons consultant who's going to

play06:46

take into consideration everyone's

play06:47

reports and write a business plan now

play06:51

that I have defined all the agents and

play06:53

all the tasks as a final step I'm going

play06:55

to instantiate the crew or the team of

play06:57

Agents I'm going to include all the

play06:59

agents and tasks and I'm going to define

play07:02

a

play07:03

process process defines how these agents

play07:06

work together and right now it's only

play07:09

possible to have a sequential process

play07:11

which means output of the first agent

play07:13

will be the input for the second agent

play07:15

and then that's going to be the input

play07:17

for the third agent and now I'm going to

play07:19

make my crew work with this final line

play07:22

of code I also want to to see all the

play07:26

results printed in the console so that's

play07:29

the most basic possible example and it's

play07:32

the best way to understand actually how

play07:34

crew AI works and I expect these results

play07:37

to be far from impressive I actually

play07:41

believe that the results are going to be

play07:42

just a little bit better than just

play07:44

asking Char with to write a business

play07:47

plan but let's

play07:51

see okay so now I have the results I

play07:54

have business plan with 10 build points

play07:57

I have five business goals and a time

play07:59

schedule and so I should have a 3D

play08:03

printing technology and injection molds

play08:06

laser Cuts apply machine learning

play08:09

algorithms to analyze custom preferences

play08:12

and predict future buying Behavior so I

play08:14

guess this agent really took very

play08:16

seriously my business idea and I even

play08:19

have sustainable or recycled materials

play08:22

that's great so there you go so how to

play08:25

make a team of Agents even smarter

play08:28

making agents smarter is very easy and

play08:31

straightforward with tools by adding

play08:33

these tools you're giving agents access

play08:35

to real world realtime data and there

play08:37

are two ways to go about this first and

play08:39

easier option is to add built-in tools

play08:42

that are part of L train and I will

play08:44

include a link to a complete list of

play08:46

Lang chain tools but some of my personal

play08:49

favorites are 11 Labs text to speech

play08:51

which generates the most realistic AI

play08:53

voices then there are tools that allow

play08:55

access to YouTube and all kinds of

play08:58

Google data and Wikipedia so now I'll

play09:00

change my crew and in this next example

play09:03

I'll have three agents researcher

play09:06

technical writer and writing critic

play09:09

everyone will have their own task but in

play09:11

the end I want to have a detailed report

play09:13

in form of a blog or a newsletter about

play09:15

the latest Ai and machine learning

play09:18

Innovation the blog must absolutely have

play09:21

10 paragraphs it has to have all the

play09:23

names of all the projects tools written

play09:26

in bold and every paragraph has to have

play09:28

a link to the project I'll use Lang

play09:31

chain Google seral tool which will fetch

play09:34

Google search results but first I'll

play09:36

send it for free API key through serer

play09:38

Dev I'm going to include the link to all

play09:40

the code and all the prompts in the

play09:42

description box as usual so let's begin

play09:44

by importing necessary modules and let's

play09:48

initialize Sur API tool with API key so

play09:52

I'll instantiate the tool I'll name the

play09:55

tool a Google scraper tool and I'll give

play09:58

it a functionality which is to execute

play10:01

search queries and along with

play10:04

description to indicate the use case as

play10:07

a last step before running the script I

play10:09

should assign this tool to my agent

play10:12

that's going to run first and once I run

play10:15

the script I can see all the scrape data

play10:17

in blue letters green letters show agent

play10:21

processing this information and white

play10:23

letters are going to be the final output

play10:25

of each agent so this is what my

play10:29

newsletter looks like right now and I

play10:32

have 10 paragraphs as requested each

play10:35

paragraph has a link and around two to

play10:37

three sentences so the form it is fine

play10:40

it's exactly what I was looking for but

play10:42

there is a big problem so the quality of

play10:44

information in the newsletter is not

play10:46

really the best none of these projects

play10:48

are really in the news at this moment

play10:50

and my newsletter is only as good as the

play10:53

information that goes into it so let's

play10:55

fix that how do I improve the quality of

play10:58

the newsletter

play10:59

well it's actually quite simple I just

play11:01

need to find a better source of

play11:03

information and that brings me to custom

play11:06

made tools but before I dive into that

play11:08

it's worth mentioning that there is one

play11:10

more cool and very useful pre-built tool

play11:12

that people might Overlook and that is

play11:15

human inal lope this tool will ask you

play11:17

for input if it runs into conflicting

play11:20

information okay so back to fixing the

play11:22

newsletter my favorite way to get

play11:24

information is local llama subreddit the

play11:27

community is amazing and they Shir an

play11:29

incredible amount of cool exciting

play11:32

projects and I just don't have enough

play11:34

time to sit and read through all of it

play11:36

so instead I'm going to write a custom

play11:38

tool that scrapes latest 10 hot posts as

play11:42

well as five comments per each post

play11:44

there is a preil tool through length

play11:46

chain a Reddit scraper but I don't

play11:48

really like using it my own custom tool

play11:51

gives me a lot more control and

play11:53

flexibility here's a quick look at the

play11:55

code so import Pro and Tool from link

play11:58

chain and I'm going to create a new

play12:01

class that's called browser tools which

play12:04

is how I'm going to create this Custom

play12:06

Tool then I'm going to need a decorator

play12:09

and a single line dog string that

play12:11

describes what the tool is for the

play12:13

scrape Reddit method starts by

play12:15

initializing the pro rdit object with

play12:17

client ID client secret and user agent

play12:20

it then selects the subreddit local

play12:22

llama to scrape data from then the

play12:25

method iterates through 12 hotest posts

play12:28

on the Reddit extracting the post title

play12:32

URL and up to seven top level comments

play12:35

it handles API exceptions by pausing the

play12:38

scraping process for 60 seconds before

play12:41

continuing and the scrape data is

play12:43

compiled into a list of dictionaries

play12:46

each containing details of a post and

play12:48

its comments which is returned in the

play12:50

end and the rest of the code is the same

play12:54

so I'm just going to copy it from the

play12:55

previous tool with the exception of this

play12:58

time I'm going to assign a Custom Tool

play13:02

uh from the browser tool class and this

play13:04

is the result that I'm getting with jp4

play13:06

I'm just going to copypaste the output

play13:08

into my notion notebook so that you can

play13:10

see it better I have to say that I'm

play13:12

more than pleased with the results it

play13:13

would take me at least an hour to read

play13:16

latest posts on Lo and Lama then to

play13:18

summarize them and take notes but CI

play13:21

agents did all of this in less than a

play13:23

minute this is a type of research that I

play13:25

need to do a few times a day and also

play13:28

this is the first time that I managed to

play13:30

completely automate part of my work with

play13:32

agents one thing that I noticed is that

play13:35

sometimes even GPT 4 doesn't really

play13:37

follow my instructions there are no

play13:39

links to these projects in this output

play13:41

and I asked for them but when I run the

play13:43

script yesterday the agent successfully

play13:46

included all the links and these outputs

play13:48

were made on the same day but they're

play13:50

formatted differently so output varies

play13:53

and agents can act a little bit flaky

play13:55

from time to time I also test the Gemini

play13:58

Pro which offer offers a free API key

play14:00

you can request it through a link that

play14:02

I'm going to include in the description

play14:04

box essentially you just need to import

play14:06

special package from L chain you need to

play14:08

load Gemini with this line and then

play14:11

you're going to need to assign this llm

play14:13

to every agent so Gemini output was a

play14:16

little bit underwhelming the model

play14:18

didn't understand the task instead it

play14:20

wrote a bunch of generic text from its

play14:23

training data which is really

play14:24

unfortunate so let me know if you run

play14:27

into different results I'm I'm really

play14:29

curious and now let's talk about price I

play14:31

rent The Script many times and as part

play14:34

of my experiments but on this particular

play14:36

day 11th of January I remember that I

play14:39

ran the script four times which means

play14:41

that I paid around 30 cents every time I

play14:44

ran it so as you can tell it adds up

play14:46

pretty quickly and of course this is gp4

play14:49

how to avoid paying for all these pricey

play14:52

API calls and how to keep your team of

play14:54

agents and conversation private yes

play14:58

local model mod so let's talk about that

play15:00

right now I've tested 13 open source

play15:02

models in total and only one was able to

play15:06

understand the Tas and completed in some

play15:08

sense all the other models failed which

play15:10

was a little bit surprising to me

play15:13

because I expected a little bit more I

play15:15

guess from these local models and I'll

play15:18

reveal which ones perform the best and

play15:20

the worst but first let me show you how

play15:22

to run local models through all llama

play15:25

the most important thing to keep in mind

play15:26

is that you should have at least 8 GB of

play15:30

RAM available to run models with 7

play15:33

billion parameters 16 GB for 13 billion

play15:36

and 32 GB to run 33 billion parameter

play15:40

models having said that even though I

play15:43

have a laptop with 16 GB of RAM I

play15:47

couldn't run Falcon that only has 7

play15:49

billion parameters and vuna with 13

play15:51

billion parameters whenever I try to run

play15:54

these two models my laptop would freeze

play15:56

and crash so something to keep in mind

play15:58

if you already installed a llama and you

play16:00

downloaded a specific model you can very

play16:03

easily instruct crew AI to use local

play16:05

model instead of openi with this line

play16:08

just import a llama from Lang chain and

play16:11

set set the open source model that you

play16:13

previously downloaded once you do that

play16:15

you should also pass that model to all

play16:18

the agents otherwise they're going to

play16:20

default to CH GPD among 30 models that I

play16:24

experimented with the worst performing

play16:26

ones were llama 2 Series with seven b

play16:30

parameters and another model that

play16:32

performed poorly was 52 the smallest of

play16:35

all of them latu was definitely

play16:38

struggling to produce any type of

play16:40

meaningful output and Fu was just losing

play16:43

it it was painful to watch the best

play16:46

performing model with seven bilder

play16:47

parameters in my opinion was open chat

play16:50

which produced an output that sounds

play16:52

very newsletter the only downside was

play16:55

that it didn't actually contain any data

play16:58

from from local llama subreddit which

play17:00

was the whole point obviously the model

play17:02

didn't understand what the task is

play17:04

similarly but with a lot more emojis

play17:07

mistol produced a generic but fine

play17:10

newsletter this is basically Mistro's

play17:13

training data none of these projects are

play17:15

companies were part of local subred

play17:18

discussions which means that mistal

play17:20

agents didn't understand what the task

play17:22

is and open hermis and new hermis had a

play17:25

similar output all of these outputs are

play17:28

are the best attempts they were even

play17:30

worst outputs since the results weren't

play17:32

really that great I played with

play17:34

different prompts variations of prompts

play17:37

but that didn't really achieve anything

play17:39

also I changed the model file that comes

play17:42

with local models played with parameters

play17:44

for each of the models and I added a

play17:46

system PRT that specifically references

play17:49

local llama but again no improvement my

play17:52

agents still didn't understand what the

play17:54

task is so the only remaining idea I had

play17:57

was to run more modles with 13 billion

play17:59

parameters which is the upper limit for

play18:01

my laptop so I first ran llama 13

play18:03

billion chat and text bottles not

play18:06

quantized but full Precision models my

play18:08

assumption was that these models are

play18:10

going to be better at generating a

play18:13

newsletter because they're bigger models

play18:15

but I was wrong the output didn't look

play18:17

better than let's say open chat or

play18:20

mistro and the problem was still there

play18:22

agents couldn't really understand what

play18:23

the task is so I ended up with a bunch

play18:26

of generic texts about self-driving cars

play18:28

as usual again nothing even remotely

play18:31

similar to actual Reddit conversations

play18:33

on logal Lama so out of pure desperation

play18:36

I tried a regular llama 13 billion

play18:39

parameters model a model that is not

play18:41

even fine-tuned for anything my

play18:43

expectations were really low but to my

play18:45

surprise it was the only model that

play18:48

actually took into consideration this

play18:49

great data from the subreddit it didn't

play18:52

really sound like a newsletter or a Blog

play18:54

but at least the names were there

play18:57

together with some random free flung

play18:59

thoughts which I found a little bit

play19:01

surprising so there you have it you can

play19:04

find my notes about which local modes to

play19:06

avoid and which ones were okay together

play19:09

with all the code on my GitHub which

play19:11

I'll link down below and I'm curious

play19:13

have you tried crew Ai and what were

play19:16

your experiences like thank you for

play19:18

watching and see you in the next one

Rate This

5.0 / 5 (0 votes)

Related Tags
AI AgentsSystem ThinkingCollaborative ToolsLocal ModelsInnovationStartup ConceptsMarket ResearchBusiness PlanningTechnical WritingAutomation