← Blog
7 min read

Feature spotlight: AI Automations

Use AI Automations to investigate recurring data-quality questions and see the evidence behind every result.

Michele Vigilante
Michele Vigilante
Co-Founder & CEO
The Beetl Automations overview showing one Healthy supplier location check and two supplier master checks marked Needs attention, each scheduled daily at 08:00.

I had been thinking about this feature for a while because we had already built most of the pieces it needed: pipelines, a query engine, scheduling, run history, and an AI assistant that could inspect data. I wanted to combine those pieces into a check that runs every day and tells me whether the data is still correct.

AI Automations are scheduled or manually run data checks in Beetl. You describe a business condition in plain language, and Beetl investigates the current data with read-only SQL before reporting Healthy, Needs attention, or Failed.

Of course, you can already do this deterministically. Write a query, assert that it returns zero rows, and send an alert when it does not. For a well-defined invariant, that is often exactly what you should do.

A deterministic check only covers the conditions encoded in its query. As exceptions and new source values appear, the query has to be updated or its results become increasingly noisy.

I wanted something more "agentic". By that I mean a check that can choose investigative steps beyond the path I explicitly defined. I wanted to describe the outcome I cared about, then let the system inspect the schema, sample the data, write queries, and follow up on whatever it found. The queries still had to be read-only, and I needed to see the evidence behind the result.

Building the supplier master review pipeline

The scenario involves a manufacturing group integrating a newly acquired company. Headquarters uses SAP. The acquired company uses Dynamics 365. Both systems contain suppliers and invoices, and a crosswalk is supposed to connect each local supplier ID to one group-wide ID.

This creates a small master data management problem. The local records need to be matched to the same group supplier even when the two systems describe that supplier differently.

I started with supplier and invoice data from SAP and Dynamics, then added a crosswalk mapping local suppliers to group entities. The Supplier master review pipeline brings those sources together and marks which suppliers were used in the last 90 days.

The deployed Supplier master review pipeline with five sources, four SQL stages, a Silver destination, and the activity_since variable.
Five source datasets become one supplier_master_review dataset. Open the image to see the full pipeline.

The result contains 242 rows, even though there are only 240 source supplier records. Two suppliers are mapped to two group IDs, so the join duplicates them. I left that contradiction in because it is exactly the sort of thing I wanted the Automation to notice.

A simple location completeness check

The first check was intentionally simple:

In supplier_master_review, check whether suppliers used in the last 90 days are missing a country or postcode.

That was it. There was no query to write or rule builder to configure. I described what I wanted checked and chose when it should run.

The Active supplier location completeness Automation configured with a plain-language check, a daily schedule at 08:00, and observe-only access.
The business condition is plain language. Open the image for the full configuration and schedule.

Then I used the “Test automation” button to run the check before saving it. Beetl inspected the dataset, ran its queries, and came back Healthy.

A test of the Active supplier location completeness Automation marked Healthy after finding no active suppliers without a country or postcode.
The test is Healthy because no active suppliers are missing location fields.

I already knew the report's count of 236 included two duplicate rows. Both duplicates had complete location data, so they did not affect this check and I left the count alone for the moment.

Defining the supplier population

For the next Automation, I asked a broader question. I wanted to find recently used suppliers missing a legal name, country, tax ID, payment terms, or procurement category. I also wanted to know about blocked suppliers that still had recent invoices.

The Active supplier master completeness Automation in the Running state while Beetl investigates the data.
The saved Automation is active, observe-only, and currently running.

The check did not pass because 17 suppliers had incomplete or contradictory master data.

The report again treated every active row as a separate supplier. That produced a population of 236 instead of the correct 234.

The read-only SQL and persisted result showing 236 active rows and 234 unique active suppliers.
The evidence distinguishes 236 active rows from 234 unique suppliers.

My first reaction was to edit the instruction. I added: count each supplier once by source system and supplier ID. The next run still returned 236.

The second Active supplier master completeness report still counting 236 active supplier rows after the instruction was clarified.
The second run still counted 236 active rows. Open the image for the full report.

Instead of rewording the instruction again, I added the unique supplier query as context for the next run.

The Active suppliers “Starting query” selecting distinct source supplier fields from supplier_master_review where recently_used is true.
The “Starting query” makes the unit of analysis explicit: one source supplier.

Beetl uses the “Starting query” as trusted context for the rest of the investigation. SQL provides the precise definitions, and the Automation investigates around them.

Problem solved. The next run reported 234 active suppliers and the same 17 exceptions, using five visible investigation steps instead of ten.

The corrected Active supplier master completeness report showing 234 active suppliers and 17 affected suppliers.
With the “Starting query”, the report counted 234 active suppliers and retained the 17 exceptions. Open the image for the full report.

Comparing supplier identity across runs

For the third check, I wanted to verify that suppliers were identified consistently across SAP and Dynamics. This included missing group mappings, suppliers mapped more than once, conflicting tax IDs, and likely duplicates.

The first run found four unmapped suppliers, two suppliers mapped to multiple group IDs, conflicting tax ID assignments, and eight duplicate groups with inconsistent mappings.

Previous runs turn the identity check into a remediation tracker. When “Use previous runs” is selected, Beetl makes earlier finalized runs available through tool calls. This avoids putting the entire run history into the model's context. The Automation decides which run to inspect and what information to retrieve based on the instructions.

The Cross-system supplier identity conflicts Automation with “Use previous runs” enabled and highlighted.
“Use previous runs” gives the Automation earlier finalized runs as context. Open the image for the full configuration.

On the next run, Beetl inspected an earlier finalized run, queried the current data again, and reported that every finding was unchanged.

The identity Automation investigation showing two previous-run review steps followed by current supplier identity checks with evidence links.
The run reviews earlier results, then checks the current data with visible evidence.

This concludes my little experiment, and I am very happy with the result. Beetl investigated the current data from a plain-language instruction, showed the evidence behind its conclusions, used trusted SQL context where definitions had to be exact, and compared findings with previous runs.

Of course, you should still use deterministic checks for precise invariants. AI Automations are useful for the more exploratory work: investigating vague requirements, adapting to unfamiliar data, and helping turn what they find into a better-defined rule. With clear boundaries and visible evidence, this is where I think LLMs are most useful for data quality.

Notifications are next. We want Automations to reach the right person through Slack, email, WhatsApp, Microsoft Teams, or a generic webhook. We are also looking at exposing Automation states to Prometheus-based alerting, so they can enter existing monitoring and incident-response workflows. Stay tuned.

FAQ

What is an AI Automation in Beetl?
A scheduled or manually run data-quality check. You describe the condition in plain language, and Beetl investigates current workspace data with read-only SQL before reporting Healthy, Needs attention, or Failed together with the evidence behind the result.
Can an Automation change source data?
No. Automations are currently observe-only.
What is a “Starting query”?
Optional trusted SQL that gives an Automation a precise definition or a reliable place to begin its investigation.
What does “Use previous runs” do?
It makes earlier finalized runs available to the Automation through tool calls. The Automation decides which previous results to inspect and compares them with queries against the current data.

Maintaining something like this by hand?

Talk to us