YouTube Channel RAG Search
The YoutubeChannelSearchTool
is designed to perform a RAG (Retrieval-Augmented Generation) search within the content of a Youtube channel.
YoutubeChannelSearchTool
We are still working on improving tools, so there might be unexpected behavior or changes in the future.
Description
This tool is designed to perform semantic searches within a specific Youtube channel’s content. Leveraging the RAG (Retrieval-Augmented Generation) methodology, it provides relevant search results, making it invaluable for extracting information or finding specific content without the need to manually sift through videos. It streamlines the search process within Youtube channels, catering to researchers, content creators, and viewers seeking specific information or topics.
Installation
To utilize the YoutubeChannelSearchTool, the crewai_tools
package must be installed. Execute the following command in your shell to install:
Example
The following example demonstrates how to use the YoutubeChannelSearchTool
with a CrewAI agent:
You can also initialize the tool with a specific YouTube channel handle:
Parameters
The YoutubeChannelSearchTool
accepts the following parameters:
- youtube_channel_handle: Optional. The handle of the YouTube channel to search within. If provided during initialization, the agent won’t need to specify it when using the tool. If the handle doesn’t start with ’@’, it will be automatically added.
- config: Optional. Configuration for the underlying RAG system, including LLM and embedder settings.
- summarize: Optional. Whether to summarize the retrieved content. Default is
False
.
When using the tool with an agent, the agent will need to provide:
- search_query: Required. The search query to find relevant information in the channel content.
- youtube_channel_handle: Required only if not provided during initialization. The handle of the YouTube channel to search within.
Custom Model and Embeddings
By default, the tool uses OpenAI for both embeddings and summarization. To customize the model, you can use a config dictionary as follows:
Agent Integration Example
Here’s a more detailed example of how to integrate the YoutubeChannelSearchTool
with a CrewAI agent:
Implementation Details
The YoutubeChannelSearchTool
is implemented as a subclass of RagTool
, which provides the base functionality for Retrieval-Augmented Generation:
Conclusion
The YoutubeChannelSearchTool
provides a powerful way to search and extract information from YouTube channel content using RAG techniques. By enabling agents to search across an entire channel’s videos, it facilitates information extraction and analysis tasks that would otherwise be difficult to perform. This tool is particularly useful for research, content analysis, and knowledge extraction from YouTube channels.
Was this page helpful?