https://github.com/bisansuleiman/crewAI-examples
https://github.com/bisansuleiman/crewAI-tools
Made 2 pull requests to crewAI repo
crewAI-examples
- crewAI-examples repo had examples of existing agents that performed specified tasks, but most needed updating using their new format that utilized crewAI tools, rather than directly referencing Langchain tools
- rewrote
stock-analysis and job-posting examples using the new format
- I was introduced to crewAI repo by exploring existing agents and examples from the repo, played around with the prompts and agents to get a feel for the platform
job-posting example
- job-posting creates a crew of agents that work together to create a job posting from scraping the internet for news articles, similar job postings, as well as searching the company’s website for information about its values, culture, and past job roles
- what I did:
- converted
agents.py and tasks.py to .yaml files
- instead of answering prompt in the terminal, indicate answers in
main.py
- replaced the tools from Langchain with tools from crewAI-tools repo, to make it more cohesive(?)
stock-analysis example
- stock-analysis creates a crew of agents working together to pull data from the internet and SEC reports to provide the user with a report on a certain stock ticker and advise them whether to invest in the company
- what I did:
- converted
agents.py and tasks.py to .yaml files
- instead of answering prompt in the terminal, indicate answers in
main.py
- replaced the tools from Langchain with tools from crewAI-tools repo, to make it more cohesive(?)
- created custom tools that existed in the crewAI-examples repo,
SEC10KTool and SEC10QTool, to replace tools relying directly on Langchain to analyze data from company’s SEC 10K and 10Q report for up to date information on the company’s financials.
crewAI-tools
SEC10kTool, SEC10QTool
- Inspired by the custom tools from stock-analysis example, created custom tools
SEC10KTool and SEC10QTool to semantic search a query from a company’s SEC 10K and 10Q report for up to date information on the company’s financials, .
- Inspired by ScrapeWebsiteTool from crewAI-tools, leveraging the same Retrieval-Augmented Generation (RAG) model, it navigates through the information provided on a passed in stock ticker.
- The input to this tool should be the company stock ticker as a string. For example:
SEC10KTool("AMZN")
what I learned:
- Retrieval-Augmented Generation (RAG) model:
- framework that reduces the chance that an LLM model will hallucinate incorrect information by providing it with an up-to-date and reliable data, instead of making it pull information out of its internal system
- works almost like an ‘open-book’ where we provide the LLM with the latest SEC 10K/10Q form and ask it to answer questions from that information rather than making it up
- the model first retrieves relevant information about the query, then it pulls information from its training data and internal information to answer the question.
CalculatorTool
- inspired also by the custom tools in stock-analysis, created a
CalculatorTool that performs calculations within the context of a given problem. It navigates through the information provided to execute operations representative of the given problem.