> For the complete documentation index, see [llms.txt](https://batcher-ai.gitbook.io/batcher-ai-user-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://batcher-ai.gitbook.io/batcher-ai-user-docs/built-in-functions.md).

# Built-in functions

### **Built-in functions** <a href="#ghpd7ls4m2tp" id="ghpd7ls4m2tp"></a>

We can distinguish two types of functions :

### **BatcherAI’s own functions** <a href="#r1514h62byzz" id="r1514h62byzz"></a>

These functions can be used to process data using the power of LLMs, directly inside the spreadsheet.\
Notice we use <mark style="color:orange;">back ticks</mark> instead of quotes for the arguments of the functions in our spreadsheet approach.<br>

1. **Llm query within a single cell**

Syntax : =llm(\`prompt\`, \`config\_name\`)

2. **Llm query on another cell content**

Syntax : =llm(CELL\_COORDINATES, \`config\_name\`) eg: ``=llm(`A1`, `default`)`` to use the content of the A1 cell as prompt.

3. **Llm query on 2 columns data** (data + associated prompt split in 2 cells) : \
   Cell A1: `Wireless Noise-Canceling Headphones` (your data to process)\
   Cell B1: ``=CONCAT(`Write a compelling product description for `, A1)`` (your prompt)\
   Cell C1: ``=llm(B1, `default`)`` (the `llm()` function call )<br>

| **Name**     | **Description**                                                 | **Required / Optional** | **Example**             |
| ------------ | --------------------------------------------------------------- | ----------------------- | ----------------------- |
| prompt       | Prompt to send to the LLM                                       | Required                | "Why is the sky blue ?" |
| config\_name | Name of the user "config" (configuration) to apply to the query | Optional                | "default"               |

### Example of a simple LLM query : <a href="#anrv2apdkdzt" id="anrv2apdkdzt"></a>

***=llm(\`Can you explain to me what's an llm as if I was a total rookie ?\`, \`default\`)***

### Standard functions <a href="#tngbpca6oyr" id="tngbpca6oyr"></a>

These functions are the ones commonly used in existing spreadsheet software such as Microsoft Excel. All standard functions are implemented and handled by PhpSpreadsheet and should be considered supported, unless stated otherwise.

**Exhaustive list of supported functions :** PHPSpreadsheet documentation (<https://phpspreadsheet.readthedocs.io/en/latest/references/function-list-by-category>) should be used as the main source for an exhaustive list of supported functions.

**Exhaustive list of Microsoft Excel functions :** Microsoft Excel documentation (<https://support.microsoft.com/en-us/office/excel-functions-by-category-5f91f4e9-7b42-46d2-9bd1-63f26a86c0eb>) should be used as the main source for an exhaustive list of existing functions.

**Commonly used functions for reference**

**Math and trigonometry functions :**

These are used to perform basic mathematical operations such as addition, averaging, finding the minimum and maximum values between numbers and/or ranges of numbers.

Syntax : =SUM(number1, \[number2], ...)

Syntax : =AVERAGE(number1, \[number2], ...)

Syntax : =MIN(number1, \[number2], ...)

Syntax : =MAX(number1, \[number2], ...)

| **Name** | **Description**                                                       | **Required / Optional** | **Example**               |
| -------- | --------------------------------------------------------------------- | ----------------------- | ------------------------- |
| number1  | Number or range of numbers to which to apply the arithmetic operation | Required                | <p>Range</p><p>A1:A10</p> |
| number2  | Number or range of numbers to which to apply the arithmetic operation | Optional                | <p>Range</p><p>B1:B10</p> |

### &#x20;<a href="#p8s8m3v6d3pa" id="p8s8m3v6d3pa"></a>
