From d6552174c9ccd91a176a43e21a08da2cb0b8c4c1 Mon Sep 17 00:00:00 2001 From: Elizabeth Wu Date: Tue, 17 Dec 2024 21:18:31 +1100 Subject: [PATCH] Update _parse_proto_output function to include the entity_id as part of the metadata returned. Currently similarity_search_by_vector() returns slightly different information when looking at a BQ store versus a Feature Store. When executed against a BQ store the nearest neighbor ID is returned, but when executed against the Feature Store no ID is returned. To bring both into alignment we should include the entity_id for the Online Feature Store as well. --- .../bq_storage_vectorstores/featurestore.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/community/langchain_google_community/bq_storage_vectorstores/featurestore.py b/libs/community/langchain_google_community/bq_storage_vectorstores/featurestore.py index 7f5eb388..5738c45b 100644 --- a/libs/community/langchain_google_community/bq_storage_vectorstores/featurestore.py +++ b/libs/community/langchain_google_community/bq_storage_vectorstores/featurestore.py @@ -406,6 +406,7 @@ def _parse_proto_output( documents.append( [ Document( + id=result.entity_id, page_content=content, metadata=metadata, ),