You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update RagTool references from EmbedChain to CrewAI native RAG (#3537)
* docs: update RagTool references from EmbedChain to CrewAI native RAG
* change ref to qdrant
* docs: update RAGTool to use Qdrant and add embedding_model example
Copy file name to clipboardExpand all lines: docs/en/tools/ai-ml/ragtool.mdx
+7-28Lines changed: 7 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ mode: "wide"
9
9
10
10
## Description
11
11
12
-
The `RagTool` is designed to answer questions by leveraging the power of Retrieval-Augmented Generation (RAG) through EmbedChain.
12
+
The `RagTool` is designed to answer questions by leveraging the power of Retrieval-Augmented Generation (RAG) through CrewAI's native RAG system.
13
13
It provides a dynamic knowledge base that can be queried to retrieve relevant information from various data sources.
14
14
This tool is particularly useful for applications that require access to a vast array of information and need to provide contextually relevant answers.
15
15
@@ -76,8 +76,8 @@ The `RagTool` can be used with a wide variety of data sources, including:
76
76
The `RagTool` accepts the following parameters:
77
77
78
78
-**summarize**: Optional. Whether to summarize the retrieved content. Default is `False`.
79
-
-**adapter**: Optional. A custom adapter for the knowledge base. If not provided, an EmbedchainAdapter will be used.
80
-
-**config**: Optional. Configuration for the underlying EmbedChain App.
79
+
-**adapter**: Optional. A custom adapter for the knowledge base. If not provided, a CrewAIRagAdapter will be used.
80
+
-**config**: Optional. Configuration for the underlying CrewAI RAG system.
81
81
82
82
## Adding Content
83
83
@@ -130,44 +130,23 @@ from crewai_tools import RagTool
130
130
131
131
# Create a RAG tool with custom configuration
132
132
config = {
133
-
"app": {
134
-
"name": "custom_app",
135
-
},
136
-
"llm": {
137
-
"provider": "openai",
133
+
"vectordb": {
134
+
"provider": "qdrant",
138
135
"config": {
139
-
"model": "gpt-4",
136
+
"collection_name": "my-collection"
140
137
}
141
138
},
142
139
"embedding_model": {
143
140
"provider": "openai",
144
141
"config": {
145
-
"model": "text-embedding-ada-002"
146
-
}
147
-
},
148
-
"vectordb": {
149
-
"provider": "elasticsearch",
150
-
"config": {
151
-
"collection_name": "my-collection",
152
-
"cloud_id": "deployment-name:xxxx",
153
-
"api_key": "your-key",
154
-
"verify_certs": False
142
+
"model": "text-embedding-3-small"
155
143
}
156
-
},
157
-
"chunker": {
158
-
"chunk_size": 400,
159
-
"chunk_overlap": 100,
160
-
"length_function": "len",
161
-
"min_chunk_size": 0
162
144
}
163
145
}
164
146
165
147
rag_tool = RagTool(config=config, summarize=True)
166
148
```
167
149
168
-
The internal RAG tool utilizes the Embedchain adapter, allowing you to pass any configuration options that are supported by Embedchain.
169
-
You can refer to the [Embedchain documentation](https://docs.embedchain.ai/components/introduction) for details.
170
-
Make sure to review the configuration options available in the .yaml file.
171
150
172
151
## Conclusion
173
152
The `RagTool` provides a powerful way to create and query knowledge bases from various data sources. By leveraging Retrieval-Augmented Generation, it enables agents to access and retrieve relevant information efficiently, enhancing their ability to provide accurate and contextually appropriate responses.
0 commit comments