Receber por email
← Voltar para o catálogo

gcp-alloydb-ai-developer

Projete e construa aplicações com IA no AlloyDB para PostgreSQL usando AlloyDB AI, que abrange busca vetorial, busca híbrida, funções SQL de IA, gerenciamento de endpoints de modelo e o runtime de borda AlloyDB Omni. Esta skill é para desenvolvimento de aplicações de IA, enquanto gcp-alloydb-cloudsql-dba cuida de operações de cluster e tarefas de DBA.

19estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: Apache-2.0

Como adicionar

/plugin marketplace add Raishin/vanguard-frontier-agentic

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/gcp-alloydb-ai-developer/svg)](https://www.skillteca.com.br/skills/gcp-alloydb-ai-developer)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

GCP AlloyDB AI Developer

Overview

AlloyDB AI is a collection of features built into AlloyDB for PostgreSQL that enables AI-powered search and SQL-native inference — including pgvector integration for vector similarity search, hybrid search combining vector + full-text BM25 scoring, AI SQL functions that invoke hosted models directly from SQL queries, and model endpoint management for custom or Vertex AI models.

Core AlloyDB AI Capabilities

  1. Vector search with pgvector — store and query embeddings using <=>, <->, <#> operators; HNSW and IVFFlat index types
  2. Hybrid search — combine pgvector cosine similarity with full-text search (tsvector/tsquery) for more relevant retrieval
  3. AI SQL functions — google_ml.predict_row, google_ml.embedding, ai.generate_text, ai.classify, ai.score — invoke AI models from SQL without leaving the database
  4. Model endpoint management — register Vertex AI model endpoints or Gemini models as AlloyDB model resources; control access via IAM
  5. AlloyDB Omni — run AlloyDB (including AlloyDB AI) on-premises or at the edge in a container

Quick Start (pgvector + hybrid search)

-- Enable extensions
CREATE EXTENSION vector;
CREATE EXTENSION google_ml_integration;

-- Create table with embedding column
CREATE TABLE documents (
  id BIGSERIAL PRIMARY KEY,
  content TEXT,
  embedding vector(768)
);

-- Generate embeddings using AlloyDB AI function
UPDATE documents
SET embedding = google_ml.embedding('text-embedding-004', content);

-- Vector similarity search
SELECT id, content, embedding <=> $1 AS distance
FROM documents
ORDER BY distance LIMIT 10;

-- Hybrid search (vector + BM25 full-text)
SELECT id, content,
  (1 - (embedding <=> $1)) * 0.7 + ts_rank(to_tsvector(content), query) * 0.3 AS score
FROM documents, to_tsquery($2) query
WHERE to_tsvector(content) @@ query
ORDER BY score DESC LIMIT 10;

Reference Directory

Load only when needed:

| Scenario | Trigger Keywords | Reference | |---|---|---| | Vector search setup | pgvector, embedding, similarity, HNSW, IVFFlat | references/vector-search.md | | AI SQL functions | ai_generate, ai_classify, google_ml, predict_row | references/ai-functions.md | | Hybrid search | hybrid, BM25, full-text, combined search | references/hybrid-search.md | | Model endpoints | Vertex AI model, custom model, endpoint, model registry | references/model-endpoints.md | | AlloyDB Omni | on-premises, edge, container, Omni | references/alloydb-omni.md | | IAM & security | auth, service account, IAM, private IP, PSC | references/iam-security.md |

Key Rules

  • Always use pgvector's HNSW index for production vector search — IVFFlat requires manual reindexing as data grows
  • The google_ml_integration extension must be enabled and the AlloyDB service account granted roles/aiplatform.user to call Vertex AI models from SQL
  • Hybrid search weight tuning (e.g., 0.7 vector + 0.3 BM25) should be validated against your retrieval quality metrics — defaults are starting points
  • AlloyDB AI functions execute synchronously within SQL transactions — avoid calling slow models in high-frequency OLTP paths
  • AlloyDB Omni supports AlloyDB AI locally without Google Cloud connectivity — ideal for edge inference with pre-loaded models
  • Separate the embedding pipeline (batch UPDATE) from the query path — do not regenerate embeddings on every SELECT

Official Docs

  • https://cloud.google.com/alloydb/docs/ai/overview
  • https://cloud.google.com/alloydb/docs/ai/vector-embeddings
  • https://cloud.google.com/alloydb/docs/omni/overview

Security Notes

Read-only planning and advisory. Do not modify production AlloyDB schemas, model endpoint registrations, or IAM bindings without explicit approval.

Compartilhar X LinkedIn