Specifies the context retrieval config.
topK
integer
Optional. The number of contexts to retrieve.
Optional. Config for filters.
JSON representation |
---|
{
"topK": integer,
"filter": {
object ( |
Filter
Config for filters.
metadataFilter
string
Optional. String for metadata filtering.
vector_db_threshold
Union type
Filter contexts retrieved from the vector DB based on either vector distance or vector similarity.
vector_db_threshold
can be only one of the following:vectorDistanceThreshold
number
Optional. Only returns contexts with vector distance smaller than the threshold.
vectorSimilarityThreshold
number
Optional. Only returns contexts with vector similarity larger than the threshold.
JSON representation |
---|
{ "metadataFilter": string, // vector_db_threshold "vectorDistanceThreshold": number, "vectorSimilarityThreshold": number // Union type } |