Built-in functions

Built-in functions

We can distinguish two types of functions :

BatcherAI’s own functions

These functions can be used to process data using the power of LLMs, directly inside the spreadsheet. Notice we use back ticks instead of quotes for the arguments of the functions in our spreadsheet approach.

  1. Llm query within a single cell

Syntax : =llm(`prompt`, `config_name`)

  1. 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.

  1. 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 )

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 :

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

Standard functions

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

Range

A1:A10

number2

Number or range of numbers to which to apply the arithmetic operation

Optional

Range

B1:B10

Last updated