Fragmented metric definitions, the same figure calculated differently across teams and tools, don't just erode leadership confidence, they cause GenAI models to hallucinate. This post makes the case for pairing dbt's data engineering discipline with a centralised Semantic Layer, explaining how a hub-and-spoke architecture ensures every dashboard, LLM and Decision Intelligence system draws on the exact same governed metric definitions, and why that combination is the essential foundation for trustworthy AI.
The Essential Foundation: Why Your AI is Only as Good as Your Metrics Definitions
The time of merely observing your data through dashboards is over. Today, the Chief Data Officer’s (CDO) greatest challenge is converting the massive volumes of available data into reliable, trusted real-time insights that can power autonomous decisions and trustworthy Generative AI (GenAI) applications.
This ambition is frequently blocked, not from a lack of data, but by a crisis of inconsistency at multiple levels. When you have different teams calculating the same metric, say “Active User Count”, using three subtly different business definitions, the resulting reports conflict, confidence is eroded and your AI models hallucinate the answer.
Schrödinger’s Metric, different teams show differing values, that are simultaneously correct and incorrect. It is only when a stakeholder opens the box – examines exactly how a metric was calculated – that the conflict becomes visible.
The solution is an architecture built on a single source of truth. This means a single source of truth not just for the data itself, but for the business language used to describe it. This requires the combination of auditable and transparent tooling like dbt (data build tool), which engineers the data transformation, and a Semantic Layer, which centralises and governs the business logic. Together, they form the solid foundation on which to build any AI-ready data platform.
The Trust Crisis: Why Fragmented Metrics Fail Enterprise AI
In traditional, fragmented data stacks, business logic is replicated across many different tools and at different layers within those tools: embedded in SQL queries, hard-coded in Business Intelligence (BI) tools or hastily defined in spreadsheets that have somehow become load-bearing parts of how the entire business operates. The proliferation of this logic is highly inefficient and creates dangerous levels of risk. When your business logic lives everywhere, it belongs to no one.
- Inconsistent Definitions: One team might define “Monthly Recurring Revenue” net of cancellations; another might include gross bookings. This leads to conflicting reports that undermine C-suite confidence in either value.
- Slow Time-to-Insight: Every time a new reporting requirement or a new tool is introduced, data analysts must laboriously rewrite any metric logic, wasting valuable time and blocking innovation.
- Erosion of AI Trust: Generative AI tools and Large Language Models (LLMs) are only as trustworthy as the data they are grounded in. If the underlying metrics are inconsistent, the AI’s recommendations become equally inconsistent, leading to business errors and a loss of faith in the technology.
This problem is solved by establishing a Semantic Layer, no longer just a modelling tool, but the critical layer for trust, governance, and scale in the age of GenAI.
dbt: Engineering the Data Foundation for Reusable Logic
Before metrics can be governed, the raw data must be transformed into clean, reliable data assets. This is the specialised role of dbt, which provides the modern data platform with crucial engineering discipline.
dbt is the foundational tool for modern analytics engineering. It allows data teams to:
- Build Data Models: Data engineers use dbt to define data transformations using modular SQL, ensuring that data is consistently collected, cleaned, and prepared. This allows teams to create reliable and scalable data pipelines, which are essential for high-performance AI initiatives.
- Enforce Consistency in Transformation: dbt standardises the data transformation process, enabling teams to build logic on top of a reliable, up-to-date base. This reduces the organisational risk associated with data quality issues.
- Support Domain Autonomy: In architectures adopting Data Mesh principles, dbt is instrumental in enabling domain-oriented teams to “own” their specific data products. This decentralisation of responsibility, coupled with standardized transformation, increases scalability and data quality at the source.
dbt can also become the creator and maintainer of the Semantic Layer database objects for your given data platform, through its use of trusted packages or by the team’s creation of custom materialisations. This tight integration of transformation and governance is what makes this combination so powerful.
By using dbt, organisations ensure that the core data assets used for insight generation are reliable, tested, and traceable, providing the perfect input for the governance layer above it.
The Semantic Layer: The Hub for Governed Metrics
The Semantic Layer acts as the crucial architectural bridge. It takes the clean, structured data produced by dbt models and adds the necessary business context required for consumption by LLMs, GenAI and BI/Visualisation tools.
The Semantic Layer provides a “hub-and-spoke” architecture for metrics:
The Hub (Centralised Governance)
This is where analysts define metrics once, in code, right alongside their dbt models. This centralised repository governs all core business metrics, such as “Average Order Value” or “Customer Lifetime Value.”
- Ensuring Consistency: It ensures that every user, every report, and every tool is using the exact same definition, eliminating the metric ambiguity that causes internal conflicts.
- Simplifying Access: By centralising the logic and definitions, it simplifies data access for non-technical users, allowing them to query business concepts rather than complex database table structures.
The Spokes (Universal Consumption)
The Semantic Layer automatically generates the complex SQL queries and joins required to calculate the requested metric, regardless of the physical endpoint. The output is then available across a variety of spokes:
- BI Tools: Traditional dashboarding.
- Advanced Analytics: Consumption by data science models and Decision Intelligence platforms.
- LLMs and GenAI: Providing a consistent, governed language interface for conversational insights.
This architecture means that a change to a single metric definition in the “hub” is instantly and consistently reflected across all connected “spokes,” dramatically reducing time-to-insight and reducing the risk of errors.
The AI Readiness Imperative: Grounding GenAI in Fact
For enterprise GenAI to move from a risky toy to a reliable asset, it must be grounded in fact. The Semantic Layer is critical to this transformation:
Trustworthy Retrieval-Augmented Generation (RAG)
RAG is often framed, narrowly, as document retrieval – surface relevant text chunks, summarise them, return an answer. But the pattern is identical when a natural language question is matched against a semantic layer: the query is embedded, relevant definitions and metrics are retrieved, and the model generates a grounded response. The knowledge base is structured rather than unstructured, but the retrieval-augmented generation mechanics are the same. Whether the source is a PDF or a governed metric definition, natural language goes in and a contextually grounded answers comes out.
GenAI models can “hallucinate”, generating inaccurate or non-factual information. When LLMs are used for analytics, this often stems from confusion over metric definitions or fragmented data.
- Mitigating Hallucination: The Semantic Layer provides the grounding required for trustworthy RAG. By feeding the LLM only metrics and definitions that have been formally governed and centralised, the organisation ensures the AI’s response is consistent with the accepted version of the truth.
- Enabling Decision Intelligence (DI): Decision Intelligence platforms rely on clean, consistent inputs to automate decisions. The Semantic Layer feeds DI systems with governed metrics, ensuring that autonomous actions (e.g., dynamic pricing, fraud flagging) are based on the correct, auditable business logic.
Architectural Synergy: Vector Databases and Governance
The Semantic Layer also works in combination with the Vector Database. The specialised infrastructure required for GenAI. While the Vector Database stores the semantic meaning of raw documents for contextual search, the Semantic Layer governs the semantic rules and definitions of the business. Both are required for comprehensive AI readiness.
Conclusion: The Mandate for Modernisation
The journey from passive dashboards to proactive, autonomous decisions requires more than just cloud migration; it demands architectural discipline. The combination of dbt providing the robust data foundation and the Semantic Layer imposing consistency and governance is the essential blueprint to drive this modernisation.
By making this architectural commitment, organisations can:
- Future-Proof Investments: Ensure that every new BI tool, LLM integration, or Decision Intelligence platform relies on the same, high-quality logic.
- Scale Trust: Provide every employee with immediate, trustworthy answers, removing the reliance on a small, centralised team of analysts.
- Accelerate ROI: Move quickly from defining a metric to deploying it in automated systems, turning data into confident, strategic execution.
Your next step is to audit your metric definitions. Stop letting inconsistent reports erode trust and start building the singular, governed source of truth required for the AI era.
If you need some help with this, then get in touch! Book a free, no-pressure strategy session with one of our senior consultants. We’ll talk through where you are, what’s blocking progress, and what a practical path forward could look like.