Skip to content

Commit 6f2ea01

Browse files
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
1 parent 39e8792 commit 6f2ea01

File tree

1 file changed

+7
-28
lines changed

1 file changed

+7
-28
lines changed

docs/en/tools/ai-ml/ragtool.mdx

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mode: "wide"
99

1010
## Description
1111

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.
1313
It provides a dynamic knowledge base that can be queried to retrieve relevant information from various data sources.
1414
This tool is particularly useful for applications that require access to a vast array of information and need to provide contextually relevant answers.
1515

@@ -76,8 +76,8 @@ The `RagTool` can be used with a wide variety of data sources, including:
7676
The `RagTool` accepts the following parameters:
7777

7878
- **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.
8181

8282
## Adding Content
8383

@@ -130,44 +130,23 @@ from crewai_tools import RagTool
130130

131131
# Create a RAG tool with custom configuration
132132
config = {
133-
"app": {
134-
"name": "custom_app",
135-
},
136-
"llm": {
137-
"provider": "openai",
133+
"vectordb": {
134+
"provider": "qdrant",
138135
"config": {
139-
"model": "gpt-4",
136+
"collection_name": "my-collection"
140137
}
141138
},
142139
"embedding_model": {
143140
"provider": "openai",
144141
"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"
155143
}
156-
},
157-
"chunker": {
158-
"chunk_size": 400,
159-
"chunk_overlap": 100,
160-
"length_function": "len",
161-
"min_chunk_size": 0
162144
}
163145
}
164146

165147
rag_tool = RagTool(config=config, summarize=True)
166148
```
167149

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.
171150

172151
## Conclusion
173152
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

Comments
 (0)