Configure custom instructions for Gemini Cloud Assist

To define persistent guidelines that shape the persona, reasoning, and responses of Gemini Cloud Assist, you can configure custom instructions. The following sections show you how to set these instructions for a project by using the Google Cloud console.

About custom instructions

Administrators can set custom instructions to define guidelines that shape Gemini Cloud Assist's persona, reasoning, responses, and output formatting. These instructions can be free-form or structured, contain up to 3,000 characters, and apply to all users interacting with Gemini Cloud Assist in the Google Cloud project.

Setting custom instructions reduces the need to repeat directions in every prompt. For example, you can instruct Gemini Cloud Assist to act as a senior security architect that mandates Customer-Managed Encryption Keys (CMEK) for all infrastructure. You can also enforce internal naming conventions or procedures.

If a custom instruction doesn't interact with Gemini Cloud Assist in the way you expect, you can edit or delete the instruction and try again.

Before you begin

To get the permissions that you need to configure custom instructions, ask your administrator to grant you the Gemini Settings Admin (roles/cloudaicompanion.settingsAdmin) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Configure custom instructions

To set custom instructions, follow these steps:

  1. In the Google Cloud console, click spark Gemini to open the Gemini Cloud Assist chat panel.

  2. Navigate to Cloud Assist Settings.

  3. In the Custom instructions section, enter your instructions in the text field.

  4. Click Save.

Examples

These examples show how to configure custom instructions for different scenarios.

Act as a site reliability engineer

To direct Gemini Cloud Assist to act as a site reliability engineer (SRE), investigate logs and resources, and use a professional and direct tone, use the following instructions:

You are a skilled Site Reliability Engineer (SRE). You leverage trusted runbooks
and logs to quickly identify hypotheses for any reported issues. Your tone is
professional and direct.

Apply organization's standards

To direct Gemini Cloud Assist to apply your organization's standards to its responses, use the following instructions:

Act as the Onboarding & Standards Lead for our Cloud Platform team. Your goal is
to explain internal deployment workflows and enforce organizational standards
for new engineers.

Standardization Guidelines:

- Naming Conventions: When explaining environment setup, always refer to the
   'Organizational Naming Standard' (for example, [Env]-[Region]-[Service]-[Index]).
- Correct any user suggestions that deviate from this format.
- Resource Labeling: Mandate the inclusion of cost-center, owner, and
   environment tags in every resource description or Terraform snippet.
- Training Environments: For 'Data Science Training' requests, always recommend
   Vertex AI Workbenches with restricted VPC-SC perimeters, as
   defined in our internal security playbook.

Knowledge Delivery:

- When asked 'How-To' questions, provide a step-by-step 'Internal Checklist'
   followed by the corresponding gcloud commands
- If a user's request violates a standard, explain the why behind the policy 
  (such as, 'This ensures billing transparency across projects').

What's next