PostgreSQL 호환 데이터베이스인 AlloyDB는 Google Cloud 환경의 다른 서비스뿐만 아니라 PostgreSQL에서 지원하는 도구 및 프레임워크와 원활하게 통합됩니다.
AlloyDB AI는 생성형 AI 애플리케이션을 빌드할 수 있는 AI 및 ML 기능 모음을 제공합니다. 이러한 기능을 사용하면 시맨틱 유사성을 위한 벡터 검색, 자연어 쿼리, Google, OpenAI, Anthropic과 같은 제공업체의 머신러닝 모델과의 통합과 같은 기능을 갖춘 애플리케이션을 빌드할 수 있습니다.
AI 애플리케이션 빌드 프로세스를 간소화하기 위해 AlloyDB는 다음 확장 프로그램을 제공합니다.
vector 확장 프로그램: 표준 pgvector PostgreSQL 확장 프로그램이 AlloyDB에 맞게 맞춤설정되었으며 vector로 지칭됩니다.
생성된 임베딩을 벡터 열에 저장하는 것을 지원합니다. 또한 이 확장 프로그램은 스칼라 양자화 기능을 지원하여 IVF 색인을 만듭니다. 스톡 pgvector에서 사용할 수 있는 IVFFlat 색인 또는 HSNW 색인을 만들 수도 있습니다.
PostgreSQL 14 및 15 호환 데이터베이스에서 alloydb_scann 확장 프로그램을 사용할 수 있습니다.
google_ml_integration 확장 프로그램: google_ml_integration 확장 프로그램은 임베딩 생성, 의미론적 순위 지정, AI 기반 필터, 조인, 텍스트 생성/요약 구현을 위한 함수를 포함하는 AI 쿼리 엔진 기능을 제공합니다. 이 확장 프로그램은 AI 모델의 메타데이터를 등록하는 함수도 제공합니다. 등록된 메타데이터는 이러한 모델에서 예측을 호출하는 데 사용됩니다.
alloydb_ai_nl 확장 프로그램: alloydb_ai_nl 확장 프로그램을 사용하면 개발자가 AlloyDB 데이터베이스의 데이터에 관한 최종 사용자의 자연어 질문에 정확하고 안전하게 답변하는 애플리케이션을 빌드할 수 있습니다. 이렇게 하면 SQL 작성에 능숙하지 않은 사용자도 데이터에 액세스할 수 있습니다.
다음은 이러한 확장 프로그램이 지원하는 몇 가지 사용 사례입니다.
벡터 검색: AlloyDB를 사용하여 벡터 임베딩을 저장하고 매우 효율적인 유사성 검색을 실행합니다. ScaNN 알고리즘으로 구동되는 매우 효율적인 최근접 이웃 색인을 생성할 수 있습니다.
AlloyDB AI 쿼리 엔진을 사용하여 지능형 SQL 쿼리 실행: SQL 쿼리 내에서 직접 AI를 사용합니다. 이를 통해 관련성이 높은 검색 결과를 다시 순위 지정하고, SQL 쿼리에 자연어를 통합하고, 벡터 검색을 위한 멀티모달 임베딩을 생성할 수 있습니다.
모델 엔드포인트를 사용하여 모델 호출: AI 모델을 모델 엔드포인트로 등록하고 AlloyDB 내에서 엔드포인트를 호출하여 임베딩을 생성하거나, 예측을 호출하거나, 유사성 검색을 실행합니다.
임베딩 생성 및 예측 호출: Vertex AI 텍스트 임베딩 모델 또는 등록된 모델 엔드포인트를 사용하여 텍스트 또는 멀티모달 임베딩을 생성합니다.
자연어에서 SQL 문 생성: 애플리케이션에 자연어 기능을 추가하고 자연어로 질문하여 AlloyDB와 상호작용합니다. 그런 다음 AlloyDB AI가 자연어 질문을 처리하여 답변을 검색하는 정확한 SQL 쿼리를 자동으로 생성합니다.
[[["이해하기 쉬움","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-04(UTC)"],[[["\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)."]]