If you're participating in the Alpha programme, see this article to learn about the AI function.
You can use the AI function to:
- Generate text.
- Summarise information.
- Categorise information.
- Analyse sentiment.
To generate columns of data, you can enter a specific prompt to describe your desired action and add an optional range: =AI("prompt", [optional range])
For example: =AI("write a thank you email and personalise it to the specific gift that was received", A2:C2)
Use the AI function
- On your computer, open a spreadsheet from Google Sheets.
- In a cell, enter an AI function.
- For example:
=AI("Generate slogan for event in 10 words or less", A2)
- For example:
- Select the cell or cells with an AI function.
- Click Generate and insert.
- Optional: To refresh output, click Refresh and insert.
Tip: When you click 'Generate and insert' or 'Refresh and insert', generated content is inserted and the cell edit is attributed to you in version history.
You can use the AI function to:
- Generate text: To generate text tailored to your data, Gemini for Workspace uses relevant information from your sheet.
- Summarise information: To help you understand your data, Gemini for Workspace analyses the content of your spreadsheet and extracts important key takeaways.
- Categorise information: To help you detect patterns, Gemini for Workspace categorises your data into groups. This includes sentiment analysis.
Check some samples
- Generate new text
=AI("Generate slogan for event in 10 words or less", A2)
=AI("Create an email to the reviewer addressing specific items in their reviews.", A2:G2)
=AI("develop a list of keywords for the job title based on the summary of duties.", A2:C2)
- Summarise input cell or range
=AI("For the customer, write a one-sentence summary of their feedback.", A2:D2)
=AI("You are the owner of a pet sitting business. Write a two-sentence summary for the customer about their pet's last stay. Be a little funny.", F2)
=AI("List in bullet points the main themes of the book summary.", D2)
- Categorise inputs based on given definitions or generic categories
=AI("Classify the preview as either a spam email or not a spam email.", D2)
=AI("Categorise the customer enquiry as a compliment, exchange request or return request.",C2)
=AI("Classify the restaurant by which New York City borough it belongs to. Use the neighbourhood to help.", A2:C2)
- Analyse sentiment
=AI("Classify the sentiment of the estate agent analysis.", D2)
=AI("Perform sentiment analysis on the emails sent by the customers to the barbershop.", C2)
=AI("Classify the body of the email, as either positive, negative or neutral.", D2)
Tip: If you want to refer to two ranges that aren't contingent, you can use concatenation in the prompt. However, if there's a change in the data in ranges that are part of the prompt, you don't get a prompt to refresh the data.
For example, if you use the function =AI("Find the major themes in the customer feedback of '&B2&' using the comments: '&D2&'")
, when B2 or D2 change, you need to manually determine when to refresh the data.
Syntax
AI("prompt",[range])
- Prompt: A specific prompt that describes your desired action.
- Range: This is optional. It's the range that the prompt refers to when it generates data.
Give feedback on generated output
Gemini for Google Workspace is constantly learning and may not be able to support your request. Because feedback may be human readable, please do not submit data that contains personal, confidential or sensitive information.
If you get a suggestion that's inaccurate or that you feel is unsafe, you can submit feedback. Your feedback can help improve AI-assisted Workspace features and broader Google efforts in AI.
-
At the bottom right of the generated text, click Good suggestion
or Bad suggestion
.
-
In the pop-up window, you can select the data that you want to share along with your feedback, which includes:
-
Prompts
-
Ranges
-
Only the referenced cells are collected and their context isn't shared.
-
-
Outputs
-
-
If you don't want to share certain data, you can untick it.
-
If you select Bad suggestion
, to select the issue that you found and enter additional feedback, click Next.
-
If you select Good suggestion
, click Submit.
-
To provide general feedback on this feature, at the top, click Help Help Sheets improve.
To report a legal issue, create a request.
Learn about the limitations of the AI functions
- Responses are limited to text.
- The AI function doesn't have access to your entire spreadsheet or other files in your Google Drive.
- To provide data or context to your prompt, add the data to your current spreadsheet and use the optional input argument.
- You can't undo or redo your function.
- You can regenerate your output instead.
- You can't have more than one function with the same name in Sheets. If you build a custom function with the name '=AI', the custom function remaps to the Sheets AI function.
- Embedded AI functions aren't supported.
- For example:
=IF(AI("sentiment analysis", A2),"negative",0)
- For example:
- If 'AI function not available' shows, it could mean that:
- The feature is still in the rollout stage.
- You don't have access to the AI function because of your Admin settings or your language setting, which should be set to English. Learn how to change your language setting.
- The AI function has short-term and long-term generation limits. If you reach a long-term limit, you temporarily can't click 'Generate'.
- You can select multiple cells with AI functions and generate outputs; however, only the first 200 selected cells with AI functions will be generated. You can wait for the generation to complete and select more cells to generate outputs.
Turn off the AI function
To turn off any of the features in Google Workspace Labs, you must exit Workspace Labs. If you exit, you can't rejoin Workspace Labs and permanently lose access to all Workspace Labs features.
Learn how to exit Workspace Labs.
If you use AI functions after you exit Workspace Labs:
-
The error 'AI function not available' shows.
-
You can't generate output with AI functions.
Learn about Workspace Labs feature suggestions
- Workspace Labs feature suggestions don’t represent Google’s views, and should not be attributed to Google.
- Don’t rely on Workspace Labs features as medical, legal, financial or other professional advice.
- Workspace Labs features may suggest inaccurate or inappropriate information. Your feedback makes Workspace Labs more helpful and safe.
- Don’t include personal, confidential, or sensitive information in your prompts.
- Google uses Workspace Labs data and metrics to provide, improve, and develop products, services, and machine learning technologies across Google.
- Your Workspace Labs Data may also be read, rated, annotated, and reviewed by human reviewers. Importantly, where Google uses Google-selected input (as described in the Privacy Notice) to generate output, Google will aggregate and/or pseudonymize that content and resulting output before it is viewed by human reviewers, unless it is specifically provided as part of your feedback to Google.
How Workspace Labs data in Google Sheets is collected
When you use the AI function in Google Sheets, Google uses and stores the following data:
- Prompts you enter or select
- Generated content
- Google Workspace content that you have access to that is referenced to generate content (both Google-selected input and user-provided input).
- Your feedback on the Sheets AI function.
To understand how this data is used, review the Google Workspace Labs Privacy Notice and Terms for Personal Accounts.