Data Tiles
Trusted data for AI

How Does AI Understand Enterprise Data?

Giving AI access to enterprise data is relatively easy. Giving it the business context to understand what that data means is much harder.

AI can generate perfectly valid SQL and still answer the wrong business question.

Cameron Price, Founder and CEO of Data Tiles

By Cameron Price, Founder & CEO, Data Tiles · Published

Valid SQL can still give you the wrong answer.

Ask a simple question: “Which customers completed an order in the last 12 months?” An AI system can see an orders table with both a created_at and a completed_at column. Both are dates. Both look plausible. Only one represents what the business meant.

Technically valid SQL

SELECT DISTINCT customer_id
FROM orders
WHERE created_at >= now() - interval '12 months';

The query executes successfully. But it counts orders that were started, including ones that were cancelled or never fulfilled.

Semantically correct SQL

SELECT DISTINCT customer_id
FROM orders
WHERE completed_at >= now() - interval '12 months';

The query represents what the business actually meant: an order that reached completion.

Syntax tells you if SQL can run.

Semantics tells you if it means the right thing.

See the difference between valid SQL and semantic SQL

This Latttice example demonstrates how a technically valid query can still misunderstand the business question, and how semantic context changes the result.

Read what the example shows

A business user asks which customers completed an order in the last 12 months.

Without business context, a query generator can filter on the order creation date. The SQL runs and returns results, but it includes orders that were never completed.

With semantic context, the meaning of “completed order” is linked to the completion date and status the organization actually uses. The generated SQL now answers the question the business asked.

The lesson: both queries are valid SQL. Only one is semantically correct.

Can AI generate SQL correctly?

Yes. Modern AI models can generate technically valid SQL from natural-language questions, commonly referred to as text-to-SQL or natural-language-to-SQL.

Text-to-SQL simply means typing a question in plain English and having a system write the database query for you. Today's models are very good at it. They know SQL syntax, they can read table and column names, and they can assemble joins and filters quickly.

But technically valid SQL does not necessarily mean the query represents the intended business meaning. In the example above, filtering on created_at instead of completed_at produces a query that runs perfectly and still answers a different question from the one that was asked.

Back to questions ↑

Can SQL be technically correct but give the wrong answer?

Yes. SQL syntax determines whether a database can execute a query. It does not determine whether the query represents the intended business meaning.

Experienced analysts rarely write a query from the schema alone. They bring organizational knowledge with them: which table is the system of record, which status codes count, which customers are excluded, and which definition finance has agreed with sales.

Everyday business words often carry a specific, agreed definition inside an organization:

  • Customer
  • Active customer
  • Revenue
  • Completed order
  • Risk
  • Claim
  • Supplier

“Active customer” might mean a purchase in the last 90 days in one business and a current contract in another. A query can be flawless SQL and still use the wrong one.

Back to questions ↑

Why does AI sometimes generate the wrong SQL?

Usually because the AI understands SQL perfectly well but lacks sufficient business context about the data it is querying.

A database schema alone may not tell an AI:

  • which definition the organization uses
  • which source is authoritative
  • which field represents a business event
  • how concepts relate across systems
  • which governance rules apply
  • how terminology differs between departments
  • what context changes the interpretation of a question

The problem may not be the AI's ability to write SQL.
The problem may be what the AI knows about the data.

Back to questions ↑

How do I know if AI-generated SQL is correct?

Test it twice: once for technical correctness and once for semantic correctness.

TEST 1

Is it technically correct?

  • Does the query execute?
  • Are the tables, joins and fields valid?

TEST 2

Is it semantically correct?

  • Does the query represent what the business actually meant?

Valid SQL answers the first question. Business context helps answer the second.

Back to questions ↑

What is semantic SQL?

Semantic SQL is a useful way to describe SQL generated with an understanding of the business meaning behind the underlying data. It is not a new SQL standard or programming language.

The SQL itself is ordinary SQL. What changes is how it is produced. Instead of guessing from column names, the system first resolves the business concepts in the question, such as “customer” and “completed order”, to the specific data and definitions the organization uses.

  1. Natural-language business question
  2. Business concepts and semantic context
  3. Underlying enterprise data
  4. Generated SQL
  5. Business answer
From business question to business answer
Back to questions ↑

What is a semantic layer for AI?

A semantic layer provides a consistent representation of business concepts and their relationships to underlying enterprise data, helping AI translate human questions into the correct data context.

In plain English, it is a shared dictionary that connects the words the business uses to the places and rules where the data actually lives. Consider a harder question:

“Which customers completed an order in the last 12 months and currently have an unresolved service issue?”

CRM

Customer

Orders

Completed transactions

Service platform

Open cases

