We've been experimenting with AI-assisted writing of spreadsheet formulas. Why? Spreadsheets are the original low-code platform – sprinkle in a little bit of code and you get a big benefit - but that little bit of code is still daunting for many. We thought our spreadsheet app, Grist, might be particularly well suited to AI assistance for two reasons.<p>First, Grist uses Python as its formula language. Current AI models are particularly good at writing Python code, and getting better (every day it seems like).<p>Secondly, Grist spreadsheets are relational databases with a schema that can be neatly described as part of a prompt for an AI model, helping it make inferences.<p>We tested OpenAI models using formulas from our template gallery to approximate real use cases and the results were encouraging - you can browse prompts and outputs here: https://public.getgrist.com/n3jAtRYDSVWe/AI-Formula-dataset<p>Source code of the experiment is at https://github.com/gristlabs/grist-core/pull/345 with a docker image for anyone who wants to play. There are some example videos in a write-up at https://www.getgrist.com/blog/ai-formula-generation-experiment/<p>This is the brain-child of Alex Hall of https://futurecoder.io/