Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change post-filters to pre-filters in BigQueryVectorStore (langchain-…
…ai#554) BigQueryVectorStore's _create_filters are post-filters. Now that BigQuery Vector Search supports pre-filtering on stored columns (https://cloud.google.com/bigquery/docs/vector-index#stored-columns), we can change all post-filters to pre-filters. Note that this requires storing the columns that are referenced by the pre-filter. This cannot be done in Langchain yet. If the required columns are not stored, then the pre-filters will act as post-filters. The results returned by the new post-filters will be a superset of the post-filters done currently, which can return less results.
- Loading branch information