google_ml_integration 扩展程序:google_ml_integration 扩展程序提供 AI 查询引擎功能,其中包括用于生成嵌入内容、进行语义排名以及实现基于 AI 的过滤、联接和文本生成/摘要的函数。此扩展程序还提供用于注册 AI 模型元数据的函数。然后,注册的元数据用于调用这些模型的预测。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[[["\u003cp\u003eAlloyDB AI provides machine learning capabilities to AlloyDB for PostgreSQL and AlloyDB Omni, allowing users to apply semantic and predictive power to their data.\u003c/p\u003e\n"],["\u003cp\u003eThe platform includes a customized \u003ccode\u003evector\u003c/code\u003e extension for storing and querying embeddings, as well as the \u003ccode\u003ealloydb_scann\u003c/code\u003e extension for efficient nearest-neighbor indexing, using algorithms like ScaNN.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB AI extends PostgreSQL with functions like \u003ccode\u003eInvoke predictions\u003c/code\u003e and \u003ccode\u003eGenerate embeddings\u003c/code\u003e, which allow for querying models using SQL and translating text prompts into numerical vectors, respectively.\u003c/p\u003e\n"],["\u003cp\u003eUsers can leverage the \u003ccode\u003eembedding()\u003c/code\u003e and \u003ccode\u003egoogle_ml.embedding()\u003c/code\u003e functions to query Vertex AI models, including the use of text embeddings, as well as custom hosted or third-party models.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB's integration with Vertex AI enables applications to invoke predictions using any model in the Vertex AI Model Garden and to generate embeddings using the \u003ccode\u003etext-embedding-005\u003c/code\u003e English models.\u003c/p\u003e\n"]]],[],null,["# Build generative AI applications using AlloyDB AI\n\nAs a PostgreSQL-compatible database, AlloyDB integrates\nseamlessly with the tools and frameworks supported by PostgreSQL, in addition to\nother services from the Google Cloud environment.\n\nAlloyDB AI provides a suite of AI and ML features that enable you to build\ngenerative AI applications. These features allow you to build\napplications with capabilities like vector search for semantic similarity,\nnatural language queries, and integration with machine learning models by providers, such as Google, OpenAI, and Anthropic.\n\nTo simplify the process of building AI applications, AlloyDB provides the following extensions:\n\n- **vector** extension: The standard [`pgvector` PostgreSQL\n extension](https://github.com/pgvector/pgvector?tab=readme-ov-file#indexing) is customized for AlloyDB, and referred to as `vector`.\n It supports storing generated embeddings in a vector column. The extension also\n adds support for scalar quantization features to create `IVF` indexes. You can\n also create an `IVFFlat` index or `HSNW` index that are available with stock\n `pgvector`.\n\n- **alloydb_scann** extension: The [`alloydb_scann` extension](https://cloud.google.com/alloydb/docs/ai/store-index-query-vectors?resource=scann#create-index) implements a highly efficient\n nearest-neighbor index powered by the [ScaNN\n algorithm](https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md).\n\n You can use the `alloydb_scann` extension with PostgreSQL 14 and 15 compatible databases.\n- **google_ml_integration** extension: The `google_ml_integration` extension\n provides the AI query engine feature, which includes functions for generating embeddings,\n semantic ranking, and implementing AI-based filters, joins and text\n generation/summarization. This extension also provides functions to register\n metadata for AI models. The registered metadata is then used to invoke predictions from these\n models.\n\n- **alloydb_ai_nl** extension: The `alloydb_ai_nl` extension enables developers\n to build applications that accurately and securely answer end user natural\n language questions about data in the AlloyDB database. This makes the data\n accessible to users who might not be proficient in writing SQL.\n\nThe following are some use cases that these extensions enable:\n\n- [Vector search](/alloydb/docs/ai/run-vector-similarity-search): Use AlloyDB to store vector embeddings and perform highly efficient similarity searches. You can generate a highly efficient nearest-neighbor index powered by the ScaNN algorithm.\n\n- [Perform intelligent SQL queries using AlloyDB AI query engine](/alloydb/docs/ai/evaluate-semantic-queries-ai-operators): Use AI directly within your SQL queries. This allows you to re-rank search results for higher relevance, integrate natural language into your SQL queries, and generate multimodal embeddings for vector search.\n\n- [Call models using model endpoints](/alloydb/docs/ai/model-endpoint-overview): Register AI models as model endpoints and call the endpoints from within AlloyDB to generate embeddings, invoke predictions, or perform similarity searches.\n\n- [Generate embeddings](/alloydb/docs/ai/work-with-embeddings) and [invoke predictions](/alloydb/docs/ai/invoke-predictions): Use Vertex AI text embedding models or registered model endpoints to generate text or multimodal embeddings.\n\n- [Generate SQL statements from natural language](/alloydb/docs/ai/natural-language-overview): Add natural language capabilities to your application, and interact with AlloyDB by asking questions in natural language. The natural language questions are then processed by AlloyDB AI to automatically generate an accurate SQL query that retrieve the answer.\n\nWhat's next\n-----------\n\n- [Perform vector search tutorial](/alloydb/docs/ai/perform-vector-search)\n\n- [Integrate AlloyDB with Vertex AI](/alloydb/docs/ai/configure-vertex-ai).\n\n- [Create indexes and query vectors](/alloydb/docs/ai/store-index-query-vectors)."]]