Installation

Install as Agent Plugin Recommended
copilot plugin marketplace add samueltauil/skills-hub
copilot plugin install google-cloud-solution-rag-enterprise-search-gke-sqldb@skills-hub

Works with GitHub Copilot CLI and VS Code (enable chat.plugins.enabled). Plugin google-cloud-solution-rag-enterprise-search-gke-sqldb v1.0.0 follows the Agent Plugins spec.

Install with the gh extension
gh skills-hub install google-cloud-solution-rag-enterprise-search-gke-sqldb

Don't have the extension? Run gh extension install samueltauil/skills-hub first.

Download and extract to your repository:

.github/skills/google-cloud-solution-rag-enterprise-search-gke-sqldb/

Extract the ZIP to .github/skills/ in your repo. The folder name must match google-cloud-solution-rag-enterprise-search-gke-sqldb for Copilot to auto-discover it.

Skill Files (6)

SKILL.md 15.7 KB
---
name: google-cloud-solution-rag-enterprise-search-gke-sqldb
metadata:
  version: "1.0.1"
  category: MultiProductSolutions
description: >-
  Discovers requirements, and generates architectural, design, and deployment
  guidance for a retrieval-augmented generation (RAG)-capable enterprise search
  system in Google Cloud. Use when users need a vector-enabled SQL database as
  the store and index for the embedding vectors, an open model and open-source
  inferencing framework, and Kubernetes containers to host all the application
  components. DON'T use this skill for fully-managed RAG, or SaaS search
  services, or when a non-SQL vector database is required.
---

# RAG for enterprise search using GKE and AlloyDB

This skill provides a workflow to design and implement a secure, low-latency,
and high-accuracy RAG-enabled conversational search solution for private
enterprise content by using an AlloyDB database, Cloud Storage, and a Google
Kubernetes Engine (GKE) cluster to host all the application components,
including an open model and an open-source inference framework.

## Attribution

**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
MUST read and follow the instructions in
[Usage Attribution](references/attribution.md).

## Overview of the workflow

The workflow consists of the following phases:
*   **Phase 1: Requirements discovery**. Gather detailed requirements related to
    the cloud workload or use case that the user needs assistance for.
*   **Phase 2: Solution architecture**. Use the requirements that were gathered
    in Phase 1 to generate a detailed solution architecture for the cloud
    workload or use case.
*   **Phase 3: Solution validation**. Create a plan to validate the generated
    solution, generate validation instructions and scripts, and run the
    validation.
*   **Phase 4: Solution packing and presentation**. Consolidate the generated
    content and present the solution.

**Important notes about the workflow**:

*   **Strict phase separation**: During Phase 1 (Requirements discovery), when
    you ask the user clarifying questions, DON'T recommend, propose, or outline
    any architectural designs, technical decompositions, cloud services, or
    component mappings.

