crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
18.55k stars 2.55k forks source link

crew ai tools in open source LLM using LM Studio #582

Closed SumaiyaSultan2002 closed 1 day ago

SumaiyaSultan2002 commented 3 months ago

I am trying to use Crew ai tools such as CSVSearchTool, TXTSearchTool, RagTool using mistral 7b. But when i try to upload the data using the tools, the data is not read by the tools. It gives me some general answers, instead of answering from the csv and txt file.

Please let me know if there are any documentation for working with crew ai tools.

noggynoggy commented 3 months ago

https://docs.crewai.com/core-concepts/Tools/

Are you sure it is to do with your code? I have experienced Mistral 7B being "too dumb" to use tools most of the time.

SumaiyaSultan2002 commented 3 months ago

have u tried any other open source models, that work okay with crew ai?

slavakurilyak commented 3 months ago

I have experienced Mistral 7B being "too dumb" to use tools most of the time.

LLaMA3 70b is more reliable with tools than Mixtral 8x7b

slavakurilyak commented 3 months ago

have u tried any other open source models, that work okay with crew ai?

Try Groq which gives you API access to LLaMA3 70b

SumaiyaSultan2002 commented 3 months ago

@slavakurilyak thank you. It was helpful. Have anyone tried to use the tools csvsearchtool. I feel like it is not correctly reading the csv file and just giving some random text.

`rag_tool = CSVSearchTool("data_re.csv")

csv_analyer = Agent( role='CSV analyzer', goal="""Analyze the csv file and have a good understanding of the file based on the decription of the columns.""", backstory='Detail-oriented professional with expertise in CSV file analysis and interpretation', verbose=True, allow_delegation=False, tool=[rag_tool], llm=llm )

insight_researcher = Agent( role='Insight Researcher', goal='Discover Key Insights', backstory='You are able to find key insights from the data you are given.', verbose=True, allow_delegation=False, tool=[rag_tool], llm = llm)

Tasks

csv_task = Task( description="""Analyze the csv file {file} and have a good understanding of the file based on the decription of the columns. The csv file is the helpdesk dataset of a company. Description of the columns: Ticket Id - id of the ticket Company - company that raised the ticket Subject - Brief description or title of the ticket description - Description of the tickets Space - Location or area where the issue is reported. Equipment - Equipment for which the issue is reported. Type - Whether the Ticket is raised for a Space or Equipment Requester Name - Name of the person who raised the ticket. Requester Email - Email address of the person who raised the ticket. Requester Mobile - Mobile number of the person who raised the ticket. Created On - date and time when the ticket was created Channel - channel through which the ticket was raised [Email / Mobile App / Web / Phone / External] Issue Type - Type of issue reported in the ticket. Problem Category - Category of the problem reported. Problem Subcategory - Subcategory of the problem reported. State - Current status of the ticket Priority - Priority level assigned to the ticket (e.g., High, Normal, Low). Closed Time - Date and time when the ticket was closed. Maintenance Team - Team responsible for maintenance related to the ticket. Maintenance Type - Type of maintenance required. Ticket_Action_Type - Ticket Type - Proactive / Reactive Block - name of the block SLA Status - status of the SLA SLA End Date - Date when the SLA ended """, agent=csv_analyer, expected_output='a clear understanding of the csv file',

async_execution=True,

tool=[rag_tool] )

insights_task = Task( description='Identify top 10 key insights from the data in points format. ', agent=insight_researcher,

async_execution=True,

context=[csv_task], expected_output="""insights from the dataset. Should also include the action to be done expected results: Insights:..... \n\n Action: .....\n\n""",

)

Instantiate your crew

tech_crew = Crew( agents=[csv_analyer, insight_researcher], tasks=[ csv_task, insights_task], verbose=2, Process= Process.sequential,

Tasks will be executed one after the other

# memory=True,
# cache=True,
# max_rpm=100,

full_output=True,

manager_llm=llm_lmstudio

)

Begin the task execution

result = tech_crew.kickoff() print(result)`

hhbounce commented 3 months ago

I have experienced Mistral 7B being "too dumb" to use tools most of the time.

LLaMA3 70b is more reliable with tools than Mixtral 8x7b

Thanks for your advice!

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 day ago

This issue was closed because it has been stalled for 5 days with no activity.