Class RagRetrievalConfigHybridSearch
Config for Hybrid Search. This data type is not supported in Gemini API.
public record RagRetrievalConfigHybridSearch : IEquatable<RagRetrievalConfigHybridSearch>
- Inheritance
-
RagRetrievalConfigHybridSearch
- Implements
- Inherited Members
Properties
Alpha
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.
[JsonPropertyName("alpha")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? Alpha { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a RagRetrievalConfigHybridSearch object.
public static RagRetrievalConfigHybridSearch? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- RagRetrievalConfigHybridSearch
The deserialized RagRetrievalConfigHybridSearch object, or null if deserialization fails.