AI for data quality rules
Use MDG's ML rule mining and LLM-drafted rules to find quality rules faster, then let stewards approve them into BRFplus.
Two kinds of AI help
Workshops find obvious rules (domestic suppliers need a tax number) and miss implicit ones (in plant 1000, FERT always has MRP type PD). ML rule mining finds IF-THEN patterns in existing records. LLM rule drafting reads a data profile plus policy text. One is grounded but blind to intent; the other understands intent but can hallucinate. With stewards approving, they cover each other.
Rule mining in MDG
Rule mining in MDG data quality management supports Product, Business Partner and custom objects. You pick a focus area and the IF and THEN fields; a background job proposes rules (default cap 100). Setup needs Fiori apps such as Manage Rule Mining, their OData services and authorizations, so involve Basis and security early.
An LLM rule-drafting pipeline
Principle: send the model a profile, not the data. A profile (fill rate, distinct count, top patterns per field) plus a few masked samples is usually enough. Your own script then runs each proposal against the full data and computes the real pass rate. Translate proposals into a reviewed rule library; never eval() model-written code.
You help a master data team design data quality rules for SAP MDG
(Business Partner, supplier role).
Inputs: FIELD PROFILE (JSON), POLICY EXTRACT, FIVE MASKED SAMPLE RECORDS.
Propose up to 10 rules. For each return:
- id, rule_text (one business sentence), fields_involved
- condition (IF) and check (THEN), precise and testable
- source: "profile", "policy" or "both"
- expected_pass_rate (0-1), estimated from the profile
- implementation_hint: "BRFplus decision table", "BRFplus formula" or "needs ABAP"
- risk: which legitimate records this rule could block
Use only fields in the profile. Do not invent field names.
Return valid JSON only: {"rules": [...]}The expected pass rate and 'risk' field catch over-strict rules early.
Try it: complete the principles
Fill the blanks in the team's rule-drafting guideline.
We send the model a and five masked samples. The real pass rate is computed by . Model proposals are mapped to a before they run. Every new rule goes live as a first.
What steward review looks like
Watch the gap between expected and actual pass rate: a big gap means the model misread the profile or there is a hidden segment.
Try it: the 18% rule
An AI-proposed rule 'supplier region must be filled' would fail 18% of suppliers the business says are valid. The project lead wants it live as an error next week. What do you do?
Where the rule is enforced
Three places: DQ evaluation measures the existing stock, mass processing fixes violations as governed CRs, and CR validation blocks new bad data. Order matters: evaluate, remediate, then warn, then error. Otherwise a new rule blocks every change to old, uncleaned records.
Measuring value
Track acceptance rate (below about a third, stewards stop reading), false-block rate (valid records failed, seen through overrides) and time to rule. Break acceptance down by category to see where workshops are still needed.
Try it: the rule-discovery loop
Put the end-to-end loop for an AI-proposed rule in order.
- 1Profile the data and mask samples
- 2Compute the real pass rate in-house
- 3AI proposes candidate rules
- 4Enforce at CR time as a warning, then as an error
- 5Steward accepts or rejects
- 6Run a DQ evaluation on existing stock
- 7Remediate violations through mass processing
Remember
- ML rule mining finds patterns in data inside MDG; LLM drafting adds policy and business language. Use both, with stewards deciding.
- Send the model a profile and masked samples, and compute the real pass rate yourself before review.
- Evaluate, remediate, warn, then enforce; measure acceptance and false-block rates.