From 6f2ea013a70753b5ab1e9dc4881d6de52d26d09e Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Thu, 18 Sep 2025 19:06:44 -0400 Subject: [PATCH] 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 --- docs/en/tools/ai-ml/ragtool.mdx | 35 +++++++-------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/docs/en/tools/ai-ml/ragtool.mdx b/docs/en/tools/ai-ml/ragtool.mdx index 091643242..547ec94da 100644 --- a/docs/en/tools/ai-ml/ragtool.mdx +++ b/docs/en/tools/ai-ml/ragtool.mdx @@ -9,7 +9,7 @@ mode: "wide" ## Description -The `RagTool` is designed to answer questions by leveraging the power of Retrieval-Augmented Generation (RAG) through EmbedChain. +The `RagTool` is designed to answer questions by leveraging the power of Retrieval-Augmented Generation (RAG) through CrewAI's native RAG system. It provides a dynamic knowledge base that can be queried to retrieve relevant information from various data sources. This tool is particularly useful for applications that require access to a vast array of information and need to provide contextually relevant answers. @@ -76,8 +76,8 @@ The `RagTool` can be used with a wide variety of data sources, including: The `RagTool` accepts the following parameters: - **summarize**: Optional. Whether to summarize the retrieved content. Default is `False`. -- **adapter**: Optional. A custom adapter for the knowledge base. If not provided, an EmbedchainAdapter will be used. -- **config**: Optional. Configuration for the underlying EmbedChain App. +- **adapter**: Optional. A custom adapter for the knowledge base. If not provided, a CrewAIRagAdapter will be used. +- **config**: Optional. Configuration for the underlying CrewAI RAG system. ## Adding Content @@ -130,44 +130,23 @@ from crewai_tools import RagTool # Create a RAG tool with custom configuration config = { - "app": { - "name": "custom_app", - }, - "llm": { - "provider": "openai", + "vectordb": { + "provider": "qdrant", "config": { - "model": "gpt-4", + "collection_name": "my-collection" } }, "embedding_model": { "provider": "openai", "config": { - "model": "text-embedding-ada-002" + "model": "text-embedding-3-small" } - }, - "vectordb": { - "provider": "elasticsearch", - "config": { - "collection_name": "my-collection", - "cloud_id": "deployment-name:xxxx", - "api_key": "your-key", - "verify_certs": False - } - }, - "chunker": { - "chunk_size": 400, - "chunk_overlap": 100, - "length_function": "len", - "min_chunk_size": 0 } } rag_tool = RagTool(config=config, summarize=True) ``` -The internal RAG tool utilizes the Embedchain adapter, allowing you to pass any configuration options that are supported by Embedchain. -You can refer to the [Embedchain documentation](https://docs.embedchain.ai/components/introduction) for details. -Make sure to review the configuration options available in the .yaml file. ## Conclusion 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.