Skip to main content
← All posts·
AI Infrastructure

Why Your AI Agent Fails: The Data Foundation Gap Nobody Talks About

AI agents generate perfect SQL but wrong answers. The gap isn't the model — it's the data foundation. How column descriptions, business rules, and domain context took one healthcare AI agent from 0% to 92% accuracy without any prompt engineering.

Luca Berton10 min read

The Model Isn't the Problem. Your Data Context Is.

Every enterprise AI deployment follows the same arc: excitement about the model's capabilities, followed by disappointment at its accuracy in production. The model can generate SQL. It can write code. It can summarise documents. What it can't do is understand your business — unless you give it the context.

A recent experiment in healthcare analytics quantified exactly how much context matters. The results should change how every enterprise approaches AI deployment.

The Experiment: From 0% to 92% Accuracy

Progressive Context Addition

Same LLM. Same data. Same questions. Zero prompt engineering. The only variable was the context provided:

IterationWhat ChangedSQL GenerationAccuracy
1Raw tables0%0%
2Modelled table (no context)38.5%0%
3+ Column descriptions100%15%
4+ Business rules and instructions100%77%
5-6+ Metrics, verified queries, eval refinement100%92%

What This Tells Us About Enterprise AI

The "Boring" Infrastructure Is the Bottleneck

The biggest accuracy jumps came from decidedly unglamorous work:

  • Column descriptions — Going from 0% to 15% accuracy just by documenting what each column means. This is metadata management. It's not exciting. It's essential.
  • Business rules — Going from 15% to 77% by codifying domain knowledge. "Revenue" doesn't mean the same thing in every department. "Active patient" has a specific clinical definition. The AI doesn't know this unless you tell it.
  • Verified queries and metrics — Going from 77% to 92% by giving the AI examples of correct answers. This is the institutional knowledge that a good analyst accumulates over months on the job.
📘 Book

Kubernetes Recipes

Practical guide for container orchestration and deployment — hands-on patterns you can use today.

View on Amazon →

The Enterprise AI Maturity Gap

Most enterprise AI initiatives focus on model selection and prompt engineering. The experiment shows that's optimising the wrong thing:

  • What enterprises invest in: Model evaluation, prompt engineering, fine-tuning, RAG architecture
  • What actually moves accuracy: Data modelling, column documentation, business rule codification, verified reference queries
  • The gap: The "boring" data infrastructure work gets 10% of the budget but drives 90% of the accuracy improvement

Implications for Regulated Industries

Healthcare

The experiment was conducted at a healthcare company with multiple clinics. In this context:

  • A "patient visit" might mean different things across clinic types
  • Revenue calculations vary by payer, service line, and reimbursement model
  • Clinical metrics have specific regulatory definitions (CMS quality measures, HEDIS)
  • Without this context, the AI generates plausible but clinically meaningless answers

Financial Services

The same pattern applies in banking and insurance:

  • "Customer" vs "account" vs "relationship" — different entities with different counting rules
  • Regulatory metrics (CET1, LCR, NSFR) have precise definitions that generic AI doesn't know
  • Business rules around reporting periods, consolidation, and currency conversion are invisible to the model
🎓 Course

Learn Ansible Automation in 250+ Examples

Comprehensive Ansible training with real-world use cases.

Start on Educative →

What to Do About It

The Data Foundation Checklist for AI Readiness

  1. Document your data model — Every table, every column, with business-meaningful descriptions. Not technical type definitions — what the data means.
  2. Codify business rules — "How do we calculate revenue?" "What defines an active customer?" "When is a claim considered closed?" Write these down in a format the AI can consume.
  3. Build a verified query library — Create a set of known-good queries with verified results. These serve as few-shot examples and evaluation benchmarks.
  4. Define metrics precisely — Every KPI should have a single, unambiguous definition with the exact calculation methodology.
  5. Maintain a data dictionary — Not a one-time documentation effort. A living, maintained resource that evolves with your data.

The Bottom Line

The AI model is a commodity. GPT-4, Claude, Gemini — they're all capable enough for most enterprise tasks. The differentiator is the data foundation: the metadata, business rules, domain context, and verified examples that transform a generic language model into a trustworthy enterprise tool.

This is what we mean when we say we're an AI infrastructure partner, not an AI product vendor. The infrastructure — data foundation, governance, context architecture — is where enterprise AI succeeds or fails.

📋 Free Resource

AI Readiness Checklist

50-point interactive checklist covering strategy, data, infrastructure, governance, and people. Score your organisation's AI readiness.

Get Free Checklist →
AI agents
data foundation
data quality
enterprise AI
accuracy
context architecture
healthcare AI

Need help applying this in your organization?

Get a free 30-minute assessment with actionable recommendations — whether we work together or not.

Book Your Free AI Platform Assessment

Or see AI readiness assessment scope & pricing

18+ years experience · Ex-Red Hat & Dell · Speaker at KubeCon EU 2026

Luca Berton

Written by

Luca Berton

CEO at Open Empower. 18+ years building enterprise infrastructure at JPMorgan Chase, Red Hat & Dell. Author of 9 technical books. Speaker at Red Hat Summit and KubeCon EU 2026. Instructor on Coursera, Pluralsight & Udemy.

Get more insights like this

Practical AI infrastructure and platform engineering guides — delivered to your inbox.

Subscribe to Newsletter →