This document describes how to save and share prompts in Vertex AI Studio. Sharing prompts lets you collaborate with team members, ensure consistency, and build a library of effective prompts for various tasks.
Sharing works as follows:
By default, all Vertex AI users have full access to all saved prompts in the project. There is no need to share saved prompts with other users in the project unless organizational or project restrictions have been placed on them or specific resources like datasets.
Vertex AI users can share any prompt in the project, even prompts that were not created or saved by them.
Only Vertex AI users can share prompts. If an outside user is invited to collaborate on a prompt, they cannot share the prompt with another user.
Prompt sharing is per prompt, not per project. Invited users can access only the prompts that they have been invited to collaborate on. They don't have access to the other prompts in the project.
Before you begin
If the project hasn't enabled the prompt sharing feature yet, ask your administrator to enable it.
To enable prompt sharing, the administrator must have the following permissions:
Org level:
- Permissions to manage deny policies (
roles/iam.denyAdmin
)
- Permissions to manage deny policies (
Project level:
Permissions to manage custom roles (
roles/iam.roleAdmin
)Permissions to set and remove roles onto principals (
roles/resourcemanager.projectIamAdmin
)Permissions to manage service accounts (
roles/iam.serviceAccountAdmin
)Permissions to manage tags (
roles/resourcemanager.tagAdmin
)Permissions to use tags (
roles/resourcemanager.tagUser
)Permissions to use Vertex AI resources (
roles/aiplatform.user
)
Enable prompt sharing
To enable prompt sharing:
In Vertex AI Studio, go to either Prompt management or Chat playground
Open a saved prompt and click the
Share button.If your account has the permissions to enable sharing, you will see an Enable button.
If your account doesn't have the permissions to enable sharing, you will see a list of required roles.
Click Enable.
The system creates a project-level service account, known as the prompt sharing service account, in your project with the permissions required for prompt sharing. For more information, see Security information.
Save a prompt
To save a prompt for later use or sharing:
Go to Vertex AI Studio.
Write a new prompt or open an existing prompt.
Click the
Save button.
Share a saved prompt
Once prompt sharing is enabled, any Vertex AI user can share a saved prompt.
In Vertex AI Studio, go to either Prompt management or Chat playground
Open a saved prompt and click the
Share button.If prompt sharing was enabled successfully, you will see a window similar to the following:
When a prompt is shared, the recipient(s) of the shared prompt receive an email notification similar to the following:
Stop sharing a prompt
To revoke access to a prompt:
Open a saved prompt and click the
Share button.Next to the principals, select Remove and then click Save.
Note that deleting a saved prompt automatically removes access for anyone it was shared with.
Security information
When you enable prompt sharing, you grant the Vertex AI API service the permissions to invite users to your project on your behalf. Specifically, you create a project-level service account, known as the prompt sharing service account, in your project with the following permissions:
iam.roles.create
iam.roles.list
iam.roles.update
iam.roles.delete
resourcemanager.projects.setIamPolicy
resourcemanager.projects.getIamPolicy
cloudasset.assets.searchAllIamPolicies
To ensure that only the Vertex AI API service is authorized to use the prompt sharing service account, the system automatically creates a deny policy when prompt sharing is enabled.
What's Next
- Explore other features of Vertex AI Studio