Google Sheets is one of the most widely used cloud-based document editors and many organizations around the world use it to store their data. Now, with the massive growth in AI that can generate natural language, LLMs have started immediately integrating these AI tools into their existing frameworks.
Microsoft and Adobe are collaborating with Firefly AI. Microsoft also integrated chatGPT into Excel. But now Google responded with its integration of Claude with Sheets.
What are the Use Cases of Google Sheets in Claude 3?
Generative AI models like Claude are incredibly useful in everyday tasks. They can help automate mathematical or summarizing operations on vast amounts of data stored on Sheets.
Claude can interpret both tabular data as well as information contained in charts and graphs. Its AI capabilities allow it to analyze data, make connections, and generate insights a human might miss. This can save users time and effort while enhancing their analysis.
Also note that the integration works without needing to share or upload any sheet data outside Google’s servers.
Within Google Sheets, Claude can be leveraged in various ways to enhance productivity and gain valuable insights from data. Some key use cases include:
- Data Summarization: Highlight a table or data range, and request Claude to summarize the critical points or discern trends present.
- Analytical Insights: Inquire about the conclusions that can be drawn from the available data, allowing it to provide analytical interpretations.
- Visualization Descriptions: Have it generate descriptive explanations for charts, graphs, or other visualizations within a sheet.
- Data Autofill: Select blank cells and prompt them to populate them with relevant data based on the surrounding context.
- Highlight Extraction: Ask it to pinpoint and extract key figures, pivotal data points, or essential takeaways from the data set.
- Visualization Recommendations: Leverage its capabilities to suggest optimal chart or graph types for effectively representing the data.
- Formula Optimization: Request it rewrite formulas, enhancing their efficiency or improving readability.
- Future Projections: Based on historical data, task it with projecting future values or trends.
- Trend Identification: Instruct it to highlight correlations, outliers, spikes, drops, or overall trends present within the data.
- Sheet Explanations: Seek an overview from it, explaining the calculations or representations within a particular sheet.
How to access Claude 3 AI on Google Sheets?
Claude on sheets can be accessed using an anthropic API token. The user’s account must have credits to be able to use this.
Step 1: Go to the Google Workspace marketplace and download the Claude for Sheets extension.
Step 2: Make an account on the Anthropic console and claim the free credits or add some additional credits to your account. Then, generate an API key for the extension.
Step 3: enter the API key in Google Sheets.
Open a spreadsheet in Google Sheets and go to the extensions tab. Select “Claude for Sheets” and enter your API key there.
Enable the use of Claude for Sheets inside the workbook:
- Go to Extensions > Add-ons > Manage add-ons.
- Click on the triple dots on the top right corner of the Claude for Sheets extension and make sure “Use in this document” is checked
Step 4: Start prompting!
There are two main functions you can use to call Claude using Claude for Sheets:
CLAUDE() =CLAUDE(prompt, model, params…)
CLAUDE() is the simplest way to call Claude using Claude for Sheets. To use this function, you need a simple plain-text prompt with no specific formatting.
if you put in a cell,
=CLAUDE("When was the US Constitution written?")
The add-on will make a Messages API call to Anthropic. Claude may respond with:
“The United States Constitution was written in 1787. It was ratified in 1788 and went into effect in 1789.“
2) CLAUDEMESSAGES()
=CLAUDEMESSAGES(prompt, model, params…)
Use CLAUDEMESSAGES() to send a series of User: and Assistant: messages to Claude, similar to using the anthropic Messages API. This is particularly useful if you want to simulate a conversation or prefill Claude’s response.
Note that each role (User: or Assistant:) must be preceded by a single newline. To enter newlines in a cell, use the following key combinations:
For Mac, use Cmd + Enter, and for Windows, use Alt + Enter.
To use a system prompt, set it as you’d set other optional function parameters. (You must first set a model name.)
=CLAUDEMESSAGES("User: Got anything to say to me? Assistant:", "claude-2.0", "system", "You are a cow who loves to moo in response to any and all user queries.")
The parameters you might care about most are:
- “max_tokens_to_sample”: the total number of tokens the model outputs before it is forced to stop. For yes/no or multiple choice answers, you probably want 1-2. Otherwise, you’ll want as many as 200 if you want a long answer.
- “Temperature”: the amount of randomness injected into results. For multiple-choice or analytical tasks, you’ll want it close to 0. For idea generation, you’ll want it set to 1.
3) [Legacy] CLAUDEFREE()
=CLAUDEFREE(prompt, model, params…)
CLAUDEFREE() allows you to call Claude as if you were using the legacy Text Completions API. To use this function, you will have to manually sandwich your prompt between
“/n/n” Human:
and
“\n\n” Assistant:
as you would for a Text Completions prompt. Replace \n\n with two actual new lines when writing your prompt in a cell.
To use it otherwise, here is a guide on how to access Claude 3 models.
Conclusion
Claude is a greatly impactful integration, especially for organizations that use Google Sheets daily. The Extension will help to analyze customer data, and project numbers for marketing campaigns, all in the Sheet itself, which reduces a large amount of manual effort for formulas or numerical computation.