Skip to main content

CSVSearchTool

Experimental: We are still working on improving tools, so there might be unexpected behavior or changes in the future.

Description

This tool is used to perform a RAG (Retrieval-Augmented Generation) search within a CSV file’s content. It allows users to semantically search for queries in the content of a specified CSV file. This feature is particularly useful for extracting information from large CSV datasets where traditional search methods might be inefficient. All tools with “Search” in their name, including CSVSearchTool, are RAG tools designed for searching different sources of data.

Installation

Install the crewai_tools package

Example

Code

Arguments

The following parameters can be used to customize the CSVSearchTool’s behavior:

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:
Code

URL Validation

URL inputs are validated: file:// URIs and requests targeting private or reserved IP ranges are blocked to prevent server-side request forgery (SSRF) attacks.