How to use Baserow AI to analyze documents

Banner image for Baserow AI file support blog post

In this tutorial, we’ll learn to use Baserow AI’s File field support to extract valuable insights directly from your documents, invoices, and other file types.

By the end of this tutorial, you will be able to connect your files to the AI model, define prompts for data classification, text generation, content summaries, information retrieval, and more—all without writing a single line of code.

What we’ll do

In this tutorial, we’ll walk you through practical tips and techniques to automate analysis, extract data, and gain deeper business intelligence. We’ll cover the following steps:

  1. Set up Baserow database
  2. Create a file field
  3. Select the AI type and model
  4. Define the prompt to process file
  5. Generate results with Baserow AI

Prerequisites

To complete this tutorial, you’ll need the following:

Let’s dive in!

How to use Baserow AI for file processing

1. Set up Baserow database

Log in to your existing Baserow account or create a new account if you don’t have one already.

Once you log in, you can access the dashboard to add workspaces and databases. You can work with an existing workspace, database, or table, or set up a new workspace from scratch.

In this tutorial, we will set up a new workspace and add a template from the library.

  1. To create a new workspace, simply click on the + Create workspace button. Then, click on Add workspace.

    If you’re just starting with Baserow, we recommend you read our support article on how to create a workspace and how to add collaborators to a workspace.

  2. Now that the workspace is set up, you can either create a database from scratch or choose a template from our template library. Let’s use a template from the library.

  3. Click on the + Create new button to start creating a new database.

  4. Select the “From template” option to add a database from a template.

  5. Input “Business Expenses” in the template search box.

  6. Click the Use this template button to add the template to the workspace.

Use this template

That’s it! we’ve successfully created a new database. Now we can populate, manage, and organize data in Baserow.

Baserow Business Expenses template

2. Create a file field

To use Baserow AI effectively, we’ll need to connect it to a file field containing the documents you want to analyze.

First, open your Baserow workspace and go to the table where you plan to use the AI field. For example, you might use the Expenses table from the template. This table should have a file field labeled Receipt.

If your table doesn’t have a file field yet, create one. This field will store the documents you want the AI to process.

Once the file field is ready, upload your documents, such as invoices or receipts. Baserow AI can handle various file types, so feel free to upload different kinds of documents.

Learn more about the file field in Baserow

3. Select the AI type and model

To interact with the AI, we’ll need to configure the appropriate AI model for the data. To do this, create a new field in the Expenses table and choose “AI prompt” as its type.

Next, select the specific AI model you want to use from the available options. This model determines how the AI understands and processes your data. For this tutorial, we’ll use the GPT-3.5 model.

Then, select the file field that contains the documents you want to analyze.

Baserow AI will use the first compatible file linked to your field as its data source. Make sure this file is a text-based document like a .txt, .md, .pdf, or .docx file.

Learn more about Baserow AI field

Select the AI type and model  in Baserow

4. Define the prompt to process file

Next, we’ll tell Baserow how you want the AI to handle the files connected to this field.

In the AI field settings, create a clear and specific prompt that tells the AI what to do. In simple terms, we’re giving the AI instructions. For example, you could ask it to "Summarize the key points of this document.” You can also adjust other settings to fine-tune the AI’s behavior as needed.

Once you’ve defined the AI’s task, click Create to finish setting up the AI field.

5. Generate results with Baserow AI

Once we’ve correctly linked the file field and defined the AI prompt, we’re ready to start generating results.

To begin, click the Generate button that will appear in the AI field for each row in the table. Clicking this button starts the AI processing on the corresponding file based on the specified prompt.

After a short while, the AI will finish processing the file and display the results directly in the AI field. You can then review and use these AI-generated insights as needed.

generate results from AI field in Baserow

Summary

By following these simple steps, we’ve made it easy to transform your documents into actionable insights using Baserow AI’s file field support. No coding is needed. Simply upload your invoices, text documents, or any other file type and let Baserow AI process and understand the information within. Discover valuable patterns, trends, and details hidden in your files with just a few clicks.

Other useful resources

The following articles may also be helpful:

If you have any questions regarding this tutorial, feel free to reach out to ask for help in the Baserow Community.