Generate formulas with Baserow AI

Baserow’s AI formula generator converts plain English descriptions into working formulas instantly. Describe what you want to calculate, and AI creates the formula syntax for you.

AI formula generation is available on Premium plans and higher. Upgrade your subscription to access this feature.

Overview

Writing formulas traditionally requires understanding function syntax, field references, and logical operators. Baserow AI eliminates this learning curve by translating natural language instructions into functional formulas. Describe your calculation in plain English, and AI generates the formula syntax.

Save time on:

  • Complex date and time calculations
  • Conditional logic and nested IF statements
  • Multi-field mathematical operations
  • Text manipulation and concatenation
  • Budget and financial calculations

Learn more about writing effective prompts.

How it works

The AI formula generator uses large language models to interpret your description and generate Baserow formula syntax. It understands your table structure, field names, and available functions, then produces formulas you can review and implement immediately.

AI formula generator interface

Prerequisites:

  1. Generative AI configured in your workspace
  2. Premium plan or higher
  3. Existing table with fields you want to reference
  4. Clear understanding of your desired calculation

Have your field names ready. The more specific your prompt, the better the generated formula.

Generate a formula with AI

Step 1: Create a formula field

  1. Open your table
  2. Click + Add a field
  3. Select Formula from field type options
  4. Name your field (e.g., “Status”, “Discount Price”, “Days Until”)

Step 2: Access the AI generator

  1. In the formula editor modal, locate Generate using AI
  2. Click to open the AI generation panel
  3. The panel shows your available fields and AI model selector

Step 3: Choose your AI model

Select the AI type, model and temperature. Configure generative AI - Set up AI providers.

Step 4: Write your prompt

Prompt best practices:

Be specific: “Calculate discount price: 10% off if quantity > 50, 20% off if > 100”
Too vague: “Give me a discount”

Reference field names: “Use the Due Date and Priority fields”
Generic terms: “Use the date column”

Specify output format: “Show result as percentage with 2 decimals”
Unclear format: “Show as percent”

Include edge cases: “If Price is blank, show 0”
Ignore edge cases: Doesn’t mention blank values

Example prompts:

  • “Calculate tax: multiply Price by 0.2, but only if Taxable is checked”
  • “Count days between Start Date and End Date, excluding weekends”
  • “Show ‘High’ if Score is over 80, ‘Medium’ if 50-80, ‘Low’ if under 50”
  • “Join Address Line 1, City, and Postal Code with commas between them”

Step 5: Generate and review

  1. Click Generate
  2. Wait 2-10 seconds for AI to process
  3. Review the generated formula in the preview
  4. Check that field references are correct
  5. Verify the logic matches your intent

Step 6: Test and refine

  1. Click Create field if formula looks correct
  2. Check results in a few table rows
  3. If results are incorrect:
    • Return to formula editor
    • Click Generate using AI again
    • Refine your prompt with more details
    • Regenerate

Troubleshooting

Formula doesn’t match my intent

Problem: AI generated a formula, but it doesn’t do what you wanted.

Solutions:

  • Add more detail to your prompt
  • Explicitly mention edge cases (“if field is empty, show 0”)
  • Reference exact field names in quotes
  • Break complex requests into simpler parts
  • Try a different AI model

Generated formula shows an error

Problem: Formula has red error text or won’t save.

Solutions:

  • Check that all referenced fields exist in your table
  • Verify field names match exactly
  • Try regenerating with a clearer prompt
  • Review formula field reference for syntax rules
  • Contact support if the error persists

AI doesn’t understand my field names

Problem: Formula references wrong fields or generic terms.

Solutions:

  • Use exact field names in your prompt: “Use field called ‘Order Total’, not ‘Total Amount’”
  • Put field names in quotes in your prompt
  • Simplify field names if they’re ambiguous
  • Describe field purpose: “the ‘Status’ field contains values like ‘Active’ or ‘Inactive’”

Results are inconsistent across rows

Problem: Formula works for some rows but fails for others.

Solutions:

  • Check for blank fields in failing rows
  • Add null handling: “If Due Date is blank, show ‘Not Set’”
  • Test with diverse row data
  • Review formula for unhandled conditional branches

Can’t access AI generation

Problem: “Generate using AI” button is missing or disabled.

Solutions:

  • Verify you’re on the Premium plan or higher
  • Confirm AI is configured and check workspace permissions
  • Try refreshing your browser

Frequently asked questions

Does the AI remember my previous formulas?

No. Each generation is independent. The AI doesn’t learn from or reference your previous formulas. Save successful prompts externally if you want to reuse similar patterns.

Can AI generate formulas using custom functions?

AI generates formulas using Baserow’s standard formula functions. It doesn’t create custom functions but can combine existing functions in sophisticated ways.

How accurate is the AI formula generator?

Accuracy depends on prompt clarity and formula complexity. Simple calculations have ~95% success rate. Complex nested logic may require refinement. Always test generated formulas before relying on them.

Can I edit formulas after AI generates them?

Yes. Click into the formula field to manually edit the generated formula. This is useful for minor adjustments without regenerating entirely.

What happens if my table structure changes?

Formulas reference fields by name. If you rename a field, formulas break. Update field references manually or regenerate the formula with the new field name.

Is there a limit to formula complexity?

AI can generate complex formulas, but Baserow has a formula length limit. Extremely long formulas may need to be split across multiple fields. If generation fails, simplify your request.

Tutorials


Need help? Visit the Baserow community or contact support for assistance with your account.