> For the complete documentation index, see [llms.txt](https://adityamukho.gitbook.io/recallgraph-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adityamukho.gitbook.io/recallgraph-docs/understanding-recallgraph/terminology/pre-filters.md).

# Pre-Filters

A pre-filter is the first step to execute in the operator pipeline for many bulk read/write requests in RecallGraph. This filter acts in two ways:

1. As a **compulsory** entity selector that determines the [scope](/recallgraph-docs/understanding-recallgraph/terminology.md#scopes) within which to search for associated entities ([events](/recallgraph-docs/understanding-recallgraph/terminology.md#event), [commands](/recallgraph-docs/understanding-recallgraph/terminology.md#command) or historical versions), and an `_id` pattern that every vertex/edge in that scope must match in order for its associated entities to proceed further down the pipeline. This is determined by the [path](/recallgraph-docs/understanding-recallgraph/terminology.md#path) parameter in the request.
2. As Transaction-Time (time of record for an event) bounds which include:
   1. An **optional** lower bound (inclusive) - `since`,
   2. An **optional** upper bound (exclusive) - `until`

{% hint style="warning" %}
Conditions defined by the pre-filters apply to individual documents (scope) and events (time bounds). They do not apply to groups, which may be created later in the operator execution pipeline.
{% endhint %}

{% hint style="success" %}
Pre-filters are applied within the DB query that is used to fetch intermediate results, and so it is desirable to use them to narrow down intermediate results as much as possible, before they are processed further in the rest of the pipeline.
{% endhint %}
