Write effective AI prompts in Baserow

Great AI results start with clear prompts. Whether generating formulas, creating content in AI fields, or analyzing documents, specific instructions produce better outputs. This guide teaches you to write prompts that get accurate, useful results from Baserow’s AI features.

This guide covers prompt writing for:

  • AI prompt field - Generating text, classifications, and document analysis
  • AI formula generator - Creating formulas from descriptions
  • General AI interactions - Chatbots and assistants

Overview

Clear, specific prompts get better AI results. Include what you want, reference your data with {Field Name}, and specify output format. Test on a few rows before generating for your whole table.

AI models respond to the instructions you provide—your “prompt.” The quality of AI-generated content depends heavily on how well you communicate your intent. A vague prompt produces vague results; a detailed, structured prompt produces precisely what you need.

The prompt formula

Every good prompt needs four parts:

  1. Task - What you want done
  2. Input - Data to process using {Field Name}
  3. Format - How to structure output
  4. Constraints - Rules and boundaries

Example:

Classify this review as Positive, Neutral, or Negative.
Review: {Customer Review}
Return only one word.

Prompt patterns

Classification

Classify {Input Field} as [Option1], [Option2], or [Option3]. 
Return only one of these options.

This pattern works well for support ticket routing, sentiment analysis, and lead scoring.

Summarization

Summarize {Input Field} in [X] sentences focusing on [key aspects].

This pattern is effective for condensing meeting notes, customer feedback, or long documents while maintaining key information.

Extraction

Extract from {Input Field}: Item 1, Item 2, Item 3. 
If any field is missing, return "Not found"

This pattern helps pull specific data from invoices, resumes, and forms.

Generation

Write a [content type] for [audience]. 
Input: {Field Name}
Tone: [style]
Length: [constraint]

This pattern is ideal for creating product descriptions, email responses, and social media posts.

Best practices

For AI fields

Do:

  • Reference fields with exact names: {Customer Name}, {Order Total}
  • Set appropriate temperature (0.1 for consistent, 0.8 for creative)
  • Use “Choices” output type for classifications
  • Test on 5-10 rows before bulk generation

Don’t:

  • Use generic terms like “the name column”
  • Skip edge case handling for empty or unusual values
  • Generate for 1000 rows without testing first

For formula generation

Do:

  • Describe what you want: “Calculate 20% discount if quantity over 100”
  • Use exact field names: “Multiply {Hours Worked} by {Hourly Rate}”
  • Specify output format: “Round to 2 decimals”
  • Handle edge cases: “If quantity is 0 or blank, show 0”

Don’t:

  • Describe syntax: “Use an IF function to check…”
  • Use generic terms: “the hours column”
  • Combine multiple calculations into one prompt

For document analysis

Do:

  • List what to extract: “Invoice number, date, total, vendor name”
  • Specify format: “Return as bullet list”
  • Handle missing data: “If field not found, write ‘N/A’”

Don’t:

  • Use vague requests: “Get the important information”
  • Assume AI knows document type
  • Skip format specification

Temperature settings

Setting When to use Examples
0 - 0.3 You need consistent, factual outputs Classification, data extraction, summaries
0.4 - 0.6 You need balanced outputs General business writing, Q&A
0.7 - 1.0 You need creative, varied outputs Marketing copy, product descriptions

Common mistakes

Too vague

❌ “Analyze this data”
✅ “Identify the top 3 sales trends from {Sales Data} in Q4 2024”

Missing context

❌ “Classify this: {Text}”
✅ “Classify this support ticket as Bug, Feature, or Question: {Ticket Description}”

No error handling

❌ “Extract invoice total from {PDF}”
✅ “Extract invoice total from {Invoice PDF}. If missing, return ‘Unable to process’”

Overly complex

❌ “Analyze sentiment, extract topics, classify category, and generate response”
✅ Create separate AI fields for each task

Generic field references

❌ “Calculate 10% of the total column”
✅ “Calculate 10% of {Order Total}”

Formula generation examples

Calculate project deadline status

What you want: Flag projects that are overdue or due within 7 days

Prompt:

If {Due Date} is in the past, show 'Overdue'. 
If it's within 7 days, show 'Due Soon'. 
Otherwise, show 'On Track'.

Calculate discounted price

What you want: Apply different discount percentages based on order quantity

Prompt:

If {Quantity} is over 100, reduce {Price} by 20%. 
If {Quantity} is over 50, reduce by 10%. 
Otherwise, use full {Price}.

Format full name

What you want: Combine first and last name with proper spacing

Prompt:

Combine {First Name} and {Last Name} with a space between them.

Calculate days until event

What you want: Show number of days remaining until an event date

Prompt:

Calculate the number of days between today and {Event Date}.

Budget variance percentage

What you want: Show how far actual spending is from budget as a percentage

Prompt:

Calculate the percentage difference between {Budget} and {Actual Spend}. 
Round to 2 decimals.

Troubleshooting

Why are my outputs inconsistent?
Lower the temperature to 0.1–0.3 and add explicit constraints to improve consistency.

Why does the AI ignore parts of my prompt?
Simplify the prompt and place the most important instructions first.

Why is the AI making up information?
Add: “Only use information from Field Name. If not available, return ‘Not found’.”

Why is the output in the wrong format?
Provide a clear example: “Format as: Label: Value”

Why does it work for some rows but fail for others?
Handle empty fields explicitly: “If Field is blank, return ‘N/A’.”


Need help? Visit the Baserow community or contact support.