ai
Data Quality Triage: Sort and Fix Failures With an AI Agent on Rails
A data quality monitoring AI agent reads failed tests, groups them by likely cause, ranks them by downstream harm and proposes fixes. The Data Quality Triager works at L2 to L3 on any customer data platform (CDP): it proposes everything and, after a data steward approves, applies format-only fixes. It never changes a field's meaning, deletes records, or touches consent or identity fields.
Rail level: L2 to L3 · Risk: medium · Function: data and analytics
By Art Kukharenko · Published · Updated
All AI agent railsWho this is for: data stewards, analytics engineers and heads of data. This page belongs to the AI agent rails method and the data and analytics playbook.
Before: the manual workflow
The manual triage of data failures starts with a channel full of alerts and one person working out which matter. One late source can fail many downstream tests, so the on-call engineer traces lineage by hand. Then come the slower questions: which audiences use this table, who owns the source, and did this happen last month? Noisy tests teach people to ignore the channel, and the failure that matters looks like all the others.
After: the job on rails, step by step
The triage job on rails separates reading from acting, so the session that reads samples can never write.
- Trigger. A data-quality test fails, or a data steward raises a request.
- Group. A rule uses lineage to group failures that share an upstream model.
- Read. The agent reads test results, schema, lineage and masked samples.
- Classify. It labels the likely class: data, pipeline, test or real-world change. A seasonal spike needs no fix at all.
- Rank. A rule scores downstream use, and the agent builds the ranked list. Anything on a consent or identity path goes straight to its owner.
- Propose. It writes the failure, likely cause, affected uses, proposed fix and rollback plan, stating causes as hypotheses.
- Approve. For a format-only fix, a data steward approves one batch. The approver is never the requester. Approval binds to the batch hash, and a timeout expires it.
- Execute. A separate execution service runs the allow-listed transform with no model in the loop, stores before values and reruns the test.
- Log. A system outside the agent records the test, proposal, approval, rows changed and rollback reference.
Anything else leaves the rail as a ticket for the owner. Schema changes go to the pipeline owner, usually with an explanation from the Schema Drift Sentinel. The L3 path is optional: many teams should stay at L2 and let engineers change code.
What counts as a format-only fix?
A format-only fix changes how a value is written and leaves what it means untouched, and a machine must be able to prove that. Keep an allow-list of named transforms, each with its own test. The examples are illustrative, with the traps on the right.
Scroll horizontally to see all columns.
| Usually format-only | Looks like format, changes meaning |
|---|---|
| Trimming leading and trailing spaces | Reading 03/04/2026 as a date when the source's day and month order is unknown |
| Upper-casing ISO country codes | Adding a country code to a phone number when the country is unknown |
| Converting an unambiguous date layout to ISO 8601 | Turning "N/A" or empty strings into null, which changes completeness counts |
| Removing a stray byte-order mark or fixing a known encoding | Rounding, unit conversion or currency conversion |
| Normalising postcode spacing where the format is known | Mapping status codes, or filling missing values |
Identity keys stay out even when a change looks harmless. Lower-casing an email address is a good example. RFC 5321 says the local part of a mailbox must be treated as case sensitive, while discouraging anyone from relying on it 8. Changing a stored key can create or break a merge, so that decision belongs to identity review. Consent fields stay out because a wrong value can mean unlawful contact, as the suppression architecture explains.
Four checks prove a batch is value-preserving, and the execution service runs them with no model involved:
- Round trip. Parsing the before and after values gives the same canonical value.
- Distinct count. The number of distinct canonical values does not change.
- Idempotence. Running the transform twice gives the same result as running it once.
- Rollback. Before values are stored, and a drill has restored them.
What rules do and what the model does
Rules and tests decide whether data failed and what may change, while the model reads context and suggests why. A model's view never clears a failed test, and its silence does not mean the data is correct.
Scroll horizontally to see all columns.
| Task | Done by | Why |
|---|---|---|
| Detect failure | Tests and statistical monitors | Must be repeatable |
| Group by upstream cause | Lineage rule | Graph logic, no judgement |
| Rank by downstream use | Rule over a list of critical uses | The order must be defensible |
| Suggest cause and fix | Model | Output is a hypothesis, and fixes come from the allow-list |
| Check and apply a fix | Rule and execution service | No model holds a write tool |
| Decide on anything semantic | Named owner | A change in meaning is a business decision |
Statistical root-cause tools show the limit. Anomalo describes comparing failing and passing rows across segments to find where failures concentrate 5. That shows where, not why, and a language model's explanation is no more certain.
The rail card
The rail card below fixes what the Data Quality Triager may do, and systems enforce each limit, so a prompt cannot widen it.
Scroll horizontally to see all columns.
| Field | Value |
|---|---|
| Job | Triage data-quality failures, propose fixes, and apply format-only fixes after approval. |
| Trigger | A failed data-quality test or a data-steward request. |
| Data scope | Test results, schema and masked samples. No consent fields on the fix path. |
| Tool scope | Read: test results, schema, lineage, masked samples. Propose: ranked triage list and proposed fixes. Execute: apply an approved format-only fix through a separate service. |
| Output contract | Failure, likely cause, affected downstream uses, proposed fix, rollback plan. |
| Gate | A data steward approves each fix batch. |
| Limits | Format-only changes; batch size; approved tables only. |
| Ledger | Test ID, proposed fix, approval, rows changed, rollback reference. |
| Evaluation | Historic failures with known causes; seeded defects. |
| Owner and kill switch | Head of data or data steward. An Orchestrator pause disables the fix path, and triage continues. |
The level reflects reversibility and blast radius, as the rail levels explain. A format fix on one approved table, with stored before values, has a small blast radius, so it may reach L3. It does not go to L4 here, because deciding that a change is format-only is exactly where mistakes hide. The Rule of Two sets the architecture 9. Masked samples can hold text typed by customers, which is untrusted, and they remain sensitive. So the reading session gets no state-changing tool. A private model is preferred, and an external one needs masking and contract cover, as the boundary patterns describe.
What the ledger shows for one run
The ledger entry for one run traces a fix from failed test to rollback reference. The JSON is illustrative: its fields and values are invented, and it is not a product API.
{
"rail": "data-quality-triager",
"correlation_id": "c-7f3a",
"test_id": "customers.country_code_format",
"failure_class": "data",
"cause_hypothesis": "source export added trailing spaces",
"proposed_fix": {"transform": "trim_spaces", "catalogue_version": "3", "batch_hash": "sha256:91ab..."},
"approval": {"by_role": "data steward", "bound_to": "sha256:91ab...", "expires": "2027-01-12T17:00:00Z"},
"execution": {"service": "fix-runner", "rows_changed": 1840, "retest": "pass", "rollback_ref": "rb-5521"},
"model_version": "model-v3"
}
Three ways it fails, and the control for each
The Data Quality Triager fails in ways specific to fixing data, and each control below sits outside the model.
Scroll horizontally to see all columns.
| Failure | What it looks like | Control |
|---|---|---|
| The symptom is fixed and the cause stays | The same trailing spaces return each week, and a proposal to widen a threshold makes a real failure go quiet. | Track recurring failures by test ID. A repeat fix is refused until a source ticket exists. A change to a test or threshold is a change for the test's owner. |
| A "format" fix changes meaning | Dates swap day and month, or "N/A" becomes null and a completeness report shifts. | An allow-list of transforms, the four value-preserving checks, batch limits, a small canary batch and stored before values. |
| Text in a sample steers the session | A customer-typed field tells the model to report no issue or to propose an out-of-scope change. | No write tools in the reading session. The execution service accepts only allow-listed transforms. Seeded injection cases sit in the evaluation set. |
Metrics that are honest
Honest metrics for data triage measure whether causes get found and failures stop returning, using the roadmap's definitions where they exist. Baseline them before the agent starts.
- Time to triage: failed test to accepted ranking. Fast triage of the wrong cause is worse than slow triage.
- Recurring failures: the same test failing again after a fix, which is the best sign of symptom-fixing.
- Rollbacks: fix batches undone. Zero may mean nobody checks.
- Cause accuracy on historic failures, where the real cause is known.
- Alert precision, counted after grouping by root cause.
- Override rate. A rate near zero may mean rubber-stamping.
- Audit coverage. Anything below 100% is a defect.
Report by rail and role, not by named steward. Annex III point 4(b) of the EU AI Act lists monitoring workers' performance as a high-risk use 10, so take advice before building a per-person view.
How vendor tools compare
Data observability tools are often the better answer for triage, because they already hold lineage, history and alert routing. The table records each vendor's page, checked on 1 November 2026. "Not stated" means the page opened did not say, not that the feature is absent.
Scroll horizontally to see all columns.
| Tool | Triage help | Can it change data? | Sample and data handling | Source |
|---|---|---|---|---|
| Monte Carlo | Troubleshooting Agent investigates and explains root cause, with next steps | Vendor says agents are read-only | Agents review data samples, metadata and query logs | 1 |
| Soda | Chat agent, contract help, root-cause agent | "Every proposed action is shown and approved by a person"; not stated for the root-cause agent | Row-level data and PII reach a model provider only if you opt in; failed rows in Diagnostics Warehouse are not available to the AI | 2 |
| GX Cloud | Shows how far a value passed its threshold; Critical, Warning and Info tags; ExpectAI suggests tests to review | Not stated | A "status only" level shows no data in the interface; the highest level shows sampled failed rows | 34 |
| Elementary | Cloud agent for triage and root cause; open-source package for test results and alerts | Not stated | Open source stays in your environment | 6 |
| Bigeye bigAI | Incident summary, likely root cause, next step | Not stated | Vendor says "No customer data leaves the platform" | 7 |
| Anomalo | Segment-based root-cause analysis (2021 post) | Not stated | Not stated in the post | 5 |
None of the pages opened describes an approved write path for fixing customer data. That gap is the main reason to build this rail, and many teams will not need it. If an engineer can fix format problems in transformation code, that is the better answer, because the fix lives upstream under code review. A script can group failures by upstream model with no model at all. Buy an observability tool when samples may leave under your contract, and choose a private rail when they may not. Doing nothing new is fair when failures are rare.
PrivyCDP's AI layer offers limits on data access and review of results, and its immutable audit ledger records each AI-assisted action with the human or system actor that authorised it.
Checklist
Use this checklist before the agent reads production samples.
- Every test has a named owner and a severity.
- A rule lists critical downstream uses, including consent and identity paths.
- Samples are masked before the session reads them.
- Consent and identity fields sit outside every fix path.
- Format transforms are allow-listed, and value-preserving checks run in the execution service.
- Approval binds to a batch hash, and the approver is not the requester.
- Before values are stored, and a rollback drill has passed.
- A repeat fix on the same test needs a source ticket.
- Historic failures and seeded defects are rerun on any model, prompt or tool change.
Back to the AI agent rails hub. To write this rail for your own team, download the rail card template.
Browse use casesFunction playbooksAgent roster
FAQ
What is a data quality monitoring AI agent?
It is an agent that reads failed data tests and monitors, groups them by likely cause, ranks them by downstream harm and proposes fixes. On rails it works at L2, with an optional L3 path for format-only fixes after a data steward approves. The tests stay the control. The agent explains and proposes, and it cannot clear a failed test.
Can an AI agent fix data quality problems automatically?
Only narrow ones, and only after approval. A data steward approves one batch of an allow-listed format transform, and a separate service applies it, runs value-preserving checks and stores before values. Anything that changes meaning goes to a named owner. Editing consent or identity fields, deleting records or loosening a test stays outside the rail entirely.
What is the difference between a format fix and a semantic fix?
A format fix changes how a value is written, such as trimming spaces, and a machine can prove the meaning is unchanged. A semantic fix changes what the value says, such as remapping a status code or filling a missing value. Some changes look like format and are not, such as guessing whether 03/04 means March or April.
Is an AI agent better than a data observability tool?
They do different jobs, and for many teams the tool is enough. Monte Carlo, Soda, Elementary and others hold lineage and alert history and describe root-cause help. A rail adds a private model, your own ledger, or an approved fix path. If samples may leave under your contract and engineers fix code upstream, buy the tool first.
How do you stop an AI agent hiding a data problem?
Keep tests as the control, and never give the agent a way to clear them. Treat any proposal to widen a threshold as a change for the test's owner. Track recurring failures by test ID and refuse a repeat fix without a source ticket. Seed known defects into the evaluation set, and rerun it after any model, prompt or tool change.
Sources
- Monte Carlo, Observability agents (17 April 2025, updated 15 July 2025)
- Soda, Soda AI
- Great Expectations, 2025 in review (9 January 2026)
- Great Expectations, Root cause analysis with GX Cloud (12 February 2026)
- Anomalo, Root causing data failures (9 November 2021)
- Elementary, What is Elementary
- Bigeye, bigAI is now generally available (1 May 2025)
- IETF, RFC 5321, section 2.4
- Meta, Agents Rule of Two (31 October 2025)
- EU AI Act, Annex III
This article is general information, not legal advice.
Further reading
- AI Agent for Data Quality Triage: Data
- AI Agents for Data Quality
- Draft-approve-execute split — definition
- Agent rails
- AI Agent Permissions Template Download
Published: · Updated:
Editorial dates describe content changes. Confirm current sources before making legal, security or purchasing decisions.