*   **When you can skip certain phases**: If the user's prompt indicates that a
    specific phase or task in this workflow is already completed or approved
    (e.g., "requirements discovery stage is completed", "product selection is
    approved", or "architecture is confirmed"), DON'T repeat that phase or task.
    Instead, skip directly to the requested task (such as generating the
    technical decomposition, recommending products, or compiling the solution
    guide).

## Phase 1: Requirements discovery

In this phase, you must gather detailed requirements related to the RAG workload
that the user wants to design and deploy in Google Cloud.

Complete the following steps strictly in the specified order:
1.  Ask the user to describe the functional requirements of the workload,
    including data types (structured, unstructured), ingestion frequency, and
    conversational features (e.g., multi-turn chat, citation requirements).
2.  Ask the user to describe the following non-functional requirements:
    *   **Security, privacy, and compliance**: E.g., network isolation, private
        endpoints, data residency, and requirements for compliance.
    *   **Reliability**: E.g., scaling, high availability, resilience against
        zone or regional outages, disaster recovery goals for RTO and RPO.
    *   **Cost**: E.g., cost of compute, storage, and database resources.
    *   **Operational excellence**: E.g., monitoring, alerts, and logging.
    *   **Performance**: E.g., data upload speed, performance expectations for
        generating embedding vectors, and latency requirements for model
        responses and data retrieval queries (including vector and hybrid
        search).
    *   **Sustainability**: E.g., carbon footprint, low-carbon regions.
3.  Ask the user whether the workload currently runs on other cloud providers or
    on-premises.
    *   If the user's answer is "yes", then ask the user to describe the
        architecture of the current deployment.
    *   If the user's answer is "no", then proceed to the next step.
4.  Ask the user to describe dependencies, if any, on other workloads, products,
    or tools (e.g., identity providers, external sources, CRM/ERP database
    integrations).

5.  Review the input that the user has provided so far, and check whether there
    are any ambiguities or contradictions.

    If you identify any ambiguities or contradictions in the requirements that
    the user has provided, then
    do the following for each ambiguity or contradiction that you identify:
    *   Describe the ambiguity or contradiction.
    *   Ask the user how they wish to resolve the ambiguity or contradiction.
        *   If the user delegates the choice to you (e.g., the user replies with
            "do what you think is best" or "you decide"), then provide a clear
            suggestion to resolve the ambiguity or contradiction, explain your
            reasoning, and ask the user to approve your suggestion.

    **Critical**: Until all the ambiguities and contradictions that you identify
    are resolved according to the preceding guidance, you must NOT recommend or
    generate any architecture design, technical decomposition, or Google Cloud
    product recommendations.

6.  **Important**: DON'T start this step if there are unresolved contradictions
    or ambiguities from Step 5.

    Generate a technical decomposition of the components of the workload. The
    technical decomposition must break down the solution into logical
    components, as follows:
    *   **Data ingestion**: Blob storage for raw corporate documents.
    *   **Data processing and chunking**: Containerized pipeline to extract
        data, clean it, and chunk it.
    *   **Embedding vectors generation**: Containerized service to convert data
        chunks to embedding vectors.
    *   **Storing and indexing the embedding vectors**: Vector-enabled SQL
        database for storing embedding vectors.
    *   **Handling non-vector data**: Preparing non-vector data, like tables,
        views, and aggregations for data retrieval. Analyzing whether any
        indexing, partitioning, or other performance techniques can be applied
        on the original data schema.
    *   **Query and retrieval**: Accepting client queries, identifying intent,
        and routing to a retrieval workflow, which might include conversion of
        the request to an embedding for semantic search, extracting and applying
        filters for filtered search or supplying all to the hybrid search.
    *   **Prompt augmentation**: Augmenting the prompts with the retrieved
        context.
    *   **Response generation**: Requesting and generating responses from the
        model.
    *   **Response sanity checks**: Evaluating responses using an AI model and
        performing procedural checks according to defined criteria.
7.  Ask the user to approve the generated technical decomposition.

    **Critical**: You MUST stop execution immediately, call no more tools (such
    as file editors, searches, or code tools), and wait for the user to respond
    with their feedback or approval in the chat. Do NOT compile the
    architecture, recommend products, construct maps, or write any files/drafts
    for Phase 2 until the user's explicit approval is received.
8.  If the user requests changes, then generate an updated technical
    decomposition.
9.  Repeat steps 5 through 8 until the user approves the generated technical
    decomposition.
10. Only after the user has explicitly approved the technical decomposition,
    proceed to Phase 2.

    **Important**: You are strictly prohibited from recommending product
    choices, generating the architecture diagram, or drafting design
    recommendations until the technical decomposition is approved.

## Phase 2: Solution architecture

### Ground all generated content

For each task in this phase, to ensure that the generated content aligns with
the latest and official Google Cloud guidance, you must ground the generated
content by using the following resources:
*   Google Developer Knowledge MCP server:
    https://developers.google.com/knowledge/mcp.md.txt
    *   Server: https://developerknowledge.googleapis.com/mcp
        *   Tools:
            *   `developerknowledge:search_documents`
            *   `developerknowledge:get_documents`
            *   `developerknowledge:answer_query`
*   Relevant skills from https://github.com/google/skills
*   Official Google Cloud documentation, including the following:
    *   **Primary architecture reference**:
        https://docs.cloud.google.com/architecture/rag-capable-gen-ai-app-using-gke.md.txt
    *   **Architecture guidance and decision-making guides**:
        -   `references/product-selection-recommendations.md`
        -   `references/design-recommendations.md`
        -   `references/related-documentation.md`

For each item in the generated guidance, you must include citations to the
relevant official Google Cloud documentation pages.

### Task 2.1: Identify Google Cloud products and features required for the workload.

1.  Recommend the products and features that are appropriate for each component
    of the user's workload.

    **Important**: The Google Cloud products and features that you recommend
    MUST be consistent with the guidance in
    `references/product-selection-recommendations.md`.
2.  Present the generated product recommendations and ask the user to approve
    the recommendations.
3.  If the user requests changes, then make the required changes.
4.  Repeat steps 2 and 3 until the user approves the product recommendations.
5.  After the user approves the product recommendations, proceed to Task 2.2.

### Task 2.2: Generate an architecture diagram.

1.  Generate an architecture diagram in the Mermaid format:
    https://github.com/mermaid-js/mermaid.

    The diagram must show the data flows and request flows across the components
    of the architecture, based on the technical composition that you generated.

    The following is an **example** of the data flows and request flows that the
    architecture diagram should show:
    *   **Embedding pipeline (batch/streaming)**: Data source -> Cloud Storage
        -> Cloud Storage FUSE -> GKE Ray Worker (Chunking) --> Embedding
        generation using GemmaEmbedding -> AlloyDB.
    *   **Serving pipeline (real-time)**: User client -> GKE Frontend (LangChain
        Orchestration) -> Database Query (semantic or hybrid search on the
        vector store) -> Retrieve matching data -> Augment prompt -> Gemma vLLM
        endpoint API -> Output (Responsible AI filtering) -> User client.
2.  Present the generated diagram to the user and ask the user to approve the
    architecture diagram.
3.  If the user requests changes, then make the required changes.
4.  Repeat steps 2 and 3 until the user approves the architecture diagram.
5.  After the user approves the architecture diagram, proceed to Task 2.3.

### Task 2.3: Generate an architecture description.

1.  Generate a description that explains the purpose of each component, the
    relationships between the components, and the task flow or data flow.
2.  Present the generated architecture description to the user and ask the user
    to approve the description.
3.  If the user requests any changes, then make the required changes.
4.  Repeat steps 2 and 3 until the user approves the architecture description.
5.  After the user approves the architecture description, proceed to Task 2.4.

### Task 2.4: Generate design recommendations.

1.  Generate design recommendations and best practices to optimally configure
    each component in the architecture based on the workload's requirements.

    **Important**: The design recommendations and best practices that you
    generate MUST be consistent with the guidance in the resources that are
    listed in the following files:
    -   `references/related-documentation.md`
    -   `references/design-recommendations.md`
2.  Present the generated recommendations to the user and ask whether the user
    needs any changes.
3.  If the user needs changes, then make the required changes.
4.  Repeat steps 2 and 3 until the user confirms that the generated design
    recommendations meet their requirements.
5.  Proceed to Task 2.5.

### Task 2.5: Generate deployment guidance.

1.  Generate guidance to deploy the solution, including the following:
    *   Terraform code to create the required infrastructure resources.
    *   Steps or scripts to deploy workloads, such as Ray-on-GKE (KubeRay
        coordinator and worker nodes) and the LangChain frontend deployment.

    **Important**: The deployment guidance that you generate MUST be consistent
    with the guidance in the resources that are listed in the following
    resources:
    -   `references/related-documentation.md`
    -   `references/design-recommendations.md`
    -   Relevant skills in
        https://github.com/google/skills/tree/main/skills/cloud
2.  Present the generated deployment guidance to the user and ask whether the
    user needs any changes.
3.  If the user requests changes, then make the required changes.
4.  Repeat steps 2 and 3 until the user confirms that the generated deployment
    guidance meets their requirements.
5.  Proceed to Phase 3.

## Phase 3: Solution validation

1.  Create a plan to validate the generated solution. The plan must outline the
    steps that are necessary to verify that the generated solution meets the
    workload's requirements. The following are examples of validation steps:
    *   **Deployment dry-run**: Run commands like `terraform plan` to preview
        the infrastructure resources that will be provisioned.
    *   **Connectivity and routing**: Verify network paths, load balancer
        routing, and service endpoints.
    *   **Vector index**: Verify that vector indexes are correctly created and
        populated in the AlloyDB database. This can involve querying the
        database to check index status and content.
    *   **Embedding pipeline**: Test the end-to-end embedding pipeline from data
        ingestion to vector storage, ensuring documents are chunked, embedded,
        and stored correctly.
    *   **Retrieval latency**: Measure the latency of vector and hybrid search
        queries against the AlloyDB vector store to ensure performance meets
        requirements.
    *   **Retrieval accuracy**: Perform sample queries and evaluate the
        relevance of retrieved documents or chunks.
    *   **Security policies**: Verify restricted access, firewall rules, and IAM
        enforcement.
2.  Present the validation plan to the user and request feedback or approval.
3.  If the user requests changes, update the plan as required.
4.  Repeat steps 2 and 3 until the user approves the validation plan.
5.  Generate scripts or commands using tools like `curl` or `gcloud` to perform
    the steps in the approved validation plan.
6.  Request permission from the user to perform the validation checks.
7.  If the user gives permission, run the validation checks and troubleshoot any
    deployment issues.
8.  When all the validation checks pass, proceed to Phase 4.

## Phase 4: Solution packaging and presentation

1.  Consolidate the final text artifacts that were generated in Phase 2 into a
    single Markdown file named `solution-architecture-guide.md`, based on the
    template in `assets/output-template.md`.
2.  Request the user's permission to write the code files in the user's
    workspace.
3.  After the user gives permission, write the final code files in the user's
    workspace.

## Supporting references

-   `references/product-selection-recommendations.md`
-   `references/design-recommendations.md`
-   `references/related-documentation.md`
assets/
output-template.md 5.5 KB
<!-- Use this template to compile the content that you generate based on the
instructions in `SKILL.md`. -->

# Google Cloud solution architecture: RAG for enterprise search using GKE and AlloyDB

## 1. Executive summary and workload overview

[A brief description of the conversational search workload, the business goals
of the enterprise search system, and the proposed high-level RAG solution
architecture combining GKE orchestration with AlloyDB vector search]

## 2. Requirements and current state

### 2.1. Functional requirements

*   **Business processes**: [Details of the enterprise documents and
    conversational search processes that the workload supports]
*   **Activities and use cases**: [Details of user interactions and task/data
    flows: e.g., query rates, chunking/embedding batch ingestion schedules, and
    retrieval needs]

### 2.2. Non-functional requirements

*   **Security**: [Details of security requirements: e.g., identity and access
    control, network isolation, private endpoints, data residency, and any
    compliance requirements.]
*   **Reliability**: [Details of reliability requirements: e.g., resource
    scaling, HA, multi-zone vs. regional, SLA]
*   **Cost**: [Details of cost constraints]
*   **Operations**: [Details of operational requirements: e.g., logging,
    monitoring]
*   **Performance**: [Details of performance requirements: e.g., search
    latencies, content generation speed]
*   **Sustainability**: [Details of resource utilization and carbon footprints]

### 2.3. Current state

[If applicable, describe the current on-premises or other-cloud solution.]

*   **Current solution**: [Details of existing indexes or databases]
*   **Pain points and drivers for migration/redesign**: [Details about why the
    existing solution is not optimal]

### 2.4. Dependencies

*   **Internal dependencies**: [Details of internal dependencies: e.g., ERP,
    CRM, or identity directories]
*   **External dependencies**: [Details of external connections: e.g., public
    datasets, SaaS platforms]

## 3. Technical decomposition of the workload

[Technical decomposition of the workload components, breaking down the
application into logical layers: data ingestion, data preprocessing & chunking,
embedding generation, creating/updating the vector index, context retrieval,
prompt augmentation, and response generation.]

## 4. Proposed solution architecture

### 4.1. Google Cloud products and features mapping

[List the Google Cloud products and features mapped to the technical components
of the workload. For each component, justify the selection, note alternatives
considered, and describe the pros and cons of the recommended product/feature.]

### 4.2. Architecture diagram

[Architecture diagram in the Mermaid format showing the relationships and data
flows between the components.]

### 4.3. Architecture description

[Detailed description of the architecture. Describe the task flow and data flow
between the components.]

*   **Embedding flow**: [E.g., document ingestion, FUSE mounting, chunking logic
    in Ray, vectorization, and SQL inserting.]
*   **Serving flow**: [E.g., prompt submission, database lookup, prompt
    augmentation, calling Gemma vLLM endpoint API, and safety filtering.]

## 5. Design and configuration recommendations

### 5.1. Security, privacy, and compliance

*   **Access control**: [E.g., IAM-based authentication]
*   **Data protection**: [E.g., Cloud KMS CMEK, Sensitive Data Protection
    scanning of ingestion documents]
*   **Network security**: [E.g., Private IP only for AlloyDB and GKE, Private
    Service Connect (PSC), VPC Service Controls perimeters]

### 5.2. Reliability

*   **Redundant deployment**: [E.g., Regional GKE cluster across three zones,
    AlloyDB HA instance]
*   **Backup and disaster recovery**: [E.g., AlloyDB backup and recovery, GKE
    image streaming to avoid cold starts]

### 5.3. Operational excellence

*   **Monitoring and logging**: [E.g., Cloud Logging, Cloud Monitoring, System
    Insights, Query Insights]
*   **Infrastructure as Code (IaC)**: [E.g., Terraform for infra provisioning]

### 5.4. Cost optimization

*   **Sizing and scaling**: [E.g., GKE Autopilot scaling, Spot VMs for Ray
    workers, Object Lifecycle Management on Storage]
*   **Pricing models**: [E.g., Committed Use Discounts (CUD) for AlloyDB and GKE
    compute]

### 5.5. Performance efficiency

*   **Caching and database indexing**: [E.g., HNSW index strategy for fast ANN
    searches, performance tracking using Query Insights]
*   **Data updates**: [E.g., Parallel composite uploads to Cloud Storage]

### 5.6. Sustainability

*   [E.g., Serverless API offloading, GKE right-sizing node utilization]

## 6. Deployment guidance

[Instructions and code for deploying the RAG architecture.]

### 6.1. Deployment prerequisites

*   [E.g., Enabled APIs: container.googleapis.com, sqladmin.googleapis.com,
    secretmanager.googleapis.com, aiplatform.googleapis.com]
*   [E.g., Tools: Google Cloud CLI, Terraform, kubectl, helm]

### 6.2. Step-by-step deployment instructions

1.  [E.g., Terraform init and apply for infra setup]
2.  [E.g., Install KubeRay operator on GKE and submit chunking job]
3.  [E.g., Connect to Postgres, verify pgvector extension, test query flow]

## 7. Validation plan

[Details of the steps to verify that the generated solution meets the workload's
requirements. Also include references to any validation scripts that were
generated.]

## 8. References

[Links to useful and authoritative resources, such as relevant Google Cloud
documentation pages.]
references/
attribution.md 2.0 KB
# Usage Attribution

**MUST READ**: Before executing any `gcloud`, REST API, or MCP command with
this skill, follow these usage attribution instructions. Tag every command you
execute directly in the terminal so usage can be attributed. The tag identifies
only the skill and its version; it carries no user data.

-   **`gcloud` CLI Commands**: Prefix every `gcloud` invocation, whatever the
    subcommand, with the metrics environment variable. Set it inline on each
    command because shell state may not persist between commands:

    ```bash
    CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:google-cloud-solution-rag-enterprise-search-gke-sqldb)" \
    gcloud <command> [flags]
    ```

    Do not use `gcloud config set` for this: it would persist beyond the current
    task and mislabel unrelated usage.

-   **Direct HTTP, REST, and MCP Requests**: On direct HTTP calls to Google
    Cloud APIs (for example with `curl`) or HTTP requests to a remote MCP
    server, include
    `agent-skills/1.0 (skill:google-cloud-solution-rag-enterprise-search-gke-sqldb)`
    in the `User-Agent` header. If a `User-Agent` header is already specified,
    append this string to the end of it rather than overwriting existing
    `User-Agent` data — the collection pipeline parses the
    `agent-skills/<version>` and `skill:<name>` tokens, so any rewording breaks
    attribution:

    ```
    User-Agent: <existing_user_agent> agent-skills/1.0 (skill:google-cloud-solution-rag-enterprise-search-gke-sqldb)
    ```

-   **Constraint for Generated Code**: The tracking prefix is strictly for
    commands you execute directly in the terminal. Do NOT include this tracking
    prefix in generated scripts, Terraform templates, or code provided to the
    user for their own repositories.

-   **User Opt-Out**: If the user asks to disable or remove tracking or
    attribution tags, omit the `CLOUDSDK_METRICS_REQUEST_ATTRIBUTION` variable
    and custom `User-Agent` suffix from all commands.
design-recommendations.md 1.9 KB
# Design recommendations

*   The design recommendations that you generate MUST be based on and consistent
    with the guidance in the resources that are listed in
    `references/related-documentation.md`.

*   When you generate design recommendations, consider the following:

    *   Functional requirements that were gathered in Phase 1.
    *   Non-functional requirements that were gathered in Phase 1.

*   To generate guidance for the non-functional requirements, use the following
    skills, as appropriate:

    -   `google-cloud-waf-security`
    -   `google-cloud-waf-reliability`
    -   `google-cloud-waf-cost-optimization`
    -   `google-cloud-waf-operational-excellence`
    -   `google-cloud-waf-performance-optimization`
    -   `google-cloud-waf-sustainability`

*   Make sure that your recommendations cover the following:

    *   **Security, privacy, and compliance**:
        *   Data encryption, e.g., using customer-managed keys (CMEK)
        *   Access control
        *   Network security
        *   Protection of sensitive data
        *   Security features provided by GKE Autopilot
        *   Active Assist recommendations for security
    *   **Reliability**:
        *   High availability
        *   Autoscaling
        *   Data durability and redundancy
        *   Reliability advantages of GKE Autopilot
        *   Active Assist recommendations for reliability
    *   **Cost optimization**:
        *   Storage cost
        *   Compute utilization
        *   Database resource optimization
        *   AI models token optimization if model as a service is used
        *   Cost-optimization opportunities with GKE Autopilot
        *   Active Assist recommendations for cost optimization
    *   **Performance optimization**:
        *   Efficiency of data ingestion
        *   Efficiency of vector and hybrid search for low retrieval latency
        *   Container start time
        *   Active Assist recommendations for performance optimization
product-selection-recommendations.md 2.9 KB
# Product-selection recommendations

This file provides Google Cloud product recommendations for specific components
of a RAG workload that uses a vector-enabled SQL database as the store and index
for the embedding vectors, an open model and open-source inferencing framework,
and Kubernetes containers to host all the application components.

**Important**:

*   Don't recommend any products that are deprecated, retired, decommissioned,
    or unsupported. Verify the status of the products by using the resources
    that are listed in the "Ground all generated content" section in
    `../SKILL.md`.
*   Don't recommend any features that are deprecated, retired, decommissioned,
    or unsupported. Verify the status of the features by using the resources
    that are listed in the "Ground all generated content" section in
    `../SKILL.md`.
*   If multiple products or features can be used for a component of the
    workload, then do the following:
    *   Recommend the most appropriate product or feature. When alternative
        products exist, the relevant product documentation might provide
        guidance on when to recommend each product. Follow that guidance.
    *   Mention the available alternative products or features.
    *   Explain the pros and cons of each alternative product or feature.

## Component-specific product recommendations

*   **Storage**: Recommend Cloud Storage for raw document storage. Recommend
    using the Cloud Storage FUSE CSI driver to mount buckets directly to GKE
    processing Pods for seamless access.
*   **Orchestration and compute**: Recommend GKE Autopilot as the default to
    automate node management and right-size resource allocation. Use Ray (Ray
    Data and Ray Core) on GKE to orchestrate multi-worker chunking and
    preprocessing jobs.
*   **Embedding vectors store and index**: Recommend AlloyDB for PostgreSQL.
    Explain that this choice provides the following advantages:
    *   Enables standard relational enterprise metadata to exist alongside
        embedding vectors, avoiding database silos.
    *   Provides full PostgreSQL compatibility and advanced embedding and
        vector-indexing capabilities.
*   **Generation of embedding vectors and responses**: Recommend an open model
    like GemmaEmbedding to generate embedding vectors and Gemma to generate
    responses. Recommend an open-source inferencing framework (e.g., vLLM)
    that's hosted on GKE.
*   **Alternatives**: Mention the following alternatives:
    *   For the embedding vectors index, suggest Cloud SQL for PostgreSQL (with
        the `pgvector` extension) and Vector Search on Gemini Enterprise Agent
        Platform as alternatives.
    *   For generating embedding vectors, suggest the Embeddings API of Gemini
        Enterprise Agent Platform Embeddings API as an alternative.
    *   For inferencing, suggest Gemini Enterprise Agent Platform as an
        alternative. Enumerate the relative pros and cons of each alternative.
related-documentation.md 7.4 KB
# Related documentation

## Table of contents

-   [Architecture guides](#architecture-guides): Lines 12 to 44
-   [Deployment guides](#deployment-guides): Lines 45 to 55
-   [Product-specific best practices guides](#product-specific-best-practices-guides):
    Lines 56 to 80
-   [Product-specific decision-making guides](#product-specific-decision-making-guides):
    Lines 81 to 109

## <a name="architecture-guides"></a>Architecture guides

Use the following reference architectures and design guides to design
infrastructure for a RAG workload on Google Cloud:

-   [RAG infrastructure for generative AI using GKE and Cloud SQL](https://docs.cloud.google.com/architecture/rag-capable-gen-ai-app-using-gke.md.txt):
    A flexible, container-based architecture that provides maximum control to
    build custom applications with open source tools such as Ray, Hugging Face,
    and LangChain.
-   [RAG infrastructure for generative AI using Gemini Enterprise and Agent Platform](https://docs.cloud.google.com/architecture/rag-genai-gemini-enterprise-vertexai.md.txt):
    An agent-driven architecture that uses Gemini Enterprise as a unified
    platform to orchestrate an end-to-end RAG dataflow for enterprise
    applications that require real-time data availability and enriched
    contextual search.
-   [RAG infrastructure for generative AI using Agent Platform and Vector Search](https://docs.cloud.google.com/architecture/gen-ai-rag-vertex-ai-vector-search.md.txt):
    A fully managed, serverless architecture that provides optimized,
    high-performance vector search for large-scale applications.
-   [RAG infrastructure for generative AI using Agent Platform and AlloyDB for PostgreSQL](https://docs.cloud.google.com/architecture/rag-capable-gen-ai-app-using-vertex-ai.md.txt):
    An architecture that stores vector embeddings alongside your operational
    data in a fully managed database like AlloyDB for PostgreSQL.
-   [Harness CI/CD pipeline for RAG applications](https://docs.cloud.google.com/architecture/partners/harness-cicd-pipeline-for-rag-app.md.txt):
    An architecture for a continuous integration (CI) and continuous deployment
    (CD) pipeline for a RAG application in Google Cloud.
-   [Private connectivity for RAG-capable generative AI applications](https://docs.cloud.google.com/architecture/private-connectivity-rag-capable-gen-ai.md.txt):
    Guidance to configure private endpoints and private service connections for
    secure RAG data ingestion and processing.
-   [Networking for AI inference model serving on GKE](https://docs.cloud.google.com/architecture/networking-for-ai-inference-gke.md.txt):
    Guidance to structure load balancers and private VPC subnets to serve AI
    models on GKE securely.
-   [RAG infrastructure for generative AI using Gemini Enterprise and Vector Search](https://docs.cloud.google.com/architecture/gen-ai-rag-vertex-ai-vector-search.md.txt):
    Design considerations and guidelines for leveraging the Gemini Enterprise
    Agent Platform with Vector Search.

## <a name="deployment-guides"></a>Deployment guides

Use the following resources to generate the deployment guidance:

-   Example blueprints and Notebooks for RAG on GKE:
    https://gke-ai-labs.dev/docs/blueprints/rag-on-gke/
-   Reference architecture for running inference workloads on GKE:
    https://github.com/GoogleCloudPlatform/accelerated-platforms/blob/main/docs/platforms/gke/base/use-cases/inference-ref-arch/README.md
-   Build a RAG chatbot with GKE and Cloud Storage:
    https://docs.cloud.google.com/kubernetes-engine/docs/tutorials/build-rag-chatbot.md.txt

## <a name="product-specific-best-practices-guides"></a>Product-specific best practices guides

The following guides provide optimization guidelines and operational best
practices for the products used in this RAG architecture.

-   [Optimize GKE for machine learning inference](https://docs.cloud.google.com/kubernetes-engine/docs/best-practices/machine-learning/inference.md.txt):
    Best practices for optimizing ML inference workloads, reducing cold-start
    latency, and sizing compute profiles.
-   [Best practices for running cost-effective applications on GKE](https://docs.cloud.google.com/architecture/best-practices-for-running-cost-effective-kubernetes-applications-on-gke.md.txt):
    Best practices for running cost-effective, containerized Kubernetes
    applications.
-   [Cloud SQL for PostgreSQL: Example of an embedding workflow](https://docs.cloud.google.com/sql/docs/postgres/understand-example-embedding-workflow.md.txt)
    Guide with example of embedding workflow using an AI embedding model as a
    service.
-   [Generate and manage auto vector embeddings for large tables in AlloyDB](https://docs.cloud.google.com/alloydb/docs/ai/generate-manage-auto-embeddings-for-tables.md.txt):
    Guide about embedding generation in AlloyDB.
-   [Build generative AI applications using AlloyDB AI](https://docs.cloud.google.com/alloydb/docs/ai.md.txt):
    AI tools and options to build a RAG workflow using AlloyDB.
-   [Parallel composite uploads strategy](https://docs.cloud.google.com/storage/docs/parallel-composite-uploads.md.txt):
    Guide to designing high-throughput object upload pipelines using parallel
    composite uploads.
-   [GKE Autopilot security measures](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/autopilot-security.md.txt):
    Security best practices and posture configurations for GKE Autopilot
    clusters.

## <a name="product-specific-decision-making-guides"></a>Product-specific decision-making guides

Use the following comparison guides to evaluate design trade-offs and options in
the GKE and AlloyDB RAG stack.

-   [Choose GKE cluster mode](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/choose-cluster-mode.md.txt):
    GKE Autopilot versus GKE Standard modes of operation.
-   [GKE Autopilot compute classes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/autopilot-compute-classes.md.txt):
    Predefined ComputeClasses for GKE Autopilot Pods (Balanced, Scale-Out, GPU
    options like L4).
-   [Agent Platform RAG Engine: vector database choices](https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/rag-engine/vector-db-choices.md.txt):
-   [Choose a connectivity option for AlloyDB](https://docs.cloud.google.com/alloydb/docs/choose-alloydb-connectivity.md.txt):
    Compares AlloyDB connectivity methods, including AlloyDB Auth Proxy, Private
    Service Connect (PSC), and direct VPC peering, to help you select the
    appropriate method.
-   [Choose an AlloyDB machine type](https://docs.cloud.google.com/alloydb/docs/choose-machine-type.md.txt):
    Explains how to select the appropriate machine type for your AlloyDB primary
    and read instances based on vCPUs, memory, and performance.
-   [Choose a vector index in AlloyDB AI](https://docs.cloud.google.com/alloydb/docs/ai/choose-index-strategy.md.txt):
    Compares indexing strategies to help you choose the appropriate model for
    vector search. When to use Cloud SQL `pgvector` vs. Agent Platform Vector
    Search.
-   [PostgreSQL pgvector indexing strategy](https://github.com/pgvector/pgvector#indexing):
    Comparing HNSW and IVFFlat indices in `pgvector` for approximate nearest
    neighbor (ANN) search.
-   [Cloud SQL for PostgreSQL configuration choices](https://docs.cloud.google.com/sql/docs/postgres/instance-settings.md.txt):
    Selecting machine series, storage type, and other configuration options for
    Cloud SQL for PostgreSQL instances.

License (Apache-2.0)

View full license text
Licensed under the Apache License, Version 2.0. See https://github.com/google/skills/blob/main/LICENSE