Artykuł opublikowany po angielsku.
Why Clean-Looking Data Still Breaks AI: Semantic Inconsistency
See how identical fields that mean different things across systems and years mislead models, RAG and agents, and how semantic contracts and meaning checks help.
"Garbage in, garbage out" is among the most repeated lines in data science, and it's true: train a model on poor data and you shouldn't expect good results. The trouble is that the phrase is so familiar it hides a nastier case. What if the data isn't garbage? What if it looks clean? Columns are filled, formats are valid, there are no obvious duplicates, the pipeline runs, the dashboards look normal and the data quality checks pass, and the AI system still makes unreliable decisions.
That's data inconsistency at work. The values aren't necessarily wrong. The same data simply means different things in different places.
Clean data can still mislead
Take a field that every company has some version of:
customer_status
In the CRM its values might mean this:
Active = Customer currently purchasing
Inactive = Customer hasn't purchased recently
Billing reads the same words differently:
Active = Account is financially open
Inactive = Account is closed
And support has a third reading:
Active = Customer currently has an open support relationship
Inactive = No active support case
Each system can have valid values, consistent formatting, complete records and no visible errors, so a traditional data-quality review finds nothing. Merge the datasets without resolving what the words mean, though, and the AI receives three definitions of "active". The data isn't dirty. Its semantics are inconsistent, and that's much harder to spot.
Semantic drift
Consistency isn't only about format. It's also about whether values mean the same thing. Look at "revenue" in three places. One system defines it like this:
System A:
Revenue = Invoiced amount
Two more systems differ:
System B:
Revenue = Collected amountSystem C:
Revenue = Contract value
The field name is identical everywhere, the numbers are valid, the schemas are valid and the pipelines work. Combining them still produces a misleading dataset. A model can't know that three identical field names stand for three business definitions. Someone has to tell it.
Meanings change over time
Definitions move too. Suppose a company stores a segment in this field:
customer_segment
From 2022 through 2024 the values are:
Enterprise
Mid-Market
SMB
Then the business changes its segmentation strategy, and from 2025 on the values become:
Strategic
Growth
Core
The database still has one field, the pipeline still runs and the data type hasn't changed. The model sees something like this:
2022 → Enterprise
2023 → Enterprise
2024 → Enterprise
2025 → Strategic
2026 → Strategic
Nothing is technically broken, yet the meaning shifted. If the model treats the old categories as directly comparable with the new ones, it can learn relationships that no longer describe the business. That's one reason time has to be part of data quality.
Structural versus semantic consistency
The two are easy to confuse, so it's worth separating them.
Structural consistency means the data follows the expected technical rules:
customer_id → string
revenue → decimal
created_at → timestamp
status → allowed values
Semantic consistency means a field carries the same business meaning wherever it's used. For example, this field:
revenue
should mean the same in finance, sales, analytics, the CRM and the data warehouse. A pipeline can satisfy the first requirement and fail the second completely, which is where many AI systems get into trouble.
Why the usual checks miss it
Most pipelines are good at technical failures:
NULL values
Duplicate rows
Invalid data types
Missing columns
Unexpected formats
Broken joins
Out-of-range values
Those checks are useful. But picture a table with customer IDs 101, 102 and 103, all marked Active, with revenues of 50000, 72000 and 31000. Everything looks reasonable. Now suppose Active means a purchasing customer in System A, a financially open account in System B and a currently supported customer in System C. A standard validation rule can still pass, because the values aren't invalid. Their meaning is.
AI makes it worse
This matters most for machine learning. Classic software often has explicit business rules, such as this one:
if customer_status == "Active":
allow_action()
Someone can read that rule and see what it expects. Machine learning systems instead learn relationships from historical data. If the training data mixes definitions, the model can absorb the inconsistencies as if they were real patterns:
Historical Data
↓
Different Business Definitions
↓
Combined Dataset
↓
Model Training
↓
Learned Relationships
↓
Predictions
The model doesn't necessarily know which definition is authoritative. It learns from what it's given.
RAG has the same disease
It isn't confined to classic ML. Imagine three company documents. The sales handbook says a qualified lead is a prospect who meets the BANT criteria. Marketing documentation says a qualified lead has engaged with at least three campaigns. The CRM documentation says it's a lead that a sales rep has manually marked as qualified.
An employee asks an internal assistant what qualifies a lead. Retrieval may well find all three documents, and the language model can write a fluent answer and even cite the sources. The underlying problem remains: the organization has no single definition. The AI isn't necessarily hallucinating. It's reflecting an inconsistent body of knowledge.
Problems that don't look broken
That's why "garbage in, garbage out" is too simple for modern AI. Garbage is obvious, and inconsistency can be invisible. A few forms it takes:
The same name with different meanings. This label:
"Revenue"
might be invoiced revenue in one system and collected revenue in another.
The same value in different contexts. This one:
"Active"
could mean an active customer, an active account or an active subscription.
The same metric calculated differently. This one:
"Churn"
might be computed monthly by one team and annually by another.
The same timestamp in different time zones. This value:
2026-08-20 10:00
could be local time in one system and UTC in another.
The same customer under different identities:
Customer ID: 10482
Account ID: C10482
External ID: 10482-IN
None of these are necessarily bad records. They're inconsistent representations of business reality.
Ask a different question
Rather than only asking whether the data is clean, AI teams should ask whether it means the same thing everywhere it's used. That sends you digging into who owns each definition, which business rules apply, how meanings changed over the years, how metrics are computed and from which source system, what terms and units mean, how timestamps are recorded, and how identities map between systems. It's closer to semantic data quality than to ordinary cleaning.
Write a semantic contract
One practical step is a semantic contract for critical fields. Start by naming the field:
Field:
customer_status
Then record its meaning and allowed values:
Business Definition:
Current commercial relationship with the customer.Allowed Values:
active
inactive
prospectOwner:
Customer OperationsSource of Truth:
CRMEffective From:
2026-01-01Rules:
"active" requires an active commercial relationship.
"prospect" cannot have completed customer status.
Downstream AI systems now have something explicit to work against. If another system uses this definition:
active = account has an open invoice
you have a conflict, and you can settle it before it ever reaches the model.
Treat definitions like APIs
Engineers already know the value of contracts between systems. When an API promises this:
{
"customer_id": "string",
"status": "active | inactive"
}
downstream consumers depend on it. Data should work the same way. For fields critical to AI, spell out the whole chain:
Field
↓
Type
↓
Allowed Values
↓
Business Meaning
↓
Owner
↓
Source of Truth
↓
Effective Date
↓
Change History
That makes semantic assumptions visible, and visible assumptions are easier to test.
Add meaning checks to the pipeline
A mature pipeline asks whether the run succeeded, and also whether the meaning of the data changed. A conceptual validation layer could look like this:
Incoming Data
↓
Schema Validation
↓
Data Quality Checks
↓
Semantic Validation
↓
Business Rule Validation
↓
AI Readiness Check
↓
Model / RAG Pipeline
Schema validation catches "the column disappeared". Semantic validation catches "the column is still there, but its business meaning changed". Those are very different classes of problem.
Monitor definitions, not only values
Say a pipeline tracks average order value, and the dashboard shows:
Average Order Value
₹4,850
Nothing seems off. Then the company redefines the metric: it used to be gross order value, and now it's the net amount once discounts and returns are subtracted. The figure may creep along gradually enough to trip no technical alert, yet whatever model consumes it is now fed a different concept. Monitoring has to graduate from "did the value change?" to "did the meaning change?"
Agents feel it more
AI agents increasingly talk to several tools and data sources at once:
Agent
├── CRM
├── Billing
├── Analytics
├── Knowledge Base
└── Support System
The agent might ask each system about the same customer, and if their definitions are inconsistent it gets contradictory answers. For example, the CRM says this:
CRM:
Customer = Active
While billing and support report something else:
Billing:
Account = DelinquentSupport:
Relationship = Closed
The agent now holds three technically valid answers. Which one should it believe? Without semantic rules, even a very capable model has to guess among conflicting business meanings.
A data dictionary should do something
Many organizations keep a data dictionary, and it often turns into static documentation nobody checks. For AI, key definitions should become operational controls:
Definition
↓
Data Contract
↓
Validation Rule
↓
Pipeline Check
↓
AI Readiness
When a definition changes, the downstream systems that depend on it should be reviewed. That turns data governance from documentation into engineering.
What to check
For AI-critical datasets, check at least five kinds of consistency:
- Structural: are fields and types consistent?
- Value: are values represented in the same way?
- Semantic: does a field mean the same thing everywhere?
- Temporal: has the definition changed over time?
- Cross-system: do different systems agree on the underlying business entity or metric?
That gives a more realistic view of data quality.
A better mental model
The usual picture is this:
Bad Data → Bad AI
A more accurate one has an extra step:
Bad Data
↓
Inconsistent Data
↓
Ambiguous Business Meaning
↓
Unreliable AI Context
↓
Unreliable AI Output
And sometimes the path is this:
Clean-looking Data
↓
Hidden Semantic Differences
↓
Model Learns False Relationships
↓
Production Reliability Degrades
The second path is the dangerous one, because the pipeline looks healthy the whole time.
Sometimes the hard part is agreement
There's an uncomfortable possibility: the organization may not have a data problem at all, but a definition problem. Finance defines a customer one way, sales another, marketing a third, and operations has its own reading. Everyone believes their version is right, and the AI is expected to reconcile them. It can't, at least not reliably without explicit business rules. Before asking how to clean the data, it can be more useful to ask whether the business can agree on what the data means.
Look before the model
When an AI system gives unreliable results, the first instinct is to blame the model: check the prompt, swap models, tune parameters, add retrieval, enlarge the context. Sometimes the model is simply learning from an inconsistent picture of the business. No upgrade resolves an undefined business concept. If three systems disagree about what an active customer is, a more powerful model won't fix that governance gap. It will only give a more convincing answer to an ambiguous question.
Bottom line
"Garbage in, garbage out" is good advice, and it isn't enough anymore. Modern AI depends on consistent meaning as well as clean values. The riskiest dataset isn't always the one full of obvious errors. It may be a dataset where all columns are present, all values pass inspection, all jobs finish and all dashboards stay green, while separate corners of the organization quietly attach different meanings to one and the same field. That kind of problem passes every technical check and still hurts AI reliability. So before asking whether your data is clean, ask whether everyone agrees on what it means.