Filters
Pass filters to the retrievers to narrow down the retrieval results.
Basic Information
- Pipeline type: Query
- Type: Not applicable
- Components it can connect with:
- Retrievers can receive filters to narrow down the list of documents retrieved.
Inputs
Filters
is a placeholder filled in with real values at search time, if filters are specified. Filters must be passed as a dictionary or a list of values.
Outputs
Name | Type | Description |
---|---|---|
filters | Dictionary | The filters to narrow down retrieval. |
Overview
Filters
represents the actual filters provided at search time. You can filter using your documents' metadata. For example, to retieve only documents with metadata type: article
, pass Filters
along with the query to the Rankers in your query pipeline.
Usage Example
In Builder, connect Filters
to the filters
inputs of the Retrievers in your query pipeline:
In YAML, add filters
to your pipeline inputs and list the components that should receive them:
inputs:
filters:
- "bm25_retriever.filters"
- "embedding_retriever.filters"
Init Parameters
This component doesn't take any initialization parameters.
Updated 12 days ago