@@ -21,8 +21,10 @@ import "google/api/client.proto";
2121import "google/api/field_behavior.proto" ;
2222import "google/api/resource.proto" ;
2323import "google/cloud/aiplatform/v1beta1/content.proto" ;
24+ import "google/cloud/aiplatform/v1beta1/operation.proto" ;
2425import "google/cloud/aiplatform/v1beta1/tool.proto" ;
2526import "google/cloud/aiplatform/v1beta1/vertex_rag_data.proto" ;
27+ import "google/longrunning/operations.proto" ;
2628
2729option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1" ;
2830option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb" ;
@@ -69,6 +71,29 @@ service VertexRagService {
6971 };
7072 option (google.api.method_signature ) = "parent,content,facts" ;
7173 }
74+
75+ // Agentic Retrieval Ask API for RAG.
76+ rpc AskContexts (AskContextsRequest ) returns (AskContextsResponse ) {
77+ option (google.api.http ) = {
78+ post : "/v1beta1/{parent=projects/*/locations/*}:askContexts"
79+ body : "*"
80+ };
81+ option (google.api.method_signature ) = "parent,query" ;
82+ }
83+
84+ // Asynchronous API to retrieves relevant contexts for a query.
85+ rpc AsyncRetrieveContexts (AsyncRetrieveContextsRequest )
86+ returns (google.longrunning.Operation ) {
87+ option (google.api.http ) = {
88+ post : "/v1beta1/{parent=projects/*/locations/*}:asyncRetrieveContexts"
89+ body : "*"
90+ };
91+ option (google.api.method_signature ) = "parent,query" ;
92+ option (google.longrunning.operation_info ) = {
93+ response_type : "AsyncRetrieveContextsResponse"
94+ metadata_type : "AsyncRetrieveContextsOperationMetadata"
95+ };
96+ }
7297}
7398
7499// A query to retrieve relevant contexts.
@@ -346,3 +371,69 @@ message Claim {
346371 // Confidence score of this corroboration.
347372 optional float score = 4 ;
348373}
374+
375+ // Agentic Retrieval Ask API for RAG.
376+ // Request message for
377+ // [VertexRagService.AskContexts][google.cloud.aiplatform.v1beta1.VertexRagService.AskContexts].
378+ message AskContextsRequest {
379+ // Required. The resource name of the Location from which to retrieve
380+ // RagContexts. The users must have permission to make a call in the project.
381+ // Format:
382+ // `projects/{project}/locations/{location}`.
383+ string parent = 1 [
384+ (google.api.field_behavior ) = REQUIRED ,
385+ (google.api.resource_reference ) = {
386+ type : "locations.googleapis.com/Location"
387+ }
388+ ];
389+
390+ // Required. Single RAG retrieve query.
391+ RagQuery query = 2 [(google.api.field_behavior ) = REQUIRED ];
392+
393+ // Optional. The tools to use for AskContexts.
394+ repeated Tool tools = 3 [(google.api.field_behavior ) = OPTIONAL ];
395+ }
396+
397+ // Response message for
398+ // [VertexRagService.AskContexts][google.cloud.aiplatform.v1beta1.VertexRagService.AskContexts].
399+ message AskContextsResponse {
400+ // The Retrieval Response.
401+ string response = 1 ;
402+
403+ // The contexts of the query.
404+ RagContexts contexts = 2 ;
405+ }
406+
407+ // Request message for
408+ // [VertexRagService.AsyncRetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.AsyncRetrieveContexts].
409+ message AsyncRetrieveContextsRequest {
410+ // Required. The resource name of the Location from which to retrieve
411+ // RagContexts. The users must have permission to make a call in the project.
412+ // Format:
413+ // `projects/{project}/locations/{location}`.
414+ string parent = 1 [
415+ (google.api.field_behavior ) = REQUIRED ,
416+ (google.api.resource_reference ) = {
417+ type : "locations.googleapis.com/Location"
418+ }
419+ ];
420+
421+ // Required. Single RAG retrieve query.
422+ RagQuery query = 2 [(google.api.field_behavior ) = REQUIRED ];
423+
424+ // Optional. The tools to use for AskContexts.
425
862D
td>+ repeated Tool tools = 3 [(google.api.field_behavior ) = OPTIONAL ];
426+ }
427+
428+ // Response message for
429+ // [VertexRagService.AsyncRetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.AsyncRetrieveContexts].
430+ message AsyncRetrieveContextsResponse {
431+ // The contexts of the query.
432+ RagContexts contexts = 1 ;
433+ }
434+
435+ // Metadata for AsyncRetrieveContextsOperation.
436+ message AsyncRetrieveContextsOperationMetadata {
437+ // The operation generic information.
438+ GenericOperationMetadata generic_metadata = 1 ;
439+ }
0 commit comments