google-cloud-solution-rag-enterprise-search-gke-sqldb

google/skills

Выявляет требования и формирует архитектурные и deployment-рекомендации для корпоративного поиска с RAG в Google Cloud, когда нужна SQL-база с поддержкой векторов в качестве хранилища.

Звёзды24 404
Авторgoogle
Установок6,2K

Установка

SKILL.md

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.

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. Если пользователь запрашивает изменения, внесите необходимые изменения.

  4. Повторяйте шаги 2 и 3, пока пользователь не подтвердит, что сгенерированные рекомендации по развертыванию соответствуют его требованиям.

  5. Перейдите к фазе 3.

Фаза 3: Валидация решения

  1. Создайте план валидации сгенерированного решения. План должен описывать шаги, необходимые для проверки того, что сгенерированное решение соответствует требованиям рабочей нагрузки. Ниже приведены примеры шагов валидации:
    • Пробный запуск развертывания: Выполните такие команды, как terraform plan для предварительного просмотра инфраструктурных ресурсов, которые будут подготовлены.
    • Связность и маршрутизация: Проверьте сетевые пути, маршрутизацию балансировщика нагрузки и конечные точки сервисов.
    • Векторный индекс: Убедитесь, что векторные индексы правильно созданы и заполнены в базе данных AlloyDB. Это может включать запросы к базе данных для проверки статуса и содержимого индекса.
    • Конвейер эмбеддингов: Протестируйте сквозной конвейер эмбеддингов от приема данных до векторного хранилища, убедившись, что документы разбиваются на фрагменты, преобразуются в эмбеддинги и сохраняются корректно.
    • Задержка извлечения: Измерьте задержку векторных и гибридных поисковых запросов к векторному хранилищу AlloyDB, чтобы убедиться, что производительность соответствует требованиям.
    • Точность извлечения: Выполните выборочные запросы и оцените релевантность извлеченных документов или фрагментов.
    • Политики безопасности: Проверьте ограничение доступа, правила брандмауэра и применение IAM.
  2. Представьте план валидации пользователю и запросите обратную связь или одобрение.
  3. Если пользователь запрашивает изменения, обновите план по мере необходимости.
  4. Повторяйте шаги 2 и 3, пока пользователь не одобрит план валидации.
  5. Сгенерируйте скрипты или команды с помощью таких инструментов, как curl or gcloud для выполнения шагов утвержденного плана валидации.
  6. Запросите у пользователя разрешение на выполнение проверок валидации.
  7. Если пользователь дает разрешение, выполните проверки валидации и устраните любые проблемы развертывания.
  8. Когда все проверки валидации пройдены, переходите к фазе 4.

Фаза 4: Упаковка и представление решения

  1. Объедините итоговые текстовые артефакты, сгенерированные на фазе 2, в единый файл Markdown с именем solution-architecture-guide.md, на основе шаблона в assets/output-template.md.
  2. Запросите разрешение пользователя на запись файлов кода в рабочей области пользователя.
  3. После того как пользователь даст разрешение, запишите итоговые файлы кода в рабочей области пользователя.

Вспомогательные ссылки

  • references/product-selection-recommendations.md
  • references/design-recommendations.md
  • references/related-documentation.md

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: google-cloud-solution-rag-enterprise-search-gke-sqldb](https://darkplay.ru/ai/skills/google-skills-google-cloud-solution-rag-enterprise-search-gke-sqldb)

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

Build Error Resolveraffaan-m · Специалист по устранению ошибок сборки и TypeScript. Используйте ПРОАКТИВНО при сбое…
225 587 ★
Cpp Build Resolveraffaan-m · Специалист по ошибкам сборки C++, CMake и линковки.
225 587 ★
Dart Build Resolveraffaan-m · Специалист по ошибкам сборки Dart/Flutter, зависимостей и build_runner.
225 587 ★
Django Build Resolveraffaan-m · Специалист по ошибкам Django: pip/Poetry, миграции, импорты, collectstatic.
225 587 ★
Flutter Revieweraffaan-m · Ревьюер кода Flutter и Dart: виджеты, управление состоянием, идиомы и архитектура.
225 587 ★
Go Build Resolveraffaan-m · Специалист по ошибкам сборки Go: исправляет build, go vet и предупреждения линтера.
225 587 ★
Java Build Resolveraffaan-m · Специалист по ошибкам сборки Java/Maven/Gradle: определяет Spring Boot или Quarkus и…
225 587 ★
Kotlin Build Resolveraffaan-m · Специалист по ошибкам сборки Kotlin/Gradle: компилятор, зависимости и Gradle.
225 587 ★
Pytorch Build Resolveraffaan-m · Специалист по ошибкам PyTorch: формы тензоров, CUDA, градиенты и DataLoader.
225 587 ★
Rust Build Resolveraffaan-m · Специалист по ошибкам сборки Rust: cargo, borrow checker и Cargo.toml.
225 587 ★

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации изображений

Генерация изображений

Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты

MagviMagvi
По запросу
5.0
DALL-E 3OpenAI
По подписке
5.0
SupaLabSupalab
По запросу
5.0
Freestyling.aiFreestyling
Есть бесплатный тариф
4.9
ArtGeneration.meArtgeneration
Есть бесплатный тариф
4.9
BigjpgBigjpg
По запросу
4.9
Художник от VKVK
Бесплатно
4.9
Wonderink — ИИ-книги
Есть бесплатный тариф
4.8
Avato AI12ai
По запросу
4.8
Virton AIVirton
По запросу
4.8