The person asking the question should not need to know the schemas, joins or physical locations of those three systems. And AI should not simply guess what those business concepts mean. A semantic layer makes that meaning explicit and reusable.

Back to questions ↑

Why does AI need business context?

Because businesses do not make decisions using column names. They make decisions using concepts.

  • Revenue
  • Customers
  • Orders
  • Inventory
  • Claims
  • Employees
  • Suppliers
  • Forecasts
  • Risk
  • Performance

The enterprise data representing each of those concepts may be spread across several systems, each with its own naming, history and quality. Connecting an AI model to those systems gives it reach. It does not give it understanding.

AI therefore needs more than connectivity. It needs context.

Back to questions ↑

How do AI agents query enterprise data?

AI agents query enterprise data in several ways, depending on how an organization has made that data available.

Common routes include generated SQL, APIs, data warehouses, lakehouses, analytical platforms, governed data products and other enterprise services. Each is a legitimate path, and most organizations use more than one.

What does the agent know about the data it is using?

Connecting an AI agent to data establishes access. It does not automatically establish meaning, trust or governance.

Back to questions ↑

Is database access enough for enterprise AI?

No. Access tells you whether AI can reach the data. It does not necessarily tell you whether AI understands what that data means.

Before an answer can be trusted, an AI system may need context to answer questions like these:

  • Which source is authoritative?
  • What does this field mean?
  • Which definition applies?
  • How current is this information?
  • Who should be allowed to access it?
  • What policies apply?
  • Where did this answer come from?
  • Can the evidence behind the answer be traced?
Back to questions ↑

How do you give AI business context?

By packaging business meaning, context and governance together with the data, so AI receives more than disconnected tables.

DataMeaningContextGovernance

Rather than presenting AI with raw tables and expecting the model to infer their meaning, organizations can make business context part of governed data products: reusable, owned packages of data that carry their definitions, relationships, quality signals and access rules with them. See what makes a data product AI-ready.

The objective is not to teach an AI model everything about an organization. It is to make the relevant context available when AI needs to use the data.

Back to questions ↑

Why does governance matter when AI queries data?

Because AI does not remove the need for data governance. As AI moves closer to decisions and actions, governance at the point of use becomes more important.

  • Access
  • Authorization
  • Sensitivity
  • Policy
  • Evidence
  • Lineage and context
  • Trusted sources

A human analyst might pause before using sensitive data or an unapproved source. An automated system will not, unless those rules travel with the data. Data Tiles calls this Active Governance: governance that is applied when a data product is created and again every time it is consumed, by a person, an application or an agent.

Learn more about Active Governance in Latttice or read the Active Governance series.

Back to questions ↑

How do you make enterprise data ready for AI?

Start with the decision you want to improve, not with the AI model, and work backwards to the trusted context that decision needs.

  1. 1What decision are we trying to improve?
  2. 2What does the business need to know?
  3. 3What context is required?
  4. 4What evidence can be trusted?
  5. 5Where does that evidence live?
  6. 6What governance needs to apply?
  7. 7How should that trusted context be made available to people and AI?

The common question

“How do we connect AI to all our data?”

The better question

“How do we give AI the right trusted data, with the right meaning and governance, for the decision being made?”

This is the thinking behind the Decision-Driven Enterprise and the AI readiness framework.

Back to questions ↑

How does Latttice help AI understand enterprise data?

Latttice is the Data Product Workbench from Data Tiles. It helps organizations create governed, contextually rich data products across their existing data environments, without a rip-and-replace approach.

Latttice connects business meaning with the underlying enterprise data, so a concept like “completed order” resolves to the right fields, sources and rules. That is how, in the example above, it distinguishes between technically valid SQL and the semantic meaning of the question.

Each governed data product can then be reused across:

  • People
  • BI
  • Applications
  • Workflows
  • AI
  • Agents

Create once. Govern once. Use everywhere.

We don't replace your data platform. We complete it.

Back to questions ↑

AI doesn't just need access to enterprise data. It needs to understand what the data means.

AI is becoming extraordinarily good at generating SQL.

But generating a query is not the same as understanding a business.

As enterprise AI moves from experimentation into real workflows and decisions, organizations need to think beyond whether AI can access their data.

The more important question is: Can it understand what that data means?

Syntax tells you if SQL can run.

Semantics tells you if it means the right thing.

Give AI more than access to your data.

See how Latttice helps turn enterprise data into governed, contextually rich data products that can be used by people, BI, applications, workflows, AI and agents.

Cameron Price, Founder and CEO of Data Tiles

About the author

Cameron Price

Founder & CEO, Data Tiles

Cameron is the creator behind Latttice and Lenz and an experienced data and analytics practitioner. He writes on decision-driven data, trusted data products, active governance, and AI readiness, and is committed to enabling business teams to make trusted data decisions.

Published · Last updated