Helping Airtable team to add AI features - AI code suggestions 😁

Hello folks!

I have just posted this on the Airtable forum, but wanted to share more weeds with you here - maybe you find it useful for your projects.

Overview

I have been playing recently with Chrome extensions ( I regret it :wink:) and OpenAI (definitely potential) . I have just released a Chrome extension, which adds formula suggestions based on ChatGPT API - directly to the formula editor in Airtable.

You can see the green “Hint GPT” button next to “Save”:

Obviously you are all versed with formulas. I have been testing it myself and a few times it was easier for me to type what I want, rather than write formulas. Not that often, but I am actually surprised. The original idea came to me when I wanted to change a super long nested IF statement to SWITCH - it certainly works well for tedious tasks like that.

On other hand sometimes the formula suggestions are just hilariously wrong or wishful thinking. Like suggestions to use IS_EMAIL() formula to validate emails :joy:

The technical weeds
The extension code is available MIT on my Github here (or you can download for free complied code here)

If you would be looking to build Chrome extension working with Airtable, you can take a look at above repo as there are a few interesting things:

  • I did implement encapsulated elements on top of Airtable using Tailwind (via shadow DOM and twind.style) - this way you can implement your own Tailwind styles without crashing with Airtable stylesheets
  • Airtable has a crazy level of DOM event capture - for example the “Backspace” key does not work… outside of editing fields. As per code comment it is blocked to prevent “Back” function on older browsers… I needed to deactivate those listeners to allow editing of my Setting fields :exploding_head:
  • Similarly the click events are captured in the way that simple e.preventDefault() won’t stop Airtable from doing its default behaviors in the background. I needed to use jQuery to disable it, so that I can show Settings modal on top of Airtable
  • There is a lot of jQuery on Airtable page :open_mouth:
  • The OpenAI implemention is trivial, I am using both ChatGPT and GPT completions - the results are fairly similar, with main difference that OpenAI charges 10x less for the ChatGPT API usage. The chat completions end up sometimes in long didactic rants, despite pre-conditioning to the contrary.
  • The formula editor is using Monaco editor - simplified version of what VS Code is using. It is possible to set / get data in and out of it, just like this extension is doing it. What I would really like is Coplilot like code completion inside of scripting block… but maybe another day…
  • The main div holding the cells is called “hyperbaseContainer” I wonder if “Hyperbase” was an alternative in the naming contest years ago :thinking:

Here you can also take a look at my video of how the extension works in action (or doesn’t :joy: - I think jobwise we are all safe).

Let me know what you think! Forks or contribution to the repo more than welcome!

5 Likes

Wow, @Greg_vonF, that is very impressive! :sunglasses: :raised_hands: Your video is great, too!

This is good stuff. Certainly, a fun direction to take LLMs. Leaning into easier pathways for everyday users to create more complex formulas is a good use of AI. Ultimately, though, there are far bigger fish to fry up - I think LLMs will change everything for users, not just solution-builders.

But two dimensions of this approach concern me.

  1. Prompt engineering must be used, and that requires a fair bit of maintenance because prompts (that work) for GPT-3.5 are vastly different from GPT-3.0. Where will this go in GPT-4 and GPT-5?
  2. The nature of Airtable formulas is unique; the patterns are inconsistent, so how could AI provide consistent (and smart) recommendations?

This response is also relevant. It explains why trying to do anything AI-related wth formulas may be extremely difficult.

That is a very interesting point! Certainly Airtable is in the best position to pretrain the models. What I see now as the biggest challenge with the gpt-3.5-turbo (GPT3.5 chat completion) and text-davinci-003(GPT 3? 3.5?) models is that they cannot further fine-tuned. At least not via public API.

It would be a big improvement to limit the model to just valid formulas, so it does not come up with creative solutions like IS_EMAIL() :roll_eyes:. Yes looks like Airtable formula and certainly useful one. Cute, but wrong!

OpenAI documentation provides API to fine-tune the earlier base davinci model. from which the 2 latest models are originating. It seems though like a lot of work went in to that fine-tuning as the responses from base davinci are mostly useless:

Has anyone heard about AI projects ongoing at Airtable? Certainly creating base starters based on language prompt would be an interesting alternative to templates!

This will change, but it’s not needed. GP3 is an ideal base model to use to create a fine-tuned variant that is extremely productive for formulaic intelligence. CoPilot proved this using GP2 in 2021 and GP3 in 2022.

Not possible without a fine-tuned model.

I think you’re missing something in your assertion. Useless responses are an indicator of a lack of data to support good responses, not an indicator of the inability of the model to perform well if fed incomplete data.

Thank you for confirming this. I was pretty sure before, but it is nice to get additional confirmation.

1 Like

The rest of us who don’t know how to build extensions will wait patiently for the packed extension. Thank you.

Hey @itoldusoandso, you can actually download the compiled version here and load the Chrome. The process is fairly straightforward. I just geeked out a bit above about the technical aspects above ;). Let me know if you find the extension useful.

Great. Amazing. I feel stressed out when I see links to Github, always going around with 2 metre pole around that site :wink:

1 Like