Functions & Syntax
=EXTRUCT_LLM()
Use state-of-the-art LLMs to structure data or generate content
Introduction
As the name suggests,=EXTRUCT_LLM() is a function that calls LLM. Always prefer this function over =EXTRUCT()
if you do not need to research the information but want to apply LLMs on top of the content that already exists in your spreadsheet.
Syntax
Parameter | Value | Description |
---|---|---|
prompt | string | Prompt to the LLM. |
llmModel | gpt3 , gpt4o-mini , gpt4o , haiku , sonnet35 | Which LLM model to use. We support both OpenAI and Anthropic. The default is gpt4o-mini . |
outputFormat | "text" , "url" , "number" , or a list of output values | Output Format. The default is text , which means no additional formatting is applied to the result. If a list of values is passed (e.g. {"private", "public"} ), Extruct will select one of the provided values for the answer. You can provide custom formatting instructions directly in prompt . |
To include context into the
Example:
prompt
, use the concatenation &
operator. Example:
"Based on the company product overview, describe its UVP as a list of bullets. Product overview: " & A1
Examples
Name | Formula |
---|---|
Normalize Company Name | =EXTRUCT_LLM("Based on a company name, return normalized (as if written by human) version of the name I can use for the email. Company Name: " & A1) |
Email Icebreaker | =EXTRUCT_LLM("Based on person's LinkedIn profile data, summarize its work & education background as a bulleted list of one-liners. Linkedin data: " & A1, "sonnet35") |
Data Categorization | =EXTRUCT_LLM("Given company revenue information, categorize it into one of the revenue range buckets. Company revenue: " & A1, "haiku", {"less than $10 million", "more than $10 million"}) |
Output Formats
Identical to =EXTRUCT().
Supported LLM models
At the moment, we support the following models:
Provider | Model Name | llmModel value |
---|---|---|
OpenAI | GPT3.5 | gpt3 |
OpenAI | GPT4o Mini | gpt4o-mini |
OpenAI | GPT4o | gpt4o |
Anthropic | Haiku 3 | haiku |
Anthropic | Sonnet 3.5 | sonnet35 |
We do not support the most expensive models, such as OpenAI GPT-4 Turbo and Anthropic Opus, for two reasons:
- They incur massive costs when running LLMs for many rows.
- GPT4o or Sonnet 3.5 performs exceptionally well for most practical tasks.
Our Recommendation
- Start with the default
- Sonnet 3.5 for sophisticated content generation tasks (e.g., personalized email generation)
- Haiku 3 or Sonnet 3.5 for extremely long inputs (hundreds of words)
- Haiku 3 or Sonnet 3.5 for tasks where some level of reasoning is involved (e.g., categorize numerical input into buckets)