[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eRagQuery\u003c/code\u003e class, part of the Vertex AI v1beta1 API, is designed to retrieve relevant contexts for a given query.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRagQuery\u003c/code\u003e implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, allowing for versatile use within different contexts and with different functionalities.\u003c/p\u003e\n"],["\u003cp\u003eThis class has a \u003ccode\u003eRagRetrievalConfig\u003c/code\u003e property for configuring how contexts are retrieved and supports an obsolete \u003ccode\u003eRanking\u003c/code\u003e property for managing hybrid search result ranking.\u003c/p\u003e\n"],["\u003cp\u003eThe class features two constructors, a parameterless one and one that accepts another \u003ccode\u003eRagQuery\u003c/code\u003e instance, enabling easy creation and copying of \u003ccode\u003eRagQuery\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eText\u003c/code\u003e and \u003ccode\u003eSimilarityTopK\u003c/code\u003e properties are present, these serve the purpose of formatting the text to be queried and the number of contexts to retrieve respectively.\u003c/p\u003e\n"]]],[],null,["# Vertex AI v1beta1 API - Class RagQuery (1.0.0-beta47)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta47 (latest)](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery)\n- [1.0.0-beta46](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/1.0.0-beta46/Google.Cloud.AIPlatform.V1Beta1.RagQuery) \n\n public sealed class RagQuery : IMessage\u003cRagQuery\u003e, IEquatable\u003cRagQuery\u003e, IDeepCloneable\u003cRagQuery\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Vertex AI v1beta1 API class RagQuery.\n\nA query to retrieve relevant contexts. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RagQuery \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RagQuery](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RagQuery](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RagQuery](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.AIPlatform.V1Beta1](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.AIPlatform.V1Beta1.dll\n\nConstructors\n------------\n\n### RagQuery()\n\n public RagQuery()\n\n### RagQuery(RagQuery)\n\n public RagQuery(RagQuery other)\n\nProperties\n----------\n\n### HasText\n\n public bool HasText { get; }\n\nGets whether the \"text\" field is set\n\n### QueryCase\n\n public RagQuery.QueryOneofCase QueryCase { get; }\n\n### RagRetrievalConfig\n\n public RagRetrievalConfig RagRetrievalConfig { get; set; }\n\nOptional. The retrieval config for the query.\n\n### Ranking\n\n [Obsolete]\n public RagQuery.Types.Ranking Ranking { get; set; }\n\nOptional. Configurations for hybrid search results ranking.\n\n### SimilarityTopK\n\n [Obsolete]\n public int SimilarityTopK { get; set; }\n\nOptional. The number of contexts to retrieve.\n\n### Text\n\n public string Text { get; set; }\n\nOptional. The query in text format to get relevant contexts."]]