# Charm Documentation

Welcome to the Charm Documentation!

Charm is a Google Sheets add-on that automates mundane spreadsheet tasks with AI.

For an overview of Charm, check out the [Charm Homepage](https://charm.shubhro.com/).


# Introduction to Templates

Charm offers several templates that help people complete common workflows faster.&#x20;


# Compose From Scratch

Use the Compose From Scratch template to create new data or content with no prior input data.

Example things you can create with this template:

* Marketing taglines
* Brainstorm ideas
* Longform content

Tips for using this template:

* Be specific when describing the subject. If the initial output is not what you're looking for, try describing the subject with different words.
* Phrase the subject as a noun, not a command. For example, write "tagline for shoes" instead of "write me a tagline for shoes".


# Compose With Input Data

Use the Compose With Input Data template to create new data or content with existing input data.

Example things you can create with this template:

* Marketing taglines specific to a list of items in your spreadsheet
* Product descriptions
* Longform content specific to a list of topics

Tips for using this template:

* Use the term `{{ input }}` to refer to an input cell value when describing the subject.
* Be specific when describing the subject. If the initial output is not what you're looking for, try describing the subject with different words.
* Phrase the subject as a noun, not a command. For example, write "tagline for shoes" instead of "write me a tagline for shoes".


# Summarize With Bullet Points

Use the Summarize With Bullet Points template to generate summaries of existing long content in the form of a short list of bullets.

Tips for using this template:

* Select a bullet length appropriate for your input data.
* Try generating bullets over a small input data range to verify desired behavior before extending to a larger range.


# Translate Language

Use the Translate Language template to translate existing content into another language.

Example languages you can translate to/from:

* English
* French
* Arabic
* Japanese
* ...

Tips for using this template:

* Always remember to verify output for correctness, as translations may occasionally be inaccurate.


# Generate Dummy Data

Use the Generate Dummy Data template to create synthetic data from scratch.

Example data you can create with this template:

* First and last names
* Addresses
* Phone numbers

Tips for using this template:

* Be specific in your description of the entity you're looking to generate. For example "indian first and last name" offers different results than just "first and last name". Similarly, "UK address" offers different results than just "address".
* Describe your desired entity only as a descriptive noun in the singular tense, not a command.
* Don't use the word "random" in the entity description, as randomness is already applied when the charm runs.


# Extract

Use the Extract template to isolate a specific entity from a larger body of text.

Example things you can do with this template:

* Extract addresses from messy text data
* Identify company names mentioned in longer reports
* Isolate first and last name from a body of text

Tips for using this template:

* Describe the component you're looking to extract in as few words as needed.
* Describe the component only as a descriptive noun, not a command.


# Classify Single

Use the Classify template to categorize text into one of a number of classes.

Example things you can do with this template:

* Categorize product feedback by themes
* Classify book titles and descriptions into subject areas

Tips for using this template:

* Keep the list of categories a reasonable range-- fewer than ten.
* Use descriptive names for the categories, so that their meanings can be inferred.


# Classify Multiple

Use the Classify Multiple template to categorize text into any number of relevant pre-defined classes.

It's similar to the Classify Single template, but with the ability to return multiple categories.

Example things you can do with this template:

* Categorize product feedback by themes
* Classify book titles and descriptions into subject areas

Tips for using this template:

* Keep the list of categories a reasonable range-- fewer than ten.
* Use descriptive names for the categories, so that their meanings can be inferred.


# Categorize Feedback

Use the Categorize Feedback template to specifically categorize product feedback text into one of a number of themes.

Tips for using this template:

* Keep the list of themes a reasonable range-- fewer than ten.
* Use descriptive names for the themes, so that their meanings can be inferred.


# Transform

Use the Transform template to rewrite existing text data into a new format.

Example things you can do with this template:

* Change the tone of existing content
* Rewrite content to be shorter or longer
* Transform data (e.g. phone number) into an alternative format

Tips for using this template:

* Be concise, but specific, when describing your target format. If the initial output doesn't appear to be what you're looking for, try adjusting how you describe the target format.


# Prompt Engineering

The Prompt Engineering template is available for advanced users familiar with GPT-3.

When a charm using this template runs, the prompt will run repeatedly-- once for each output cell.

You can add cell references to refer to input cell ranges; these references will be replaced with the value of the input cell corresponding to the iteration offset.

Tips for using this template:

* Use commands that are local to a single output cell, not an entire range. For example, a ChatGPT-style prompt like `rewrite all of the cells in French` will not work, but a prompt like `rewrite {{ input_text }} in French` will work-- assuming you specify a relevant range for the `input_text` cell reference.


