Google cloud solution hybrid search alloydb

From google/skills · View interactive version

Google cloud solution hybrid search alloydb is an AI agent skill from the GitHub repository google/skills. Discovers requirements and generates architectural, design, and deployment guidance for dynamic hybrid search systems by combining semantic search and keyword search. Optimized for AlloyDB hybrid search use cases in Google Cloud. Use when users need vector search combined with structured SQL filteri

How to use this skill

Skill file

Dynamic Hybrid Search using AlloyDB

This skill provides a workflow to design and implement secure, low-latency, and

high-accuracy hybrid search solutions combining structured dataset filtering,

vector search indexing, faceted metadata filtering, semantic reranking, recall

evaluation, in-database AI validation, database abstraction layers, and

serverless application hosting.

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you

MUST read and follow the instructions in

Usage Attribution.

Overview of the workflow

The workflow consists of the following phases:

  1. Requirements discovery. Gather detailed requirements related to

the cloud workload or use case that the user needs assistance for.

  1. Solution architecture. Use the requirements that were gathered

in Phase 1 to generate a detailed solution architecture for the cloud

workload or use case.

  1. Solution validation. Create a plan to validate the generated

solution, generate validation instructions and scripts, and run the

validation.

  1. Solution packaging and presentation. Consolidate the generated

content and present the solution.

Important notes about the workflow:

ask the user clarifying questions, DON'T recommend, propose, or outline any

architectural designs, cloud services, or component mappings. This prevents

premature architecture commitments or hallucinations before the full scope is

understood.

to "obtain approval before proceeding", you MUST stop executing, present the

completed tasks to the user, and wait for their explicit approval. You MUST

NOT proceed to execute any subsequent tasks or generate any further guidance

in that response.

first look in the following resources:

required guidance. If the guidance does not provide the required information,

you MUST ground the generated content by using the following resources:

https://developers.google.com/knowledge/mcp.md.txt

Related Guidance

Product Renaming & Terminology

When generating solution designs, architecture diagrams, and documentation,

check the latest Google Cloud documentation for the most up-to-date product

names. The table below provides examples of name mappings to be aware of. Note

that underlying APIs, Terraform resources, and IAM roles may retain their legacy

identifiers.

<table>

<thead>

<tr>

<th>Legacy Name</th>

<th>Updated Name</th>

<th>Notes</th>

</tr>

</thead>

<tbody>

<tr>

<td>Vertex AI</td>

<td>Gemini Enterprise Agent Platform</td>

<td>Gemini Enterprise Agent Platform can be shortened to Agent Platform after first instance</td>

</tr>

<tr>

<td>Vertex AI Embedding</td>

<td>Text embedding on Gemini Enterprise Agent Platform</td>

<td>This refers to the text embedding models available on Gemini Enterprise Agent Platform</td>

</tr>

<tr>

<td>Vertex AI Matching Engine</td>

<td>Vector Search</td>

<td></td>

</tr>

</tbody>

</table>

Phase 1: Requirements discovery

In this phase, you must gather detailed requirements related to the hybrid

search workload that the user wants to design and deploy in Google Cloud.

Acknowledge provided requirements: If the

user's prompt already contains some requirements (functional or non-functional,

such as catalog size, search modalities, faceted attributes, or latency

targets), you MUST explicitly acknowledge and restate all of these requirements

in your response. Do NOT ask the user to describe or re-describe any

requirements that they have already provided in the prompt.

Complete the following steps strictly in the specified order:

workload, including catalog dataset details (e.g., e-commerce apparel, retail

products, patent database), search modalities (natural language text, visual

search, attribute filters), metadata attributes for faceted filtering (e.g.,

category, sub_category, color, gender, price), and quality checks

(reranking, LLM validation).

following six categories of non-functional requirements. You need this

information because each category represents a critical architectural pillar,

and neglecting any of them can result in a solution that is insecure,

unreliable, or inefficient (do NOT omit any of them):

Service Connect, Direct VPC Egress, and access control.

(RTO/RPO), regional vs multi-region AlloyDB topology.

Gemini Enterprise Agent Platform API calls.

automated deployment.

search recall target (e.g., > 95%), catalog item scale, and QPS

