# Using LLMs to build extensions

Want to prototype an Interface Extension without writing code? You can use a generative AI model—like ChatGPT, Claude, or another LLM—to help you create functional extension code in minutes.

This guide walks you through how to use an LLM to generate the code for a custom Interface Extension using Airtable’s SDK.

> 💡 This is an experimental approach and best suited for builders who want to explore ideas quickly, especially before investing in a full build.

## What you’ll need

* Access to a generative AI tool like ChatGPT, Claude, Gemini, Cursor or similar
* A CSV export of the Airtable data you want to use in your extension
* A local development environment set up with the Airtable Interface Extensions SDK
     (See the [Getting started guide](https://airtable.com/developers/interface-extensions/guides/getting-started.md))

## Step-by-step

1. Export your Airtable data as CSV.
     Pick a table or view and download it as a .csv file—this will help the LLM generate meaningful UI logic and structure.
2. Craft a prompt for the LLM.
     Include:
    * A short description of what you want the extension to do
    * A brief summary of your CSV structure (e.g., column names and types)
    * Any interaction patterns or UI you’d like to see
    * A clear instruction to generate a React component using the Airtable Blocks SDK

Here's an example prompt:

> *Given the Airtable Blocks SDK, generate a React component that builds a full-page extension. The extension should display a kanban board grouped by Status, showing Task name and Due date on each card. My data includes columns: Task name (text), Status (single select), and Due date (date).*

1. **Review and copy the code from the LLM**. The LLM should return a full React component that leverages the APIs provided by the Blocks SDK. It should follow the structure of a standard Airtable extension, including layout and data bindings.

2. **Run it locally**. Paste the generated code into your local project and run it using the CLI tools. You can refer to the Hello World tutorial to get started if needed.

3. **Refine through iteration**. Not quite right? That’s expected—LLMs often generate a solid starting point, but you may need to fix bugs or adjust logic to get things working. If something breaks, open your browser’s developer console to inspect the error. You can copy and paste that error message back into the LLM to help troubleshoot and suggest a fix. You can also continue iterating by asking for layout tweaks, adding filters, or reformatting UI elements.

## Tips for better results

* **Use clear, structured prompts**. Include data schema, design goals, and specific UI behaviors.
* **Ask for small improvements**. If something’s off, describe what to fix—or ask the LLM to revert to the last working version if the changes broke something.
* **Test early**. Paste the code into your environment to see what works and adjust as needed.

## Limitations

AI can generate impressive starting points, but they’re not perfect. You may need to manually:
* Handle edge cases in logic
* Adjust layout and styling
* Add configuration support or props

**Always test your extension thoroughly before using it in production.**
