Using the file search tool, you can upload files and use them as a resource for
Retrieval Augmented Generation (RAG). File search tools is a simpler alternative
to [Data store
tools](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/tool/data-store).

When uploading files, you can select either local files for upload or an
existing [RAG knowledge
base](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/rag-engine/manage-your-rag-corpus). If you
select local files, a RAG knowledge base is created for you.

## Configuration

The tool requires the following configuration items:

- **Name**: Descriptive name that helps AI understand the tool's job.
- **Description**: Description of the tool that helps AI decide when to use the tool.
- **Location**: Location of the automatically created knowledge base when you are uploading a local file.
- **Files**: Select either local file or RAG Knowledge Base, then upload a file or select the knowledge base.

## Output

The tool performs a search on the connected RAG knowledge base and retrieves
relevant search results. It then produces an optimized prompt, incorporating the
user's query, retrieved search results, and instructions for writing a
good-quality answer. The calling agent may use this output to produce an answer.

## Limitations

RAG knowledge bases are restricted to [these
regions](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/rag-engine/rag-overview#supported-regions).

## Billing

Use of RAG Engine will incur additional costs from that product in addition to
the costs associated with use of CX Agent Studio.