expectations.

cloud providers or on-premises.

architecture of the current deployment.

workloads, products, or tools (e.g., existing inventory databases, ERP

systems, application runtime languages like Java or Python).

whether there are any ambiguities, conflicts, or contradictions in the

functional requirements, non-functional requirements, and dependencies. You

MUST compare all requirements against each other to identify any conflicts.

If you identify any ambiguities, conflicts, or contradictions in the

requirements that the user has provided, you MUST do the following for each

ambiguity, conflict, or contradiction:

user why the requirements are incompatible and cannot be simultaneously

satisfied. Do NOT treat fundamental contradictions as design choice

questions (e.g., asking how to implement or configure a conflicting

requirement).

contradiction.

"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 or Google Cloud product recommendations.

provided by the user into a consolidated requirements summary.

obtain approval (the user MUST explicitly say "yes" or "I approve") before

proceeding to Phase 2.

Important: STOP, DON'T proceed to generate architecture diagram,

architecture description or product recommendations until you have confirmed the

generated requirements summary and resolved all ambiguities and contradictions

in this phase.

Phase 2: Solution architecture

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

component of the user's workload, prioritizing Google Cloud products.

Important: The Google Cloud products and features that you recommend

MUST be consistent with the guidance in

Product Mapping.

obtain approval (the user MUST explicitly say "yes" or "I approve") before

proceeding to Task 2.2.

Important: STOP, DON'T proceed to generate architecture diagram until

you have confirmed the generated product recommendations with the user.

Task 2.2: Generate an architecture diagram and description

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 gathered requirements and product

recommendations. The diagram MUST explicitly show both the ingestion pipeline

and serving pipeline.

The following is an example of the data flows and request flows that the

architecture diagram should show:

(apparels) -> B-Tree Indexes on Facets -> Text embedding

(text-embedding-005) -> ScaNN Vector Index.

Toolbox for Databases -> AlloyDB Single-Query Hybrid Search (ScaNN Vector

Search + SQL WHERE Filters) -> ai.rank Reranker -> Gemini Pro

ai.generate Quality Validation -> Validated Results -> User Browser.

component, the relationships between the components, and the task flow or data

flow.

to the user and obtain approval (the user MUST explicitly say "yes" or "I

approve") before proceeding to Task 2.3.

Important: STOP, DON'T proceed to generate design recommendations

until you have confirmed the generated architecture description with the user.

Task 2.3: Generate design recommendations.

optimally configure each component in the architecture based on the workload

requirements.

Important:

Design Recommendations.

following skills:

approval (the user MUST explicitly say "yes" or "I approve") before

proceeding to Task 2.4.

Important: STOP, DON'T proceed to generate deployment guidance until

you have confirmed the design recommendations with the user.

Task 2.4: Generate deployment guidance.

following:

alloydb_scann), tables, B-Tree indexes, ScaNN vector indexes, hybrid

search SQL, and Gemini validation CTEs.

Important: The deployment guidance that you generate MUST be consistent

with the guidance in the following resources:

https://github.com/google/skills/tree/main/skills/cloud

obtain approval (the user MUST explicitly say "yes" or "I approve") before

proceeding to Phase 3.

Important: STOP, DON'T proceed to generate solution validation until

you have confirmed the deployment guidance with the user.

Phase 3: Solution validation

Task 3.1: Pre-deployment validation

generated solution and verify that it meets the workload requirements

without provisioning live resources:

resources that will be provisioned using dry-run commands (e.g.,

terraform plan or (where supported) gcloud ... --dry-run).

network routing topologies, firewall rules, and IAM enforcement against

best practices.

approval (the user MUST explicitly say "yes" or "I approve"), and execute the

dry-run commands.

identified during dry-run checks until validation succeeds.

Task 3.2: Runtime validation (Post-deployment)

now to perform live runtime verification, or skip directly to Phase 4.

verification commands (using tools like curl, ping, or gcloud)

and provide them to the user to execute, to test live endpoint

reachability, networking paths, and load balancer routing.

Phase 4: Solution packaging and presentation

Phase 2 into a single Markdown file named solution-architecture-guide.md,

based on the template in Output Template.

user's workspace.

the user's workspace.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.