GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: [vectorsearch] add preview support for precision reranking via … · googleapis/google-cloud-node@b781083

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/google-cloud-vectorsearch
    • .prettierignore
    • .prettierrc.js
    • protos
      • google/cloud/vectorsearch/v1beta
        • data_object_search_service.proto
      • protos.d.ts
      • protos.json
      • protos.js
    • samples/generated
      • v1beta
        • snippet_metadata_google.cloud.vectorsearch.v1beta.json
      • v1
        • snippet_metadata_google.cloud.vectorsearch.v1.json
    • src
      • index.ts
    • webpack.config.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/google-cloud-vectorsearch/.prettierignore‎

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**/node_modules
2+
**/coverage
3+
test/fixtures
4+
build/
5+
docs/
6+
protos/
Collapse file

‎packages/google-cloud-vectorsearch/.prettierrc.js‎

Copy file name to clipboard
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
module.exports = {
21+
...require('gts/.prettierrc.json')
22+
}
Collapse file

‎packages/google-cloud-vectorsearch/protos/google/cloud/vectorsearch/v1beta/data_object_search_service.proto‎

Copy file name to clipboardExpand all lines: packages/google-cloud-vectorsearch/protos/google/cloud/vectorsearch/v1beta/data_object_search_service.proto
+45Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import "google/cloud/vectorsearch/v1beta/common.proto";
2424
import "google/cloud/vectorsearch/v1beta/data_object.proto";
2525
import "google/cloud/vectorsearch/v1beta/embedding_config.proto";
2626
import "google/protobuf/struct.proto";
27+
import "google/rpc/status.proto";
2728

2829
option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
2930
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
@@ -325,6 +326,10 @@ message SearchResponseMetadata {
325326
// K-Nearest Neighbor (KNN) index engine.
326327
bool used_knn = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
327328
}
329+
330+
// Output only. Warnings or non-fatal errors that occurred during execution.
331+
repeated google.rpc.Status warnings = 3
332+
[(google.api.field_behavior) = OUTPUT_ONLY];
328333
}
329334

330335
// Response for a search request.
@@ -453,6 +458,13 @@ message Ranker {
453458
// Reciprocal Rank Fusion ranking.
454459
ReciprocalRankFusion rrf = 1;
455460
}
461+
462+
// The reranker to use for final ranking of the results combined by the
463+
// ranker.
464+
oneof reranker {
465+
// Optional. Vertex AI ranking.
466+
VertexRanker vertex_ranker = 2 [(google.api.field_behavior) = OPTIONAL];
467+
}
456468
}
457469

458470
// Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.
@@ -461,6 +473,39 @@ message ReciprocalRankFusion {
461473
repeated double weights = 1 [(google.api.field_behavior) = REQUIRED];
462474
}
463475

476+
// Defines a ranker using the Vertex AI ranking service.
477+
// See https://cloud.google.com/generative-ai-app-builder/docs/ranking for
478+
// details.
479+
message VertexRanker {
480+
// The record spec for text search.
481+
message TextRecordSpec {
482+
// Required. The query against which the records are ranked and scored.
483+
string query = 1 [(google.api.field_behavior) = REQUIRED];
484+
485+
// Optional. The template used to generate the record's title.
486+
string title_template = 2 [(google.api.field_behavior) = OPTIONAL];
487+
488+
// Optional. The template used to generate the record's content.
489+
string content_template = 3 [(google.api.field_behavior) = OPTIONAL];
490+
}
491+
492+
// The record specification for ranking. At least one record spec must be
493+
// set.
494+
oneof record_spec {
495+
// The record spec for text search.
496+
TextRecordSpec text_record_spec = 6;
497+
}
498+
499+
// Required. The model used for ranking documents. The list of available
500+
// models is described in
501+
// https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models.
502+
// Currently, only `semantic-ranker-fast@latest` is supported.
503+
string model = 4 [(google.api.field_behavior) = REQUIRED];
504+
505+
// Required. The number of documents to be processed for ranking.
506+
int32 top_n = 5 [(google.api.field_behavior) = REQUIRED];
507+
}
508+
464509
// A response from a batch search operation.
465510
message BatchSearchDataObjectsResponse {
466511
// Output only. A list of search responses, one for each request in the batch.
Collapse file

‎packages/google-cloud-vectorsearch/protos/protos.d.ts‎

Copy file name to clipboardExpand all lines: packages/google-cloud-vectorsearch/protos/protos.d.ts
+239Lines changed: 239 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.