-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAG implementation in CREWAI #247
Comments
You could run off this branch #246 and use a LangChain agent with RAG? :) |
Similar to issue #18 RAG with tools example here: https://mer.vin/2024/02/crewai-rag-using-tools/
-- Joao (@joaomdmoura) |
RAG is now part of crewai-tools |
Hi @slavakurilyak Thanks for the response |
Can we attach any pdf or any document and do RAG on these documents using Agents ?? |
@NeethanShetty07 Yeah, I got it working, here's a simple example with from crewai_tools.tools import TXTSearchTool
rag_tool = TXTSearchTool(txt='./sample_data/test.txt')
data_analyst = Agent(
role='Data Analyst',
goal='You perfectly know how to analyze any data using provided txt file and searching info via RAG tool',
backstory='You are data expert',
verbose=True,
allow_delegation=False,
tools=[rag_tool]
)
test_task = Task(
description="Show me a company name",
tools=[rag_tool],
agent=data_analyst
)
test_task.execute() |
But i have AzureOPENAI key , But TXTSearchTool is asking OPENAI key for the process , how to do solve this issue? |
I am having the exact same problem as Neethan54 can anyone please let us know how we pass in the key from AzureOpenAI for the TXTSearchtool? |
Bump. Do tools need Open AI keys? I'm trying to use the PDFSearchTool with Mistral, assumed I'd only need OpenAI keys for using an Open AI llm. |
Im having the same issue as @Neethan54 and @P7201 , for Azure OpenAI for PDFSearchTool |
I'd like to understand the same. How to use Azure OpenAI for PDFSearchTool? |
how to use groq and other embeddings on PDFSearchTool anyone knows?? |
It seems |
From the theory, the way tools (function calling) work is by comparing the request's embedding with the tool's description's embedding (vector distance measurement). Therefore tools require an embedding_model. I checked the source code and did the following. The CrewAI framework checks if there is an embedding_model_config given and if not it tries to use OpenAI Embeddings by default. To solve this I used a config dict you can see from the below example:
Later, the CrewAI framework asked me to download the "docx2txt" package to work, which you can do by running this command: "pip install docx2txt" and it worked without a problem afterwards. You can change the model with another HuggingFace embedding model and it should work. I also had a similar problem with the memory which I solved similarly: #769 (comment) |
[cbarkinozer] Thanks for providing the config. it's working with TXTSearchTool also,
|
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. |
This issue was closed because it has been stalled for 5 days with no activity. |
Hi,
Is there any method implemented which we can link RAG method with agents.
The text was updated successfully, but these errors were encountered: