<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ArisynData</title>
    <description>The latest articles on DEV Community by ArisynData (@arisyndata).</description>
    <link>https://dev.to/arisyndata</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3640833%2F877a0e7c-a59f-4ed3-baac-6bf99ad9c964.jpg</url>
      <title>DEV Community: ArisynData</title>
      <link>https://dev.to/arisyndata</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arisyndata"/>
    <language>en</language>
    <item>
      <title>I Didn't Break Enterprise Data Models. It Exposed Their Blind Spots.</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Wed, 29 Jul 2026 06:19:24 +0000</pubDate>
      <link>https://dev.to/arisyndata/i-didnt-break-enterprise-data-models-it-exposed-their-blind-spots-1i3b</link>
      <guid>https://dev.to/arisyndata/i-didnt-break-enterprise-data-models-it-exposed-their-blind-spots-1i3b</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8uyoxf5bvx7avlfu7v0t.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8uyoxf5bvx7avlfu7v0t.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over the past few years, I've worked with several enterprise AI projects, especially those involving natural language querying and AI-powered analytics.&lt;/p&gt;

&lt;p&gt;One pattern keeps showing up.&lt;/p&gt;

&lt;p&gt;When an AI system returns the wrong answer, people usually blame the model.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Maybe we need a larger LLM."&lt;/p&gt;

&lt;p&gt;"Maybe the prompt needs more context."&lt;/p&gt;

&lt;p&gt;"Maybe SQL generation isn't mature enough."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After digging into these projects, I came to a different conclusion.&lt;/p&gt;

&lt;p&gt;In many cases, the model isn't the real problem.&lt;/p&gt;

&lt;p&gt;The enterprise data model is.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Enterprise Data Models Were Never Designed for AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For decades, enterprise databases have been optimized for applications.&lt;/p&gt;

&lt;p&gt;Normalization reduces redundancy.&lt;/p&gt;

&lt;p&gt;Indexes improve query performance.&lt;/p&gt;

&lt;p&gt;Foreign keys maintain integrity.&lt;/p&gt;

&lt;p&gt;Data warehouses organize information for reporting.&lt;/p&gt;

&lt;p&gt;Everything makes sense because applications already know how the business works.&lt;/p&gt;

&lt;p&gt;Business logic lives in source code, service layers, stored procedures, ETL pipelines, and developers' experience—not necessarily in the database itself.&lt;/p&gt;

&lt;p&gt;Applications don't need the database to explain what a "customer" is.&lt;/p&gt;

&lt;p&gt;Developers already know.&lt;/p&gt;

&lt;p&gt;AI doesn't.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Schema Describes Structure, Not Meaning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most AI systems start by reading metadata.&lt;/p&gt;

&lt;p&gt;They can discover tables.&lt;/p&gt;

&lt;p&gt;Columns.&lt;/p&gt;

&lt;p&gt;Primary keys.&lt;/p&gt;

&lt;p&gt;Sometimes foreign keys.&lt;/p&gt;

&lt;p&gt;But metadata only tells AI how data is stored.&lt;/p&gt;

&lt;p&gt;It doesn't explain what the data actually represents.&lt;/p&gt;

&lt;p&gt;For example, imagine an enterprise with three different systems.&lt;/p&gt;

&lt;p&gt;CRM stores customers.&lt;/p&gt;

&lt;p&gt;ERP stores accounts.&lt;/p&gt;

&lt;p&gt;The finance system stores billing entities.&lt;/p&gt;

&lt;p&gt;To employees, these often represent the same business entity viewed from different business processes.&lt;/p&gt;

&lt;p&gt;To AI, they are simply three unrelated tables.&lt;/p&gt;

&lt;p&gt;Without additional business knowledge, every SQL statement becomes an educated guess.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Hardest Problem Isn't Writing SQL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Modern language models are surprisingly good at generating SQL.&lt;/p&gt;

&lt;p&gt;Syntax errors have become much less common.&lt;/p&gt;

&lt;p&gt;The bigger challenge appears earlier.&lt;/p&gt;

&lt;p&gt;Before generating SQL, AI must answer questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which customer table should I use?&lt;/li&gt;
&lt;li&gt;Which data source is considered authoritative?&lt;/li&gt;
&lt;li&gt;Are these two entities actually the same customer?&lt;/li&gt;
&lt;li&gt;Which relationship reflects real business rules?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't SQL problems.&lt;/p&gt;

&lt;p&gt;They're knowledge problems.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Business Knowledge Lives Outside the Database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One thing I find interesting is that enterprise knowledge is rarely stored where AI can access it.&lt;/p&gt;

&lt;p&gt;Developers understand join paths.&lt;/p&gt;

&lt;p&gt;Business analysts understand metric definitions.&lt;/p&gt;

&lt;p&gt;Database administrators understand physical schemas.&lt;/p&gt;

&lt;p&gt;Domain experts understand the business process.&lt;/p&gt;

&lt;p&gt;Each group holds part of the knowledge.&lt;/p&gt;

&lt;p&gt;Very little of it is represented explicitly in the data model itself.&lt;/p&gt;

&lt;p&gt;Humans bridge these gaps naturally.&lt;/p&gt;

&lt;p&gt;AI cannot.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;AI Has Become a New Consumer of Enterprise Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is probably the biggest architectural change we're seeing.&lt;/p&gt;

&lt;p&gt;For years, applications were the only consumers of enterprise databases.&lt;/p&gt;

&lt;p&gt;Now AI is becoming another consumer.&lt;/p&gt;

&lt;p&gt;Unlike applications, AI doesn't read source code.&lt;/p&gt;

&lt;p&gt;It doesn't attend design meetings.&lt;/p&gt;

&lt;p&gt;It doesn't ask senior developers which table is "correct."&lt;/p&gt;

&lt;p&gt;It only sees what the enterprise has documented.&lt;/p&gt;

&lt;p&gt;And many enterprises have documented far less than they assumed.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Future Isn't About Bigger Models&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Large language models will continue to improve.&lt;/p&gt;

&lt;p&gt;They'll write better SQL.&lt;/p&gt;

&lt;p&gt;Reason more effectively.&lt;/p&gt;

&lt;p&gt;Handle longer contexts.&lt;/p&gt;

&lt;p&gt;But none of these improvements automatically provide business knowledge.&lt;/p&gt;

&lt;p&gt;If an enterprise hasn't clearly defined its business entities, trusted relationships, or business semantics, AI has no reliable foundation to reason from.&lt;/p&gt;

&lt;p&gt;The model can infer.&lt;/p&gt;

&lt;p&gt;It can estimate.&lt;/p&gt;

&lt;p&gt;It can guess.&lt;/p&gt;

&lt;p&gt;It cannot know.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't think AI is exposing weaknesses in language models.&lt;/p&gt;

&lt;p&gt;It's exposing weaknesses in enterprise data architecture.&lt;/p&gt;

&lt;p&gt;For years, our data models were built to support applications.&lt;/p&gt;

&lt;p&gt;Today, they also need to support AI.&lt;/p&gt;

&lt;p&gt;That doesn't necessarily mean redesigning every database.&lt;/p&gt;

&lt;p&gt;But it does mean making business entities, relationships, and business semantics far more explicit than they have been in the past.&lt;/p&gt;

&lt;p&gt;The smarter AI becomes, the more valuable well-structured enterprise knowledge will be.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>sql</category>
      <category>llm</category>
    </item>
    <item>
      <title>Foreign Keys Aren't Enough: Why Enterprise AI Needs Relationship Discovery</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Mon, 27 Jul 2026 03:15:19 +0000</pubDate>
      <link>https://dev.to/arisyndata/foreign-keys-arent-enough-why-enterprise-ai-needs-relationship-discovery-3jok</link>
      <guid>https://dev.to/arisyndata/foreign-keys-arent-enough-why-enterprise-ai-needs-relationship-discovery-3jok</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F229wefmg4aazub1m4av2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F229wefmg4aazub1m4av2.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modern AI systems are surprisingly good at writing SQL.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Give an LLM a database schema, and it can often generate syntactically correct queries within seconds. With Retrieval-Augmented Generation (RAG), database metadata, and function calling, connecting AI to enterprise databases has become easier than ever.&lt;/p&gt;

&lt;p&gt;Yet many enterprise AI projects encounter the same problem after deployment:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The SQL executes successfully, but the answer is still wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This isn't usually a model problem.&lt;/p&gt;

&lt;p&gt;It's a relationship problem.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The assumption most AI systems make&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most AI-powered database assistants follow roughly the same workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Question
      │
      ▼
Schema Retrieval
      │
      ▼
LLM Generates SQL
      │
      ▼
Database Execution
      │
      ▼
Answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This workflow assumes something important:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The schema contains enough information for AI to understand how data is connected.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Unfortunately, enterprise databases rarely work that way.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Real enterprise databases rarely have complete foreign keys&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In tutorials, relationships are simple.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customer
    │
    ▼
Order
    │
    ▼
Invoice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every relationship is explicitly defined.&lt;/p&gt;

&lt;p&gt;Every foreign key exists.&lt;/p&gt;

&lt;p&gt;Every table follows the same modeling standard.&lt;/p&gt;

&lt;p&gt;Production systems look very different.&lt;/p&gt;

&lt;p&gt;A company may have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an ERP system&lt;/li&gt;
&lt;li&gt;a CRM platform&lt;/li&gt;
&lt;li&gt;a financial system&lt;/li&gt;
&lt;li&gt;a manufacturing system&lt;/li&gt;
&lt;li&gt;a data warehouse&lt;/li&gt;
&lt;li&gt;several legacy databases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each system was designed independently.&lt;/p&gt;

&lt;p&gt;Relationships frequently exist without database constraints.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the same customer appears under different identifiers&lt;/li&gt;
&lt;li&gt;order numbers are reused across systems&lt;/li&gt;
&lt;li&gt;warehouse codes connect operational databases&lt;/li&gt;
&lt;li&gt;contract IDs link finance and sales data&lt;/li&gt;
&lt;li&gt;relationships rely on business rules rather than foreign keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Applications understand these connections because developers encoded them years ago.&lt;/p&gt;

&lt;p&gt;The database itself often does not.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why column names are unreliable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A common strategy is to infer joins from matching field names.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;customer_id
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;appears in two tables.&lt;/p&gt;

&lt;p&gt;Therefore they must be related.&lt;/p&gt;

&lt;p&gt;Sometimes that's correct.&lt;/p&gt;

&lt;p&gt;Sometimes it's completely wrong.&lt;/p&gt;

&lt;p&gt;Likewise,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;customer_code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;account_number
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;may represent exactly the same business entity even though their names are different.&lt;/p&gt;

&lt;p&gt;Enterprise systems evolve over years.&lt;/p&gt;

&lt;p&gt;Naming conventions change.&lt;/p&gt;

&lt;p&gt;Systems are merged.&lt;/p&gt;

&lt;p&gt;Columns are duplicated.&lt;/p&gt;

&lt;p&gt;Temporary tables become permanent.&lt;/p&gt;

&lt;p&gt;Column names alone cannot describe the real data model.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Relationships exist inside the data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the biggest misconceptions is that relationships only exist in metadata.&lt;/p&gt;

&lt;p&gt;In reality, much stronger evidence often exists inside the data itself.&lt;/p&gt;

&lt;p&gt;Imagine two tables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Orders
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Neither contains a foreign key.&lt;/p&gt;

&lt;p&gt;However:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;every customer ID appearing in Orders also appears in Customers&lt;/li&gt;
&lt;li&gt;Customer IDs are unique in Customers&lt;/li&gt;
&lt;li&gt;the inclusion ratio remains stable over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That combination provides strong evidence that the relationship is real.&lt;/p&gt;

&lt;p&gt;Similar signals include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;distinct value overlap&lt;/li&gt;
&lt;li&gt;inclusion ratios&lt;/li&gt;
&lt;li&gt;uniqueness&lt;/li&gt;
&lt;li&gt;composite key candidates&lt;/li&gt;
&lt;li&gt;relationship direction&lt;/li&gt;
&lt;li&gt;cardinality&lt;/li&gt;
&lt;li&gt;value distribution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unlike naming conventions, these signals come directly from the data.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Discovery is only the first step&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finding candidate relationships is valuable.&lt;/p&gt;

&lt;p&gt;Trusting them automatically is dangerous.&lt;/p&gt;

&lt;p&gt;Enterprise environments frequently contain multiple possible join paths.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customer
   │
Order
   │
Invoice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;may be valid.&lt;/p&gt;

&lt;p&gt;So may:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customer
   │
Contract
   │
Invoice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Technically, both queries execute.&lt;/p&gt;

&lt;p&gt;Only one answers the business question correctly.&lt;/p&gt;

&lt;p&gt;Relationship discovery should therefore be followed by relationship governance.&lt;/p&gt;

&lt;p&gt;Organizations need to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which relationships were verified&lt;/li&gt;
&lt;li&gt;where they came from&lt;/li&gt;
&lt;li&gt;how reliable they are&lt;/li&gt;
&lt;li&gt;which scenarios they support&lt;/li&gt;
&lt;li&gt;which path should be preferred&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without that layer, AI still has to guess.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;AI needs a relationship layer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of discovering relationships every time SQL is generated, enterprises should treat relationship knowledge as reusable metadata.&lt;/p&gt;

&lt;p&gt;An effective relationship layer can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;detect implicit relationships across databases&lt;/li&gt;
&lt;li&gt;discover candidate joins from actual data&lt;/li&gt;
&lt;li&gt;measure confidence using statistical evidence&lt;/li&gt;
&lt;li&gt;preserve verified relationship paths&lt;/li&gt;
&lt;li&gt;expose trusted relationships to AI systems&lt;/li&gt;
&lt;li&gt;update relationship knowledge as data evolves&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once this layer exists, AI no longer starts from zero every time it answers a question.&lt;/p&gt;

&lt;p&gt;It starts with knowledge accumulated by the organization.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Beyond SQL generation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enterprise AI discussions often focus on better prompts, larger models, or more powerful agents.&lt;/p&gt;

&lt;p&gt;Those improvements certainly matter.&lt;/p&gt;

&lt;p&gt;But they cannot compensate for missing relationship knowledge.&lt;/p&gt;

&lt;p&gt;A model cannot reliably choose a relationship that has never been made visible.&lt;/p&gt;

&lt;p&gt;Better reasoning helps evaluate evidence.&lt;/p&gt;

&lt;p&gt;It cannot invent enterprise knowledge that the organization has never captured.&lt;/p&gt;

&lt;p&gt;As AI becomes a permanent part of enterprise software, relationship discovery is becoming more than a data engineering task.&lt;/p&gt;

&lt;p&gt;It is becoming part of the infrastructure that enables AI to understand how enterprise data actually fits together.&lt;/p&gt;

&lt;p&gt;Because in enterprise databases, the most important relationships often aren't missing.&lt;/p&gt;

&lt;p&gt;They're simply invisible.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>database</category>
      <category>data</category>
      <category>sql</category>
    </item>
    <item>
      <title>Designing a Production-Grade Text-to-SQL Pipeline</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Mon, 13 Jul 2026 07:21:21 +0000</pubDate>
      <link>https://dev.to/arisyndata/designing-a-production-grade-text-to-sql-pipeline-n50</link>
      <guid>https://dev.to/arisyndata/designing-a-production-grade-text-to-sql-pipeline-n50</guid>
      <description>&lt;p&gt;Text-to-SQL demos usually look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Question → LLM → SQL → Result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi6vaomr9y2m74obaoq8j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi6vaomr9y2m74obaoq8j.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is fine for a controlled dataset.&lt;/p&gt;

&lt;p&gt;It is not enough for a production system.&lt;/p&gt;

&lt;p&gt;In a real warehouse, the model has to deal with duplicated concepts, undocumented joins, multiple date fields, inconsistent naming, and tables that were never designed for AI access.&lt;/p&gt;

&lt;p&gt;The hard part is not generating SQL.&lt;/p&gt;

&lt;p&gt;The hard part is building the context the model needs before generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start with the question, not the schema&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Take a simple request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Show revenue by customer segment for last quarter.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A model can turn that into SQL quickly. But before it does, the system needs to answer a few basic questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which revenue definition should be used?&lt;/li&gt;
&lt;li&gt;Which date field represents the reporting period?&lt;/li&gt;
&lt;li&gt;Is customer segment current or historical?&lt;/li&gt;
&lt;li&gt;Which customer table is authoritative?&lt;/li&gt;
&lt;li&gt;Which join path avoids duplicating revenue?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those decisions should not be left to the model to guess.&lt;/p&gt;

&lt;p&gt;A better pipeline resolves them before SQL generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A more realistic workflow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A production flow looks closer to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Question
    ↓
Intent Parsing
    ↓
Semantic Mapping
    ↓
Metadata Retrieval
    ↓
Relationship Discovery
    ↓
Join Path Selection
    ↓
SQL Generation
    ↓
Validation
    ↓
Execution
    ↓
Explanation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each step has a separate job.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Intent parsing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Extract the actual request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"metric"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"revenue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"dimension"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"customer_segment"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"time_range"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"last_quarter"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is also where the system should detect ambiguity.&lt;/p&gt;

&lt;p&gt;For example, “revenue” may refer to booked, invoiced, recognized, or paid revenue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Semantic mapping&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Map the user’s language to governed business definitions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"metric"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"recognized_revenue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"formula"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SUM(invoice_line.recognized_amount)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"time_field"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"invoice_line.recognition_date"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prevents the model from choosing fields based only on similar names.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Metadata retrieval&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve only the relevant tables and columns.&lt;/p&gt;

&lt;p&gt;Passing the entire warehouse schema into the prompt usually creates more noise than value.&lt;/p&gt;

&lt;p&gt;The model should receive a narrow working set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;customer
customer_segment_history
invoice
invoice_line
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Relationship discovery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is where many systems remain weak.&lt;/p&gt;

&lt;p&gt;Foreign keys are useful, but enterprise databases often have missing, incomplete, or misleading constraints.&lt;/p&gt;

&lt;p&gt;A relationship layer should provide more than table names. It should include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;source and target columns&lt;/li&gt;
&lt;li&gt;relationship direction&lt;/li&gt;
&lt;li&gt;cardinality&lt;/li&gt;
&lt;li&gt;confidence&lt;/li&gt;
&lt;li&gt;known fanout risk&lt;/li&gt;
&lt;li&gt;preferred usage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"from"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"invoice.customer_id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"to"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"customer.customer_id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cardinality"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"many_to_one"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"confidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.98&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"fanout_risk"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Join path selection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There may be several valid paths between the same business entities.&lt;/p&gt;

&lt;p&gt;The shortest path is not always the safest one.&lt;/p&gt;

&lt;p&gt;A good system should prefer a path that matches the query grain and metric definition, not just one that happens to connect the tables.&lt;/p&gt;

&lt;p&gt;For the revenue example, joining directly to a current customer table may produce a valid result but lose historical segment accuracy.&lt;/p&gt;

&lt;p&gt;The correct path may require a segment history table and an effective-date condition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validation has to be explicit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SQL execution is not validation.&lt;/p&gt;

&lt;p&gt;A query can run successfully and still return the wrong answer.&lt;/p&gt;

&lt;p&gt;At minimum, the validation stage should check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Are the selected tables approved for this metric?
- Does the join path match the required grain?
- Can the join duplicate fact rows?
- Are filters applied to the correct date field?
- Are permissions respected?
- Is the aggregation consistent with the metric definition?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some checks are static. Others require running a small test query.&lt;/p&gt;

&lt;p&gt;For example, a join can be tested for row multiplication before the final query is executed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rows_before&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;DISTINCT&lt;/span&gt; &lt;span class="n"&gt;invoice_line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;distinct_rows&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;invoice_line&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;customer&lt;/span&gt;
  &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;invoice_line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If those numbers drift unexpectedly, the pipeline should stop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clarification is part of the system&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the most useful behaviors in Text-to-SQL is asking a question instead of generating one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Do you mean recognized revenue or invoiced revenue?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is not a failure.&lt;/p&gt;

&lt;p&gt;It is often the safest possible response.&lt;/p&gt;

&lt;p&gt;A production system should know when the available semantic or relationship context is not strong enough to proceed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep the reasoning visible&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The final response should include more than the result.&lt;/p&gt;

&lt;p&gt;A useful explanation might show:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Metric: Recognized Revenue
Time Field: recognition_date
Tables Used: invoice_line, customer_segment_history
Join Path: invoice_line.customer_id → customer_segment_history.customer_id
Validation: No fanout detected
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives analysts a chance to review the logic and gives data teams something they can audit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The model is not the whole pipeline&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The LLM is still important. It can parse questions, generate SQL, explain results, and handle conversation.&lt;/p&gt;

&lt;p&gt;But production reliability comes from the surrounding system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Semantic context
+ Metadata
+ Trusted relationships
+ Validation
+ Governance
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the difference between a query that looks reasonable and a query that can be trusted.&lt;/p&gt;

&lt;p&gt;At Arisyn, we split those responsibilities across two layers: Semora handles business semantics, query reasoning, SQL generation, validation, and explanation, while IntaLink provides the table and field relationship context needed to choose safer data paths.&lt;/p&gt;

&lt;p&gt;The SQL is generated near the end.&lt;/p&gt;

&lt;p&gt;Most of the real work happens before it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>llm</category>
      <category>sql</category>
    </item>
    <item>
      <title>Enterprise Databases Were Built for Applications, Not AI</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Fri, 10 Jul 2026 16:09:00 +0000</pubDate>
      <link>https://dev.to/arisyndata/enterprise-databases-were-built-for-applications-not-ai-4ocl</link>
      <guid>https://dev.to/arisyndata/enterprise-databases-were-built-for-applications-not-ai-4ocl</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F384nlgrddg2utmcqx8gf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F384nlgrddg2utmcqx8gf.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As engineers, we spend a lot of time talking about AI models.&lt;/p&gt;

&lt;p&gt;Which model generates better SQL?&lt;/p&gt;

&lt;p&gt;Which model reasons better?&lt;/p&gt;

&lt;p&gt;Which one has the largest context window?&lt;/p&gt;

&lt;p&gt;But after working with enterprise data, I've started to think we're looking in the wrong place.&lt;/p&gt;

&lt;p&gt;Most enterprise databases were never designed for AI.&lt;/p&gt;

&lt;p&gt;They were designed for applications.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;## Applications Know the Rules. AI Doesn't.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A business application already knows where everything is.&lt;/p&gt;

&lt;p&gt;If an order needs a customer record, the developer has already defined the relationship.&lt;/p&gt;

&lt;p&gt;If a dashboard needs revenue, someone has already decided which calculation to use.&lt;/p&gt;

&lt;p&gt;The application doesn't need to discover anything.&lt;/p&gt;

&lt;p&gt;AI does.&lt;/p&gt;

&lt;p&gt;When an LLM connects to an enterprise database, all it sees is hundreds of tables and thousands of columns.&lt;/p&gt;

&lt;p&gt;It has no idea:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which customer table is authoritative.&lt;/li&gt;
&lt;li&gt;Which tables are safe to join.&lt;/li&gt;
&lt;li&gt;Whether two IDs represent the same business entity.&lt;/li&gt;
&lt;li&gt;Which revenue definition the business actually uses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Generating SQL isn't the difficult part anymore.&lt;/p&gt;

&lt;p&gt;Choosing the right data is.&lt;/p&gt;




&lt;p&gt;*&lt;em&gt;## Schemas Describe Structure, Not Business Knowledge&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Even well-designed databases have this problem.&lt;/p&gt;

&lt;p&gt;A schema tells you that a table exists.&lt;/p&gt;

&lt;p&gt;It doesn't tell you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;why it exists,&lt;/li&gt;
&lt;li&gt;when it should be used,&lt;/li&gt;
&lt;li&gt;or whether another table has replaced it over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The knowledge that engineers build up over years of maintaining a system rarely exists inside the database itself.&lt;/p&gt;

&lt;p&gt;It's stored in documentation, meeting notes, old dashboards—or simply in someone's head.&lt;/p&gt;

&lt;p&gt;That's exactly the information AI is missing.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;## Two Things Make Enterprise Data More Understandable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In my experience, AI becomes much more reliable when two gaps are addressed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, data relationships.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI needs to know how tables, fields, and business entities are connected—not just through foreign keys, but through relationships that have been verified across real enterprise systems. Discovering and validating those relationships is the foundation of platforms like &lt;strong&gt;Arisyn-IntaLink&lt;/strong&gt;. :contentReference[oaicite:0]{index=0}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second, business semantics.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even after the right data is found, AI still needs to understand what that data means. Shared metric definitions, business terminology, and governed semantic rules help ensure that "Revenue" or "Customer" means the same thing to everyone. That's exactly the role of a semantic layer such as &lt;strong&gt;Arisyn-Semora&lt;/strong&gt;. :contentReference[oaicite:1]{index=1}&lt;/p&gt;

&lt;p&gt;Relationships explain how data is connected.&lt;/p&gt;

&lt;p&gt;Semantics explain what the data means.&lt;/p&gt;

&lt;p&gt;AI needs both.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;## Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't think enterprise AI is limited by SQL generation anymore.&lt;/p&gt;

&lt;p&gt;The bigger challenge is helping AI understand enterprise data the way experienced engineers do.&lt;/p&gt;

&lt;p&gt;The better we capture relationships and business semantics, the less AI has to guess.&lt;/p&gt;

&lt;p&gt;And in enterprise systems, fewer guesses almost always lead to better decisions.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>llm</category>
      <category>sql</category>
    </item>
    <item>
      <title>AI Agents Don't Need More Tables. They Need Better Relationships.</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Wed, 08 Jul 2026 02:19:43 +0000</pubDate>
      <link>https://dev.to/arisyndata/ai-agents-dont-need-more-tables-they-need-better-relationships-25c8</link>
      <guid>https://dev.to/arisyndata/ai-agents-dont-need-more-tables-they-need-better-relationships-25c8</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1jr3jw1z3cr6hpq7uelm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1jr3jw1z3cr6hpq7uelm.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most conversations about enterprise AI focus on models.&lt;/p&gt;

&lt;p&gt;How smart they are.&lt;/p&gt;

&lt;p&gt;How many tokens they support.&lt;/p&gt;

&lt;p&gt;How well they generate SQL.&lt;/p&gt;

&lt;p&gt;After working with enterprise data, I think we're paying attention to the wrong problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem Isn't Finding Data
&lt;/h2&gt;

&lt;p&gt;Enterprise AI usually has access to plenty of data.&lt;/p&gt;

&lt;p&gt;Schemas.&lt;/p&gt;

&lt;p&gt;Data catalogs.&lt;/p&gt;

&lt;p&gt;Documentation.&lt;/p&gt;

&lt;p&gt;Historical SQL.&lt;/p&gt;

&lt;p&gt;Yet it still struggles with surprisingly simple business questions.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because it doesn't understand how the data is connected.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Simple Example
&lt;/h2&gt;

&lt;p&gt;Imagine asking an AI agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Show the top customers by revenue."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It scans the database and finds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4 customer tables&lt;/li&gt;
&lt;li&gt;3 revenue-related tables&lt;/li&gt;
&lt;li&gt;multiple possible join keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the model's perspective, several SQL queries look perfectly valid.&lt;/p&gt;

&lt;p&gt;Only one matches how the business actually defines revenue and customers.&lt;/p&gt;

&lt;p&gt;The model can't infer that from table names alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Relationships Carry Business Knowledge
&lt;/h2&gt;

&lt;p&gt;This is something I've started appreciating more over the past year.&lt;/p&gt;

&lt;p&gt;The relationship between tables isn't just a technical detail.&lt;/p&gt;

&lt;p&gt;It's business knowledge.&lt;/p&gt;

&lt;p&gt;A trusted relationship tells you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which table is the source of truth&lt;/li&gt;
&lt;li&gt;which join path has been validated&lt;/li&gt;
&lt;li&gt;which fields represent the same business entity&lt;/li&gt;
&lt;li&gt;which datasets should never be joined together&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without that context, AI is forced to guess.&lt;/p&gt;

&lt;p&gt;Sometimes it guesses correctly.&lt;/p&gt;

&lt;p&gt;Sometimes it doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger Models Don't Fix Missing Context
&lt;/h2&gt;

&lt;p&gt;Every new model is better at reasoning.&lt;/p&gt;

&lt;p&gt;That's great.&lt;/p&gt;

&lt;p&gt;But reasoning only works when the underlying context is reliable.&lt;/p&gt;

&lt;p&gt;If the relationships are ambiguous, a more capable model simply produces a more convincing wrong answer.&lt;/p&gt;

&lt;p&gt;That's why many enterprise AI projects spend far more time validating results than generating them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;I'm becoming convinced that enterprise AI isn't just a language problem.&lt;/p&gt;

&lt;p&gt;It's a data relationship problem.&lt;/p&gt;

&lt;p&gt;Models will continue to improve.&lt;/p&gt;

&lt;p&gt;The bigger opportunity is helping them understand how enterprise data actually fits together.&lt;/p&gt;

&lt;p&gt;Because once AI understands relationships, everything else becomes much easier.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>llm</category>
      <category>sql</category>
    </item>
    <item>
      <title>Stop Building AI Agents Like Standalone Applications</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Tue, 07 Jul 2026 13:11:00 +0000</pubDate>
      <link>https://dev.to/arisyndata/stop-building-ai-agents-like-standalone-applications-2odp</link>
      <guid>https://dev.to/arisyndata/stop-building-ai-agents-like-standalone-applications-2odp</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo4puh1f5u7dcvasal35s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo4puh1f5u7dcvasal35s.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over the past few months, I've experimented with quite a few enterprise AI projects.&lt;/p&gt;

&lt;p&gt;One thing has become obvious.&lt;/p&gt;

&lt;p&gt;Most teams are still building AI agents the same way they used to build web applications.&lt;/p&gt;

&lt;p&gt;Every new use case becomes another agent.&lt;/p&gt;

&lt;p&gt;Another prompt.&lt;/p&gt;

&lt;p&gt;Another knowledge base.&lt;/p&gt;

&lt;p&gt;Another API integration.&lt;/p&gt;

&lt;p&gt;It works at first.&lt;/p&gt;

&lt;p&gt;But it doesn't scale.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Every Agent Starts Solving the Same Problems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine a company with ten AI agents.&lt;/p&gt;

&lt;p&gt;One helps Sales.&lt;/p&gt;

&lt;p&gt;One supports Finance.&lt;/p&gt;

&lt;p&gt;Another assists HR.&lt;/p&gt;

&lt;p&gt;Another generates weekly reports.&lt;/p&gt;

&lt;p&gt;They look different from the outside, but internally they're solving many of the same problems.&lt;/p&gt;

&lt;p&gt;Each needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;authentication&lt;/li&gt;
&lt;li&gt;permission control&lt;/li&gt;
&lt;li&gt;business definitions&lt;/li&gt;
&lt;li&gt;access to enterprise data&lt;/li&gt;
&lt;li&gt;shared documents&lt;/li&gt;
&lt;li&gt;tools&lt;/li&gt;
&lt;li&gt;monitoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yet many teams implement these capabilities over and over again.&lt;/p&gt;

&lt;p&gt;The result is duplicated logic that becomes harder to maintain every month.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;We Already Solved This Problem in Software Engineering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional applications rarely implement infrastructure from scratch anymore.&lt;/p&gt;

&lt;p&gt;Authentication is shared.&lt;/p&gt;

&lt;p&gt;Logging is shared.&lt;/p&gt;

&lt;p&gt;Monitoring is shared.&lt;/p&gt;

&lt;p&gt;Configuration is shared.&lt;/p&gt;

&lt;p&gt;Developers focus on business logic because the platform provides the rest.&lt;/p&gt;

&lt;p&gt;I think AI engineering is heading toward the same architecture.&lt;/p&gt;

&lt;p&gt;Agents shouldn't own everything themselves.&lt;/p&gt;

&lt;p&gt;They should consume shared platform capabilities.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What Should Live Outside the Agent?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I look at enterprise AI systems, I increasingly think the agent should remain lightweight.&lt;/p&gt;

&lt;p&gt;Instead of embedding everything inside prompts, I'd rather separate responsibilities.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;h3&gt;
  
  
  Context Service
&lt;/h3&gt;

&lt;p&gt;Responsible for business definitions, trusted datasets, and reusable organizational knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tool Registry
&lt;/h3&gt;

&lt;p&gt;A single place where agents discover available APIs, SQL tools, search services, and enterprise systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Permission Layer
&lt;/h3&gt;

&lt;p&gt;Every agent follows the same access policies instead of implementing its own authorization rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Memory Service
&lt;/h3&gt;

&lt;p&gt;Shared long-term memory instead of isolated conversation histories.&lt;/p&gt;

&lt;h3&gt;
  
  
  Observability
&lt;/h3&gt;

&lt;p&gt;One dashboard to understand how agents are performing, what tools they're calling, and where failures occur.&lt;/p&gt;

&lt;p&gt;None of these capabilities belong inside an individual agent.&lt;/p&gt;

&lt;p&gt;They're platform concerns.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Keep Agents Small&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One lesson I've learned is that smaller agents are usually easier to improve.&lt;/p&gt;

&lt;p&gt;When an agent focuses on a single responsibility, it's easier to test, debug, and replace.&lt;/p&gt;

&lt;p&gt;The shared platform handles everything else.&lt;/p&gt;

&lt;p&gt;Instead of creating increasingly complex prompts, we should be investing in better infrastructure.&lt;/p&gt;

&lt;p&gt;The more reusable the platform becomes, the simpler every new agent is to build.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;A Different Mental Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I no longer think of an AI agent as an application.&lt;/p&gt;

&lt;p&gt;I think of it as a runtime component.&lt;/p&gt;

&lt;p&gt;It receives a task.&lt;/p&gt;

&lt;p&gt;It requests context.&lt;/p&gt;

&lt;p&gt;It discovers available tools.&lt;/p&gt;

&lt;p&gt;It checks permissions.&lt;/p&gt;

&lt;p&gt;It completes the work.&lt;/p&gt;

&lt;p&gt;Most of the intelligence isn't inside the agent itself.&lt;/p&gt;

&lt;p&gt;It's distributed across the platform supporting it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Right now, building an AI agent has become surprisingly easy.&lt;/p&gt;

&lt;p&gt;Operating dozens—or eventually hundreds—of them inside an enterprise won't be.&lt;/p&gt;

&lt;p&gt;The organizations that move fastest won't necessarily build more agents.&lt;/p&gt;

&lt;p&gt;They'll build better platforms for those agents to run on.&lt;/p&gt;

&lt;p&gt;To me, that's where enterprise AI engineering is heading next.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>llm</category>
      <category>sql</category>
    </item>
    <item>
      <title>Stop Optimizing Your Data Platform for Dashboards</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Fri, 03 Jul 2026 02:28:32 +0000</pubDate>
      <link>https://dev.to/arisyndata/stop-optimizing-your-data-platform-for-dashboards-1l42</link>
      <guid>https://dev.to/arisyndata/stop-optimizing-your-data-platform-for-dashboards-1l42</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyjdcktqg4e3t0fucl8cf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyjdcktqg4e3t0fucl8cf.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For years, the success of a data platform was measured by one thing:&lt;/p&gt;

&lt;p&gt;How easily people could build dashboards.&lt;/p&gt;

&lt;p&gt;Today, I think that's changing.&lt;/p&gt;

&lt;p&gt;More and more enterprise data is being consumed by AI agents instead of analysts. That changes what a "good" data platform looks like.&lt;/p&gt;

&lt;p&gt;The problem is that most data platforms were never designed for AI.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Dashboards Hide Complexity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a human opens a dashboard, they already know a lot.&lt;/p&gt;

&lt;p&gt;They know which KPIs Finance trusts.&lt;/p&gt;

&lt;p&gt;They know which report leadership uses every Monday.&lt;/p&gt;

&lt;p&gt;They know that two customer tables exist, but only one should be used.&lt;/p&gt;

&lt;p&gt;Most of that knowledge never appears in the database.&lt;/p&gt;

&lt;p&gt;Humans simply carry it with them.&lt;/p&gt;

&lt;p&gt;AI doesn't.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;AI Doesn't Want Charts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI isn't looking at your dashboard.&lt;/p&gt;

&lt;p&gt;It's looking at the underlying data.&lt;/p&gt;

&lt;p&gt;If that data contains three revenue definitions, duplicated customer IDs, or five possible join paths, the AI has no way to know which one represents the business truth.&lt;/p&gt;

&lt;p&gt;The model can generate SQL.&lt;/p&gt;

&lt;p&gt;That doesn't mean it understands your business.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What Should a Modern Data Platform Provide?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of focusing only on BI performance, I've started thinking about a different checklist.&lt;/p&gt;

&lt;p&gt;Can the platform answer questions like these?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which relationships between tables are actually trusted?&lt;/li&gt;
&lt;li&gt;Which metric definition is the official one?&lt;/li&gt;
&lt;li&gt;Which tables are deprecated?&lt;/li&gt;
&lt;li&gt;Which joins are safe to reuse?&lt;/li&gt;
&lt;li&gt;Which business terms mean the same thing?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions aren't about analytics.&lt;/p&gt;

&lt;p&gt;They're about context.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;A Small Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine asking an AI agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Show quarterly revenue by customer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Finding the sales table is easy.&lt;/p&gt;

&lt;p&gt;The difficult part is everything that comes next.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which customer table?&lt;/li&gt;
&lt;li&gt;Gross revenue or net revenue?&lt;/li&gt;
&lt;li&gt;Calendar quarter or fiscal quarter?&lt;/li&gt;
&lt;li&gt;Should internal transactions be excluded?&lt;/li&gt;
&lt;li&gt;Which join path has already been validated?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those decisions are usually made by experienced analysts.&lt;/p&gt;

&lt;p&gt;AI needs that knowledge too.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;This Changes Platform Design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't think data platforms will disappear.&lt;/p&gt;

&lt;p&gt;But I do think their priorities will change.&lt;/p&gt;

&lt;p&gt;Traditional platforms optimized for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dashboards&lt;/li&gt;
&lt;li&gt;reports&lt;/li&gt;
&lt;li&gt;SQL performance&lt;/li&gt;
&lt;li&gt;human exploration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI-native platforms will also need to optimize for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;trusted relationships&lt;/li&gt;
&lt;li&gt;shared business definitions&lt;/li&gt;
&lt;li&gt;governed metrics&lt;/li&gt;
&lt;li&gt;reusable organizational knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The data hasn't changed.&lt;/p&gt;

&lt;p&gt;The consumer has.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;My Take&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every major shift in software has introduced a new primary user.&lt;/p&gt;

&lt;p&gt;Web browsers changed frontend development.&lt;/p&gt;

&lt;p&gt;Mobile phones changed application design.&lt;/p&gt;

&lt;p&gt;Cloud changed infrastructure.&lt;/p&gt;

&lt;p&gt;I think AI agents are going to change enterprise data architecture in the same way.&lt;/p&gt;

&lt;p&gt;If we're still building data platforms only for analysts, we're solving yesterday's problem.&lt;/p&gt;

&lt;p&gt;The next generation of data platforms won't just help people understand data.&lt;/p&gt;

&lt;p&gt;They'll help AI understand it too.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>datascience</category>
      <category>sql</category>
      <category>llm</category>
    </item>
    <item>
      <title>Building AI Agents That Can Actually Understand Enterprise Data</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Wed, 01 Jul 2026 13:52:00 +0000</pubDate>
      <link>https://dev.to/arisyndata/building-ai-agents-that-can-actually-understand-enterprise-data-3465</link>
      <guid>https://dev.to/arisyndata/building-ai-agents-that-can-actually-understand-enterprise-data-3465</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5r30v7qwkwcc32btagy4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5r30v7qwkwcc32btagy4.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The hardest part of building an enterprise AI agent isn't reasoning. It's helping the agent understand your data before it starts reasoning.&lt;/p&gt;

&lt;p&gt;Over the past year, I've built and tested several AI-powered analytics workflows.&lt;/p&gt;

&lt;p&gt;One thing surprised me.&lt;/p&gt;

&lt;p&gt;Getting an LLM to generate SQL isn't nearly as difficult as I expected.&lt;/p&gt;

&lt;p&gt;Getting that SQL to reflect how the business actually works is.&lt;/p&gt;

&lt;p&gt;That's where most enterprise AI agents quietly fail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Typical AI Agent Architecture&lt;/strong&gt;&lt;br&gt;
Most AI agent tutorials follow roughly the same pattern.&lt;/p&gt;

&lt;p&gt;User&lt;br&gt;
   │&lt;br&gt;
   ▼&lt;br&gt;
AI Agent&lt;br&gt;
   │&lt;br&gt;
   ▼&lt;br&gt;
LLM&lt;br&gt;
   │&lt;br&gt;
   ▼&lt;br&gt;
SQL Generator&lt;br&gt;
   │&lt;br&gt;
   ▼&lt;br&gt;
Database&lt;br&gt;
For demos, this works remarkably well.&lt;/p&gt;

&lt;p&gt;Ask:&lt;/p&gt;

&lt;p&gt;Show me the top-selling products this month.&lt;/p&gt;

&lt;p&gt;The agent generates SQL.&lt;/p&gt;

&lt;p&gt;The database responds.&lt;/p&gt;

&lt;p&gt;Everyone is impressed.&lt;/p&gt;

&lt;p&gt;Production is a different story.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Real Problem Starts Before SQL&lt;/strong&gt;&lt;br&gt;
Imagine a business user asks:&lt;/p&gt;

&lt;p&gt;Which strategic customers are growing the fastest this year?&lt;/p&gt;

&lt;p&gt;Now the agent has to answer questions like:&lt;/p&gt;

&lt;p&gt;Which customer table should I use?&lt;br&gt;
Which revenue definition is approved?&lt;br&gt;
Which customers were merged after acquisitions?&lt;br&gt;
Which fiscal calendar applies?&lt;br&gt;
Which joins are actually trusted?&lt;br&gt;
Which historical records should be excluded?&lt;br&gt;
None of these questions require a smarter language model.&lt;/p&gt;

&lt;p&gt;They require business context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL Is Easy. Context Is Hard.&lt;/strong&gt;&lt;br&gt;
Most enterprise databases weren't designed for AI.&lt;/p&gt;

&lt;p&gt;They were designed for applications.&lt;/p&gt;

&lt;p&gt;Over time they accumulate:&lt;/p&gt;

&lt;p&gt;duplicated entities&lt;br&gt;
inconsistent naming&lt;br&gt;
legacy schemas&lt;br&gt;
conflicting metrics&lt;br&gt;
undocumented business rules&lt;br&gt;
A human analyst usually learns these through experience.&lt;/p&gt;

&lt;p&gt;An AI agent has no such experience.&lt;/p&gt;

&lt;p&gt;If the context isn't available, the agent has no choice but to guess.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Prompt Engineering Doesn't Scale&lt;/strong&gt;&lt;br&gt;
One common solution is to keep expanding the system prompt.&lt;/p&gt;

&lt;p&gt;Developers add:&lt;/p&gt;

&lt;p&gt;table descriptions&lt;br&gt;
metric definitions&lt;br&gt;
join rules&lt;br&gt;
business exceptions&lt;br&gt;
Eventually the prompt becomes hundreds of lines long.&lt;/p&gt;

&lt;p&gt;It works…&lt;/p&gt;

&lt;p&gt;Until another team builds another AI agent.&lt;/p&gt;

&lt;p&gt;Now every project maintains its own version of business knowledge.&lt;/p&gt;

&lt;p&gt;A few months later, nobody knows which version is correct.&lt;/p&gt;

&lt;p&gt;The problem isn't prompting.&lt;/p&gt;

&lt;p&gt;The problem is architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think About How You Onboard a New Engineer&lt;/strong&gt;&lt;br&gt;
When a new data engineer joins your company, you don't hand them database credentials and expect them to understand everything.&lt;/p&gt;

&lt;p&gt;You explain things like:&lt;/p&gt;

&lt;p&gt;which dashboards leadership trusts&lt;br&gt;
where official metrics come from&lt;br&gt;
why certain tables shouldn't be used&lt;br&gt;
which relationships are verified&lt;br&gt;
how different systems connect&lt;br&gt;
Only after learning that context can they contribute confidently.&lt;/p&gt;

&lt;p&gt;AI agents need the same onboarding process.&lt;/p&gt;

&lt;p&gt;The difference is that their onboarding has to be captured as reusable infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Every Enterprise AI Agent Should Know&lt;/strong&gt;&lt;br&gt;
In my experience, an enterprise AI agent should understand at least five things before it writes a single SQL query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Business Definitions&lt;/strong&gt;&lt;br&gt;
What exactly does "active customer" mean?&lt;/p&gt;

&lt;p&gt;Does "revenue" include returns?&lt;/p&gt;

&lt;p&gt;Is "inventory" updated in real time?&lt;/p&gt;

&lt;p&gt;Without shared definitions, different agents produce different answers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Trusted Relationships&lt;/strong&gt;&lt;br&gt;
Enterprise databases often contain multiple ways to join the same datasets.&lt;/p&gt;

&lt;p&gt;Some are technically valid.&lt;/p&gt;

&lt;p&gt;Only one reflects how the business actually works.&lt;/p&gt;

&lt;p&gt;The agent shouldn't discover this by trial and error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Approved Metrics&lt;/strong&gt;&lt;br&gt;
Not every calculation is official.&lt;/p&gt;

&lt;p&gt;Finance usually has one approved revenue metric.&lt;/p&gt;

&lt;p&gt;Operations may have another.&lt;/p&gt;

&lt;p&gt;The agent needs to know which one belongs to which scenario.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Governance Rules&lt;/strong&gt;&lt;br&gt;
Some tables are deprecated.&lt;/p&gt;

&lt;p&gt;Some columns should never be queried directly.&lt;/p&gt;

&lt;p&gt;Some users have row-level permissions.&lt;/p&gt;

&lt;p&gt;Governance is part of reasoning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Organizational Knowledge&lt;/strong&gt;&lt;br&gt;
This is the most overlooked category.&lt;/p&gt;

&lt;p&gt;Every company has knowledge that exists only because experienced employees remember it.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;"Don't use that table after 2023."&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;"Those records were duplicated during the migration."&lt;/p&gt;

&lt;p&gt;Humans learn these informally.&lt;/p&gt;

&lt;p&gt;AI doesn't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Missing Layer&lt;/strong&gt;&lt;br&gt;
Instead of embedding all this knowledge inside prompts, I think enterprises need a shared context layer.&lt;/p&gt;

&lt;p&gt;Something like this:&lt;/p&gt;

&lt;p&gt;Business Users&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
    AI Agents&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Shared Context Layer&lt;br&gt;
        │&lt;br&gt;
 ├─ Business Definitions&lt;br&gt;
 ├─ Trusted Relationships&lt;br&gt;
 ├─ Approved Metrics&lt;br&gt;
 ├─ Governance Rules&lt;br&gt;
 └─ Organizational Knowledge&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
        LLM&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Enterprise Data&lt;br&gt;
Now every AI application learns from the same source of truth.&lt;/p&gt;

&lt;p&gt;Not from a different prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Better Way to Build AI Agents&lt;/strong&gt;&lt;br&gt;
I've started asking different questions when evaluating enterprise AI projects.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;p&gt;Which model are you using?&lt;/p&gt;

&lt;p&gt;I ask:&lt;/p&gt;

&lt;p&gt;Where does the agent get business definitions?&lt;br&gt;
How are trusted joins managed?&lt;br&gt;
Who owns metric definitions?&lt;br&gt;
How does every AI application stay consistent?&lt;br&gt;
Those answers usually tell me much more about whether the project will succeed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
The industry is spending a lot of time making AI agents better at reasoning.&lt;/p&gt;

&lt;p&gt;That's important.&lt;/p&gt;

&lt;p&gt;But reasoning only works when the information being reasoned about is trustworthy.&lt;/p&gt;

&lt;p&gt;For enterprise AI, the challenge isn't simply building smarter agents.&lt;/p&gt;

&lt;p&gt;It's building better data infrastructure for those agents.&lt;/p&gt;

&lt;p&gt;Once that foundation exists, better models become an advantage.&lt;/p&gt;

&lt;p&gt;Without it, every new model is just making more confident guesses.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>llm</category>
      <category>sql</category>
    </item>
    <item>
      <title>We Stopped Improving Our AI Prompts. We Started Improving Our Data Instead.</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Mon, 29 Jun 2026 17:30:00 +0000</pubDate>
      <link>https://dev.to/arisyndata/we-stopped-improving-our-ai-prompts-we-started-improving-our-data-instead-4af0</link>
      <guid>https://dev.to/arisyndata/we-stopped-improving-our-ai-prompts-we-started-improving-our-data-instead-4af0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fygj832nrx6c9unbor5sj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fygj832nrx6c9unbor5sj.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Modern LLMs are already surprisingly good at generating SQL. The real challenge is giving them enough context to generate SQL that people actually trust.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Question That Changed Our Approach
&lt;/h2&gt;

&lt;p&gt;Like many teams working on enterprise AI, we spent a lot of time trying to improve prompts.&lt;/p&gt;

&lt;p&gt;We experimented with different prompt templates.&lt;/p&gt;

&lt;p&gt;We added more examples.&lt;/p&gt;

&lt;p&gt;We adjusted temperatures.&lt;/p&gt;

&lt;p&gt;We tried different models.&lt;/p&gt;

&lt;p&gt;Sometimes the results improved.&lt;/p&gt;

&lt;p&gt;Sometimes they didn't.&lt;/p&gt;

&lt;p&gt;But one thing became obvious after working with real enterprise databases.&lt;/p&gt;

&lt;p&gt;The model wasn't failing because it couldn't write SQL.&lt;/p&gt;

&lt;p&gt;It was failing because it didn't understand the organization.&lt;/p&gt;

&lt;p&gt;That realization completely changed how we approached enterprise AI.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How can we make the model smarter?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;we started asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How can we make our data easier for AI to understand?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That turned out to be a much more interesting engineering problem.&lt;/p&gt;




&lt;h1&gt;
  
  
  Demo Databases Hide the Real Problem
&lt;/h1&gt;

&lt;p&gt;Most AI SQL demos look fantastic.&lt;/p&gt;

&lt;p&gt;A clean schema.&lt;/p&gt;

&lt;p&gt;Simple foreign keys.&lt;/p&gt;

&lt;p&gt;Consistent naming.&lt;/p&gt;

&lt;p&gt;Twenty tables.&lt;/p&gt;

&lt;p&gt;One customer table.&lt;/p&gt;

&lt;p&gt;One orders table.&lt;/p&gt;

&lt;p&gt;Everything joins naturally.&lt;/p&gt;

&lt;p&gt;Ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which customers spent the most last month?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The model generates SQL.&lt;/p&gt;

&lt;p&gt;The SQL executes.&lt;/p&gt;

&lt;p&gt;Everyone applauds.&lt;/p&gt;

&lt;p&gt;Production systems don't look anything like that.&lt;/p&gt;

&lt;p&gt;One customer table becomes twelve.&lt;/p&gt;

&lt;p&gt;Revenue exists in multiple systems.&lt;/p&gt;

&lt;p&gt;Finance has one definition.&lt;/p&gt;

&lt;p&gt;Sales has another.&lt;/p&gt;

&lt;p&gt;Marketing has a third.&lt;/p&gt;

&lt;p&gt;Historical migrations leave duplicate entities everywhere.&lt;/p&gt;

&lt;p&gt;Some relationships exist only because one senior engineer remembers them.&lt;/p&gt;

&lt;p&gt;That's the environment enterprise AI actually operates in.&lt;/p&gt;




&lt;h1&gt;
  
  
  SQL Isn't the Hard Part Anymore
&lt;/h1&gt;

&lt;p&gt;Five years ago, SQL generation itself was a research challenge.&lt;/p&gt;

&lt;p&gt;Today, it's becoming a solved problem.&lt;/p&gt;

&lt;p&gt;Give GPT-4, Claude, Gemini, or another modern LLM a reasonably organized schema, and they'll usually generate valid SQL.&lt;/p&gt;

&lt;p&gt;The bottleneck has moved.&lt;/p&gt;

&lt;p&gt;Today's bottleneck looks more like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which table should the model use?&lt;/li&gt;
&lt;li&gt;Which definition is officially trusted?&lt;/li&gt;
&lt;li&gt;Which join path is correct?&lt;/li&gt;
&lt;li&gt;Which records should be excluded?&lt;/li&gt;
&lt;li&gt;Which business rule overrides the default logic?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those questions have nothing to do with SQL syntax.&lt;/p&gt;

&lt;p&gt;They're questions about organizational knowledge.&lt;/p&gt;




&lt;h1&gt;
  
  
  We Started Looking at Failed Queries
&lt;/h1&gt;

&lt;p&gt;One exercise turned out to be incredibly useful.&lt;/p&gt;

&lt;p&gt;Instead of reviewing successful demos, we collected failed enterprise queries.&lt;/p&gt;

&lt;p&gt;Not queries with syntax errors.&lt;/p&gt;

&lt;p&gt;Queries that returned technically correct answers nobody trusted.&lt;/p&gt;

&lt;p&gt;Patterns appeared almost immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pattern 1 — Multiple Sources of Truth
&lt;/h2&gt;

&lt;p&gt;The database contained several revenue tables.&lt;/p&gt;

&lt;p&gt;Each one existed for a legitimate reason.&lt;/p&gt;

&lt;p&gt;Historical reporting.&lt;/p&gt;

&lt;p&gt;Operational reporting.&lt;/p&gt;

&lt;p&gt;Finance adjustments.&lt;/p&gt;

&lt;p&gt;Regional systems.&lt;/p&gt;

&lt;p&gt;The AI selected one.&lt;/p&gt;

&lt;p&gt;Finance expected another.&lt;/p&gt;

&lt;p&gt;Nobody considered the answer reliable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Pattern 2 — Hidden Business Rules
&lt;/h2&gt;

&lt;p&gt;The SQL was valid.&lt;/p&gt;

&lt;p&gt;The numbers were wrong.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because experienced analysts always excluded cancelled transactions after reconciliation.&lt;/p&gt;

&lt;p&gt;That rule wasn't stored anywhere.&lt;/p&gt;

&lt;p&gt;It simply lived inside institutional knowledge.&lt;/p&gt;

&lt;p&gt;The AI had no way to discover it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Pattern 3 — Relationship Ambiguity
&lt;/h2&gt;

&lt;p&gt;The schema suggested one join.&lt;/p&gt;

&lt;p&gt;Senior engineers always used another.&lt;/p&gt;

&lt;p&gt;Not because the database required it.&lt;/p&gt;

&lt;p&gt;Because years of production experience had proven it was safer.&lt;/p&gt;

&lt;p&gt;Again, nothing in the schema explained that.&lt;/p&gt;




&lt;h2&gt;
  
  
  Pattern 4 — Business Language Doesn't Match Database Language
&lt;/h2&gt;

&lt;p&gt;Users ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Active customers&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The database stores:&lt;/p&gt;

&lt;p&gt;customer_status = 7&lt;/p&gt;

&lt;p&gt;Business users understand "active."&lt;/p&gt;

&lt;p&gt;The database understands integers.&lt;/p&gt;

&lt;p&gt;Someone has to bridge that gap.&lt;/p&gt;




&lt;h1&gt;
  
  
  Better Prompts Didn't Solve These Problems
&lt;/h1&gt;

&lt;p&gt;Our first instinct was exactly what most teams try.&lt;/p&gt;

&lt;p&gt;Improve the prompt.&lt;/p&gt;

&lt;p&gt;Add examples.&lt;/p&gt;

&lt;p&gt;Explain business terminology.&lt;/p&gt;

&lt;p&gt;Increase context length.&lt;/p&gt;

&lt;p&gt;Eventually we realized we were embedding organizational knowledge inside prompts.&lt;/p&gt;

&lt;p&gt;That doesn't scale.&lt;/p&gt;

&lt;p&gt;Every application duplicates the same context.&lt;/p&gt;

&lt;p&gt;Every prompt becomes longer.&lt;/p&gt;

&lt;p&gt;Every update requires editing multiple systems.&lt;/p&gt;

&lt;p&gt;Eventually prompts become documentation.&lt;/p&gt;

&lt;p&gt;And documentation always drifts.&lt;/p&gt;




&lt;h1&gt;
  
  
  We Needed Shared Context Instead
&lt;/h1&gt;

&lt;p&gt;The breakthrough came when we stopped thinking about prompts as the primary source of intelligence.&lt;/p&gt;

&lt;p&gt;Instead, we began thinking about reusable context.&lt;/p&gt;

&lt;p&gt;Things every AI application should understand before generating SQL.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;trusted business definitions&lt;/li&gt;
&lt;li&gt;approved metrics&lt;/li&gt;
&lt;li&gt;validated relationships&lt;/li&gt;
&lt;li&gt;preferred join paths&lt;/li&gt;
&lt;li&gt;business terminology&lt;/li&gt;
&lt;li&gt;governance rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of rebuilding this knowledge for every prompt, why not maintain it once?&lt;/p&gt;

&lt;p&gt;That idea changed our engineering priorities.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Architecture Started Looking Different
&lt;/h1&gt;

&lt;p&gt;Originally our architecture looked familiar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
User

↓

LLM

↓

Database

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple.&lt;/p&gt;

&lt;p&gt;Elegant.&lt;/p&gt;

&lt;p&gt;Wrong.&lt;/p&gt;

&lt;p&gt;Eventually it evolved into something closer to this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
User

↓

AI Application

↓

Context Layer

• Semantic Definitions

• Relationship Discovery

• Business Metrics

• Governance Rules

↓

LLM

↓

Database

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice something interesting.&lt;/p&gt;

&lt;p&gt;The model didn't disappear.&lt;/p&gt;

&lt;p&gt;It simply stopped carrying all the responsibility.&lt;/p&gt;




&lt;h1&gt;
  
  
  Context Is Becoming Infrastructure
&lt;/h1&gt;

&lt;p&gt;I think many engineering teams still treat context as application logic.&lt;/p&gt;

&lt;p&gt;Every AI assistant maintains its own prompts.&lt;/p&gt;

&lt;p&gt;Its own examples.&lt;/p&gt;

&lt;p&gt;Its own business rules.&lt;/p&gt;

&lt;p&gt;Its own metadata.&lt;/p&gt;

&lt;p&gt;That works when you have one assistant.&lt;/p&gt;

&lt;p&gt;It becomes a maintenance nightmare when you have ten.&lt;/p&gt;

&lt;p&gt;Or fifty.&lt;/p&gt;

&lt;p&gt;Or hundreds.&lt;/p&gt;

&lt;p&gt;Context shouldn't live inside applications.&lt;/p&gt;

&lt;p&gt;It should live inside infrastructure.&lt;/p&gt;

&lt;p&gt;Just like authentication.&lt;/p&gt;

&lt;p&gt;Just like monitoring.&lt;/p&gt;

&lt;p&gt;Just like APIs.&lt;/p&gt;

&lt;p&gt;Shared.&lt;/p&gt;

&lt;p&gt;Governed.&lt;/p&gt;

&lt;p&gt;Reusable.&lt;/p&gt;




&lt;h1&gt;
  
  
  Data Engineering Is Quietly Changing
&lt;/h1&gt;

&lt;p&gt;This has also changed how I think about data engineering.&lt;/p&gt;

&lt;p&gt;Traditionally, data engineers focused on things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ingestion&lt;/li&gt;
&lt;li&gt;transformation&lt;/li&gt;
&lt;li&gt;storage&lt;/li&gt;
&lt;li&gt;performance&lt;/li&gt;
&lt;li&gt;orchestration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those responsibilities still matter.&lt;/p&gt;

&lt;p&gt;But AI introduces another responsibility.&lt;/p&gt;

&lt;p&gt;Preparing data for machine reasoning.&lt;/p&gt;

&lt;p&gt;That includes questions like:&lt;/p&gt;

&lt;p&gt;Can AI understand this metric?&lt;/p&gt;

&lt;p&gt;Can AI safely join these tables?&lt;/p&gt;

&lt;p&gt;Can AI explain where this number came from?&lt;/p&gt;

&lt;p&gt;Can AI distinguish between similar concepts?&lt;/p&gt;

&lt;p&gt;Those weren't traditional data engineering problems.&lt;/p&gt;

&lt;p&gt;They're becoming increasingly important now.&lt;/p&gt;




&lt;h1&gt;
  
  
  The New Question I Ask
&lt;/h1&gt;

&lt;p&gt;Whenever someone tells me they're building enterprise AI, I no longer ask:&lt;/p&gt;

&lt;p&gt;Which model are you using?&lt;/p&gt;

&lt;p&gt;Instead I ask:&lt;/p&gt;

&lt;p&gt;Where does your AI get its business context?&lt;/p&gt;

&lt;p&gt;Sometimes the answer is:&lt;/p&gt;

&lt;p&gt;"Our prompts."&lt;/p&gt;

&lt;p&gt;Sometimes it's:&lt;/p&gt;

&lt;p&gt;"Our documentation."&lt;/p&gt;

&lt;p&gt;Sometimes nobody knows.&lt;/p&gt;

&lt;p&gt;That's usually where the biggest opportunity exists.&lt;/p&gt;




&lt;h1&gt;
  
  
  What I Think Will Matter Over the Next Five Years
&lt;/h1&gt;

&lt;p&gt;Every year models become better.&lt;/p&gt;

&lt;p&gt;That's almost guaranteed.&lt;/p&gt;

&lt;p&gt;But every enterprise is using roughly the same foundation models.&lt;/p&gt;

&lt;p&gt;Competitive advantage probably won't come from choosing Model A instead of Model B.&lt;/p&gt;

&lt;p&gt;It will come from something much harder to copy.&lt;/p&gt;

&lt;p&gt;The quality of organizational context.&lt;/p&gt;

&lt;p&gt;Companies that organize business knowledge into reusable infrastructure will build AI systems that are more reliable, easier to maintain, and far more scalable.&lt;/p&gt;

&lt;p&gt;Companies that don't will continue fighting the same problems with increasingly sophisticated prompts.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Looking back, the biggest shift wasn't technical.&lt;/p&gt;

&lt;p&gt;It was conceptual.&lt;/p&gt;

&lt;p&gt;We stopped treating enterprise AI as a language problem.&lt;/p&gt;

&lt;p&gt;We started treating it as a data infrastructure problem.&lt;/p&gt;

&lt;p&gt;LLMs are becoming exceptional reasoning engines.&lt;/p&gt;

&lt;p&gt;What they still lack is trusted organizational context.&lt;/p&gt;

&lt;p&gt;And I increasingly believe that's where the next generation of enterprise engineering will focus.&lt;/p&gt;

&lt;p&gt;Not writing better prompts.&lt;/p&gt;

&lt;p&gt;Not switching models every six months.&lt;/p&gt;

&lt;p&gt;But building data infrastructure that allows every AI application to reason from the same trusted foundation.&lt;/p&gt;

&lt;p&gt;When that foundation exists, SQL generation becomes almost the easy part.&lt;/p&gt;

&lt;p&gt;Without it, even the smartest model is simply making educated guesses.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Why Text-to-SQL Breaks When the Join Path Is Not Obvious</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Fri, 26 Jun 2026 13:05:00 +0000</pubDate>
      <link>https://dev.to/arisyndata/why-text-to-sql-breaks-when-the-join-path-is-not-obvious-3bk0</link>
      <guid>https://dev.to/arisyndata/why-text-to-sql-breaks-when-the-join-path-is-not-obvious-3bk0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2nz0mzcca3zs9l6yx2n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2nz0mzcca3zs9l6yx2n.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most Text-to-SQL examples are too clean.&lt;/p&gt;

&lt;p&gt;They usually assume a simple schema, obvious table names, clear foreign keys, and a question that maps neatly to one or two tables. In that environment, generating SQL from natural language looks impressive.&lt;/p&gt;

&lt;p&gt;Enterprise databases are not like that.&lt;/p&gt;

&lt;p&gt;In real analytics work, the hard part is often not the SELECT clause. It is the join path.&lt;/p&gt;

&lt;h2&gt;
  
  
  The SQL Can Be Valid and Still Wrong
&lt;/h2&gt;

&lt;p&gt;Imagine a user asks:&lt;/p&gt;

&lt;p&gt;“Show revenue by customer for the last quarter.”&lt;/p&gt;

&lt;p&gt;A model may generate something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;revenue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;total_revenue&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;
  &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_date&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="s1"&gt;'2026-01-01'&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_date&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="s1"&gt;'2026-04-01'&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Technically, this looks fine.&lt;/p&gt;

&lt;p&gt;But in an enterprise environment, several things may be wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;customers&lt;/code&gt; may not be the approved customer master.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;orders.revenue&lt;/code&gt; may not be the finance-approved revenue field.&lt;/li&gt;
&lt;li&gt;Customer records may be duplicated across regions.&lt;/li&gt;
&lt;li&gt;Some orders may need to be excluded because they were adjusted later.&lt;/li&gt;
&lt;li&gt;The join may create duplication if there are multiple customer records per account.&lt;/li&gt;
&lt;li&gt;Last quarter may follow fiscal, not calendar, logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The database accepts the query.&lt;/p&gt;

&lt;p&gt;The dashboard renders.&lt;/p&gt;

&lt;p&gt;The answer is wrong.&lt;/p&gt;

&lt;p&gt;That is the uncomfortable part of enterprise Text-to-SQL.&lt;/p&gt;

&lt;p&gt;A syntactically valid query is not the same as a trusted query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Join Paths Are Hard
&lt;/h2&gt;

&lt;p&gt;Join paths are obvious only when the data model is clean.&lt;/p&gt;

&lt;p&gt;In production systems, they are usually messy.&lt;/p&gt;

&lt;p&gt;You may have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Missing foreign keys&lt;/li&gt;
&lt;li&gt;Legacy tables&lt;/li&gt;
&lt;li&gt;Similar columns with different meanings&lt;/li&gt;
&lt;li&gt;One-to-many relationships that create fanout&lt;/li&gt;
&lt;li&gt;Historical snapshots&lt;/li&gt;
&lt;li&gt;Slowly changing dimensions&lt;/li&gt;
&lt;li&gt;Department-specific marts&lt;/li&gt;
&lt;li&gt;Fields reused for different purposes&lt;/li&gt;
&lt;li&gt;Business rules that exist only in old SQL reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even experienced engineers often need time to inspect the schema, check existing reports, ask someone in finance, and run sample queries before trusting a join.&lt;/p&gt;

&lt;p&gt;Now ask an AI model to do the same thing with only table names and column names.&lt;/p&gt;

&lt;p&gt;It will guess.&lt;/p&gt;

&lt;p&gt;Sometimes the guess will be right.&lt;/p&gt;

&lt;p&gt;Sometimes it will be dangerously plausible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Fanout Problem
&lt;/h2&gt;

&lt;p&gt;One of the most common issues is fanout.&lt;/p&gt;

&lt;p&gt;Suppose you join orders to order_lines and then to shipments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;revenue&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;order_lines&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;
  &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;shipments&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;
  &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;line_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;line_id&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If one order line can have multiple shipments, order revenue may be counted multiple times.&lt;/p&gt;

&lt;p&gt;The SQL is valid.&lt;/p&gt;

&lt;p&gt;The join is valid.&lt;/p&gt;

&lt;p&gt;The result is not valid for revenue reporting.&lt;/p&gt;

&lt;p&gt;A human analyst may know to aggregate at the order level first, or use a shipment-adjusted revenue table, or avoid this path altogether.&lt;/p&gt;

&lt;p&gt;A model needs that knowledge in context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Metadata Alone Is Not Enough
&lt;/h2&gt;

&lt;p&gt;Metadata helps, but it does not solve the full problem.&lt;/p&gt;

&lt;p&gt;Column names can tell you that &lt;code&gt;customer_id&lt;/code&gt; relates to customers.&lt;/p&gt;

&lt;p&gt;They do not tell you whether this is the right customer relationship for financial reporting.&lt;/p&gt;

&lt;p&gt;Foreign keys can tell you that a relationship exists.&lt;/p&gt;

&lt;p&gt;They do not tell you whether the relationship is safe for aggregation.&lt;/p&gt;

&lt;p&gt;Descriptions can tell you what a table contains.&lt;/p&gt;

&lt;p&gt;They do not always explain historical exceptions.&lt;/p&gt;

&lt;p&gt;That is why enterprise Text-to-SQL needs more than schemas.&lt;/p&gt;

&lt;p&gt;It needs relationship context.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Relationship Context Should Include
&lt;/h2&gt;

&lt;p&gt;At minimum, an AI query system should know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Candidate join paths between tables&lt;/li&gt;
&lt;li&gt;Approved join paths for common business questions&lt;/li&gt;
&lt;li&gt;Relationship cardinality&lt;/li&gt;
&lt;li&gt;Known fanout risks&lt;/li&gt;
&lt;li&gt;Join confidence&lt;/li&gt;
&lt;li&gt;Source of relationship evidence&lt;/li&gt;
&lt;li&gt;Whether the relationship came from constraints, SQL history, naming patterns, dbt models, BI datasets, or human approval&lt;/li&gt;
&lt;li&gt;Which paths are rejected or deprecated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This changes the behavior of the system.&lt;/p&gt;

&lt;p&gt;Instead of simply generating SQL, it can reason about query safety.&lt;/p&gt;

&lt;p&gt;It can choose the trusted path.&lt;/p&gt;

&lt;p&gt;It can warn when no approved path exists.&lt;/p&gt;

&lt;p&gt;It can ask for clarification when multiple paths are possible.&lt;/p&gt;

&lt;p&gt;That is far more useful than blindly producing a query.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Better Pattern
&lt;/h2&gt;

&lt;p&gt;A more reliable Text-to-SQL system should work like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parse the user question.&lt;/li&gt;
&lt;li&gt;Identify business entities and metrics.&lt;/li&gt;
&lt;li&gt;Resolve semantic definitions.&lt;/li&gt;
&lt;li&gt;Retrieve candidate tables.&lt;/li&gt;
&lt;li&gt;Retrieve trusted relationship paths.&lt;/li&gt;
&lt;li&gt;Check join risks.&lt;/li&gt;
&lt;li&gt;Generate SQL using approved paths.&lt;/li&gt;
&lt;li&gt;Validate the SQL against semantic and relationship rules.&lt;/li&gt;
&lt;li&gt;Explain the assumptions behind the result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The key difference is step 5 and step 6.&lt;/p&gt;

&lt;p&gt;Many systems jump from semantic mapping directly to SQL generation.&lt;/p&gt;

&lt;p&gt;That is where errors enter.&lt;/p&gt;

&lt;p&gt;The missing layer is relationship intelligence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;Text-to-SQL is not just a language translation problem.&lt;/p&gt;

&lt;p&gt;It is a context problem.&lt;/p&gt;

&lt;p&gt;Models are getting better at writing SQL.&lt;/p&gt;

&lt;p&gt;But enterprise analytics requires more than syntactically correct SQL.&lt;/p&gt;

&lt;p&gt;It requires knowing which joins are safe, which paths are trusted, and which assumptions should be checked before the query runs.&lt;/p&gt;

&lt;p&gt;Until that context exists, Text-to-SQL will continue to work well in demos and struggle in real companies.&lt;/p&gt;

</description>
      <category>texttosql</category>
      <category>ai</category>
      <category>dataengineering</category>
      <category>datagovernance</category>
    </item>
    <item>
      <title>Why AI Analytics Has a Knowledge Problem</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Wed, 24 Jun 2026 13:38:00 +0000</pubDate>
      <link>https://dev.to/arisyndata/why-ai-analytics-has-a-knowledge-problem-542h</link>
      <guid>https://dev.to/arisyndata/why-ai-analytics-has-a-knowledge-problem-542h</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgtsrgtgeubz9htlla4uf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgtsrgtgeubz9htlla4uf.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing I’ve noticed while working with enterprise analytics systems:&lt;/p&gt;

&lt;p&gt;The hardest problems are rarely technical.&lt;/p&gt;

&lt;p&gt;Most modern models can generate SQL.&lt;/p&gt;

&lt;p&gt;Most warehouses are well documented.&lt;/p&gt;

&lt;p&gt;Most organizations have catalogs and governance programs.&lt;/p&gt;

&lt;p&gt;Yet teams still depend heavily on a handful of experienced engineers.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because analytics depends on knowledge, not just data.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;A schema may tell you that three customer tables exist.&lt;/p&gt;

&lt;p&gt;It doesn’t tell you:&lt;/p&gt;

&lt;p&gt;· which one is authoritative&lt;/p&gt;

&lt;p&gt;· which one is historical&lt;/p&gt;

&lt;p&gt;· which one executive reporting relies on&lt;/p&gt;

&lt;p&gt;Experienced engineers know the difference.&lt;/p&gt;

&lt;p&gt;AI doesn’t.&lt;/p&gt;

&lt;p&gt;That’s why many enterprise analytics failures aren’t caused by bad SQL generation.&lt;/p&gt;

&lt;p&gt;They’re caused by missing organizational knowledge.&lt;/p&gt;

&lt;p&gt;As AI adoption accelerates, I think we’re going to spend less time talking about prompts and more time talking about knowledge infrastructure.&lt;/p&gt;

&lt;p&gt;Because models can’t use knowledge that organizations never captured.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>sql</category>
      <category>data</category>
    </item>
    <item>
      <title>Why AI Keeps Generating Bad SQL Even When The Schema Is Correct</title>
      <dc:creator>ArisynData</dc:creator>
      <pubDate>Mon, 22 Jun 2026 13:32:00 +0000</pubDate>
      <link>https://dev.to/arisyndata/why-ai-keeps-generating-bad-sql-even-when-the-schema-is-correct-26fm</link>
      <guid>https://dev.to/arisyndata/why-ai-keeps-generating-bad-sql-even-when-the-schema-is-correct-26fm</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fopjqfojati03dceh5f2s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fopjqfojati03dceh5f2s.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing I've noticed while testing Text-to-SQL systems:&lt;br&gt;
The schema is often fine.&lt;br&gt;
The model is often fine.&lt;br&gt;
The SQL is often syntactically correct.&lt;br&gt;
The answer is still wrong.&lt;br&gt;
Why?&lt;br&gt;
Because SQL generation isn't the hard part.&lt;br&gt;
Join selection is.&lt;br&gt;
Imagine a warehouse containing:&lt;br&gt;
orders&lt;br&gt;
customers&lt;br&gt;
subscriptions&lt;br&gt;
invoices&lt;br&gt;
accounts&lt;br&gt;
A model may know all five tables exist.&lt;br&gt;
The challenge is deciding:&lt;br&gt;
Which relationship path should be used?&lt;br&gt;
That's where many systems fail.&lt;br&gt;
Most Text-to-SQL architectures focus on:&lt;br&gt;
Schema → Prompt → SQL&lt;br&gt;
But production environments usually require:&lt;br&gt;
Schema&lt;br&gt;
↓&lt;br&gt;
Relationship Discovery&lt;br&gt;
↓&lt;br&gt;
Trusted Join Path&lt;br&gt;
↓&lt;br&gt;
Prompt&lt;br&gt;
↓&lt;br&gt;
SQL&lt;br&gt;
Without relationship context, the model is forced to guess.&lt;br&gt;
And enterprise analytics is a terrible place for guessing.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>sql</category>
    </item>
  </channel>
</rss>
