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"]],["上次更新時間:2025-09-03 (世界標準時間)。"],[[["\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)."]]