A partir de 29 de abril de 2025, os modelos Gemini 1.5 Pro e Gemini 1.5 Flash não estarão disponíveis em projetos que não os usaram antes, incluindo novos projetos. Para mais detalhes, consulte Versões e ciclo de vida do modelo.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, apresentamos o RagManagedDb, a tecnologia subjacente e como
o RagManagedDb é usado no mecanismo de RAG da Vertex AI. Além disso, esta página descreve os diferentes níveis disponíveis para ajustar a performance, o que pode afetar seus custos, e fornece instruções para excluir os dados do mecanismo RAG da Vertex AI, o que interrompe o faturamento.
Visão geral
O mecanismo de RAG da Vertex AI usa RagManagedDb, que é uma instância do Google Spanner totalmente gerenciada e pronta para uso empresarial. Ela é usada para armazenamento de recursos pelo mecanismo de RAG da Vertex AI e pode ser usada como o banco de dados vetorial de sua escolha para seus corpus de RAG.
Com o Spanner, o mecanismo de RAG da Vertex AI oferece um banco de dados consistente, altamente disponível e escalonável para oferecer suporte ao seu aplicativo. Para saber mais sobre o Google Spanner, consulte
Spanner.
O mecanismo de RAG da Vertex AI armazena os metadados do corpus e do recurso de arquivo de RAG em RagManagedDb, independente do banco de dados vetorial escolhido. Os bancos de dados de vetores são usados apenas para armazenamento e recuperação de embeddings. Além do armazenamento de recursos, o RagManagedDb também pode ser usado para armazenar e gerenciar representações vetoriais dos seus documentos. Em seguida, o banco de dados vetorial é usado para recuperar
documentos relevantes com base na semelhança semântica do documento com uma determinada consulta.
Gerenciar níveis
O mecanismo de RAG da Vertex AI permite escalonar sua instância RagManagedDb com base nos requisitos de uso e desempenho usando dois níveis. Além disso, é possível excluir os dados do mecanismo de RAG da Vertex AI usando um terceiro nível.
O nível é uma configuração no nível do projeto disponível no recurso RagEngineConfig, que afeta os corpus de RAG usando RagManagedDb. Os seguintes níveis
estão disponíveis no RagEngineConfig:
Nível escalonado: oferece desempenho em escala de produção e funcionalidade de escalonamento automático. É adequado para clientes com grandes quantidades de dados ou cargas de trabalho sensíveis ao desempenho. Internamente, esse nível define a instância do Spanner para a configuração de escalonamento automático com um mínimo de 1 nó (1.000 unidades de processamento) e um máximo de 10 nós (10.000 unidades de processamento).
Nível básico (padrão): oferece um nível econômico e de baixa computação, que pode ser adequado para alguns dos seguintes casos:
Fazendo experimentos com RagManagedDb.
Tamanho de dados pequeno.
Carga de trabalho sem diferenciação de latência.
Use o mecanismo RAG da Vertex AI apenas com outros bancos de dados de vetores.
Para oferecer o nível básico, o RagManagedDb define a instância do Spanner subjacente para uma configuração fixa de 100 unidades de processamento, o que equivale a 0,1 nós.
Nível não provisionado: exclui o RagManagedDb e a instância do Spanner subjacente. O nível não provisionado desativa o serviço do mecanismo de RAG da Vertex AI e exclui os dados mantidos nele, independente do banco de dados vetorial usado para seu RagCorpora. Isso interrompe a cobrança do serviço. Para mais informações sobre
faturamento, consulte Faturamento do mecanismo de RAG da Vertex AI.
Depois que os dados são excluídos, não é possível recuperá-los. Para voltar a usar o mecanismo de RAG da Vertex AI, atualize o nível chamando a API UpdateRagEngineConfig.
Extrair a configuração do projeto
Os exemplos de código a seguir demonstram como usar a API GetRagEngineConfig
para cada tipo de nível:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[],[],null,["# Understanding RagManagedDb\n\n| The [VPC-SC security controls](/vertex-ai/generative-ai/docs/security-controls) and\n| CMEK are supported by Vertex AI RAG Engine. Data residency and AXT security controls aren't\n| supported.\n\nThis page introduces you to `RagManagedDb`, its underlying technology, and how\n`RagManagedDb` is used in Vertex AI RAG Engine. In addition, this page\ndescribes the different tiers that are available to tune performance, which\nmight impact your costs, and provides instructions for deleting your\nVertex AI RAG Engine data, which stops billing.\n\nOverview\n--------\n\nVertex AI RAG Engine uses `RagManagedDb`, which is an enterprise-ready,\nfully-managed Google Spanner instance that's used for resource storage\nby Vertex AI RAG Engine and is optionally available to be used as\nthe [vector database of\nchoice](/vertex-ai/generative-ai/docs/rag-engine/use-ragmanageddb-with-rag) for your RAG corpora.\n\nThrough Spanner, Vertex AI RAG Engine offers a\nconsistent, highly available, and highly scalable database to support your\napplication. To learn more about Google Spanner, see\n[Spanner](/spanner).\n\nVertex AI RAG Engine stores your RAG corpus and RAG file resource\nmetadata in `RagManagedDb`, regardless of your choice of vector database. Vector\ndatabases are only used for storage and retrieval of embeddings. In addition to\nresource storage, `RagManagedDb` can also be used to store and manage vector\nrepresentations of your documents. The vector database is then used to retrieve\nrelevant documents based on the document's semantic similarity to a given query.\n\nManage tiers\n------------\n\nVertex AI RAG Engine lets you scale your `RagManagedDb` instance based\non your usage and performance requirements using a choice of two tiers, and\noptionally, lets you delete your Vertex AI RAG Engine data using\na third tier.\n\nThe tier is a project-level setting that's available in the `RagEngineConfig`\nresource that impacts RAG corpora using `RagManagedDb`. The following tiers\nare available in `RagEngineConfig`:\n\n- **Scaled tier**: This tier offers production-scale performance along with\n autoscaling functionality. It's suitable for customers with large amounts of\n data or performance-sensitive workloads. Internally, this tier sets the\n Spanner instance to autoscaling configuration with a minimum\n of 1 node (1,000 processing units) and a maximum of 10 nodes (10,000\n processing units).\n\n- **Basic tier (default)**: This tier offers a cost-effective and low-compute\n tier, which might be suitable for some of the following cases:\n\n - Experimenting with `RagManagedDb`.\n - Small data size.\n - Latency-insensitive workload.\n - Use Vertex AI RAG Engine with only other vector databases.\n\n To offer the Basic tier, `RagManagedDb` sets the underlying\n Spanner instance to a fixed configuration of 100 processing\n units, which is equivalent to 0.1 nodes.\n- **Unprovisioned tier** : This tier deletes the `RagManagedDb` and its\n underlying Spanner instance. The Unprovisioned tier disables\n the Vertex AI RAG Engine service and deletes your data held\n within this service regardless of the vector database used for your\n `RagCorpora`. This stops the billing of the service. For more information on\n billing, see [Vertex AI RAG Engine\n billing](/vertex-ai/generative-ai/docs/rag-engine/rag_engine_billing).\n\n After the data is deleted, the data can't be recovered. To start usingVertex AI RAG Engine again, you must update the tier by\n calling the `UpdateRagEngineConfig` API.\n\n| **Note:** The Enterprise tier from the `v1beta1` version was renamed to the Scaled tier.\n\nGet the project configuration\n-----------------------------\n\nThe following code samples demonstrate how to use the `GetRagEngineConfig` API\nfor each type of tier:\n\n- [Version 1\n (v1)](/vertex-ai/generative-ai/docs/model-reference/rag-api-v1#get_project_configuration) API\n code samples.\n\n- [v1beta1](/vertex-ai/generative-ai/docs/model-reference/rag-api#get-project-config-for-rag) API\n code samples.\n\nUpdate the project configuration\n--------------------------------\n\nThe following code samples demonstrate how to use the `UpdateRagEngineConfig`\nAPI for each type of tier:\n\n- [Version 1\n (v1)](/vertex-ai/generative-ai/docs/model-reference/rag-api-v1#update_project_configuration)\n API code samples.\n\n- [v1beta1](/vertex-ai/generative-ai/docs/model-reference/rag-api#update-project-config-for-rag)\n API code samples.\n\nWhat's next\n-----------\n\n- To learn how to use the RAG API v1, the default, see [RAG API\n v1](/vertex-ai/generative-ai/docs/model-reference/rag-api-v1).\n- To learn how to use the RAG API v1beta1, see [RAG API\n v1beta1](/vertex-ai/generative-ai/docs/model-reference/rag-api).\n- To learn more about `RagManagedDb` and how to manage your tier configuration as well as the RAG corpus-level retrieval strategy, see [Use RagManagedDb with\n Vertex AI RAG Engine](/vertex-ai/generative-ai/docs/rag-engine/use-ragmanageddb-with-rag)."]]