Skip to content

Commit 4ce00b0

Browse files
Google APIscopybara-github
authored andcommitted
feat: add reranker config to RAG v1 API
PiperOrigin-RevId: 735952331
1 parent 5d0c7bf commit 4ce00b0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

google/cloud/aiplatform/v1/tool.proto

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,38 @@ message RagRetrievalConfig {
372372
string metadata_filter = 2 [(google.api.field_behavior) = OPTIONAL];
373373
}
374374

375+
// Config for ranking and reranking.
376+
message Ranking {
377+
// Config for Rank Service.
378+
message RankService {
379+
// Optional. The model name of the rank service.
380+
// Format: `semantic-ranker-512@latest`
381+
optional string model_name = 1 [(google.api.field_behavior) = OPTIONAL];
382+
}
383+
384+
// Config for LlmRanker.
385+
message LlmRanker {
386+
// Optional. The model name used for ranking.
387+
// Format: `gemini-1.5-pro`
388+
optional string model_name = 1 [(google.api.field_behavior) = OPTIONAL];
389+
}
390+
391+
// Config options for ranking. Currently only Rank Service is supported.
392+
oneof ranking_config {
393+
// Optional. Config for Rank Service.
394+
RankService rank_service = 1 [(google.api.field_behavior) = OPTIONAL];
395+
396+
// Optional. Config for LlmRanker.
397+
LlmRanker llm_ranker = 3 [(google.api.field_behavior) = OPTIONAL];
398+
}
399+
}
400+
375401
// Optional. The number of contexts to retrieve.
376402
int32 top_k = 1 [(google.api.field_behavior) = OPTIONAL];
377403

378404
// Optional. Config for filters.
379405
Filter filter = 3 [(google.api.field_behavior) = OPTIONAL];
406+
407+
// Optional. Config for ranking and reranking.
408+
Ranking ranking = 4 [(google.api.field_behavior) = OPTIONAL];
380409
}

0 commit comments

Comments
 (0)