RagQuery

A query to retrieve relevant contexts.

Fields
similarityTopK
(deprecated)
integer

Optional. The number of contexts to retrieve.

ranking
(deprecated)
object ( Ranking )

Optional. Configurations for hybrid search results ranking.

ragRetrievalConfig object ( RagRetrievalConfig )

Optional. The retrieval config for the query.

query Union type
The query to retrieve contexts. Currently only text query is supported. query can be only one of the following:
text string

Optional. The query in text format to get relevant contexts.

JSON representation
 { 
 "similarityTopK" 
 : 
 integer 
 , 
 "ranking" 
 : 
 { 
 object (  Ranking 
 
) 
 } 
 , 
 "ragRetrievalConfig" 
 : 
 { 
 object (  RagRetrievalConfig 
 
) 
 } 
 , 
 // query 
 "text" 
 : 
 string 
 // Union type 
 } 

Ranking

Configurations for hybrid search results ranking.

Fields
alpha number

Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.

JSON representation
 { 
 "alpha" 
 : 
 number 
 } 
Create a Mobile Website
View Site in Mobile | Classic
Share by: