> For the complete documentation index, see [llms.txt](https://docs.waterflai.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.waterflai.ai/studio/studio-builders/flow-components-nodes/knowledge-retrieval-tool-node.md).

# Knowledge retrieval tool Node

### Overview

The Knowledge Retrieval Tool Node creates a tool that enables agents to search and retrieve information from vector store collections. It provides semantic search capabilities with customizable filtering options and can be used to integrate knowledge bases into agent-based flows.

Usage cost: 1 credit

### Configuration

#### Settings

1. **Collection Settings**
   * Collection\*: Select the vector store collection to search
   * Number of Documents\*: Specify how many documents to retrieve (minimum 1)
2. **Tool Configuration**
   * Tool Name\*: Unique identifier for the tool (no spaces)
   * Tool Description\*: Explanation of when and how to use the tool
   * Filtering: Optional conditions to filter search results

#### Output Ports

* `retrieval_tool` (Tool): A tool object that:
  * Searches the specified collection
  * Returns relevant documents
  * Applies configured filters
  * Maintains metadata

### Best Practices

1. **Tool Configuration**
   * Use clear, descriptive tool names
   * Write comprehensive descriptions
   * Set appropriate document limits
   * Consider search context
2. **Filter Design**
   * Follow vector store syntax
   * Test filters thoroughly
   * Use variables strategically
3. **Performance**
   * Optimize document count
   * Design efficient filters

### Common Issues

* Invalid filter syntax
* Excessive document retrieval
* Filter parsing errors
* Collection connectivity issues

For vector store specific filter syntax, refer to:

* Milvus: [Filtering Documentation](https://milvus.io/docs/boolean.md)
* Zilliz: [Filtering Documentation](https://docs.zilliz.com/docs/filtering)
* Qdrant: [Filtering Documentation](https://qdrant.tech/documentation/concepts/filtering/)
* Chroma: [Where Filters Documentation](https://docs.trychroma.com/docs/querying-collections/metadata-filtering)
* Pinecone: [Metadata Filtering Guide](https://docs.pinecone.io/guides/data/filter-with-metadata#metadata-query-language)
