Table of Contents

Class VertexRagStore

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Retrieve from Vertex RAG Store for grounding. This data type is not supported in Gemini API.

public record VertexRagStore : IEquatable<VertexRagStore>
Inheritance
VertexRagStore
Implements
Inherited Members

Properties

RagCorpora

Optional. Deprecated. Please use rag_resources instead.

[JsonPropertyName("ragCorpora")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<string>? RagCorpora { get; set; }

Property Value

List<string>

RagResources

Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.

[JsonPropertyName("ragResources")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<VertexRagStoreRagResource>? RagResources { get; set; }

Property Value

List<VertexRagStoreRagResource>

RagRetrievalConfig

Optional. The retrieval config for the Rag query.

[JsonPropertyName("ragRetrievalConfig")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public RagRetrievalConfig? RagRetrievalConfig { get; set; }

Property Value

RagRetrievalConfig

SimilarityTopK

Optional. Number of top k results to return from the selected corpora.

[JsonPropertyName("similarityTopK")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? SimilarityTopK { get; set; }

Property Value

int?

StoreContext

Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if store_context bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users' ongoing and future interactions.

[JsonPropertyName("storeContext")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? StoreContext { get; set; }

Property Value

bool?

VectorDistanceThreshold

Optional. Only return results with vector distance smaller than the threshold.

[JsonPropertyName("vectorDistanceThreshold")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? VectorDistanceThreshold { get; set; }

Property Value

double?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a VertexRagStore object.

public static VertexRagStore? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

VertexRagStore

The deserialized VertexRagStore object, or null if deserialization fails.