Healthcare and life sciences (HLS) companies operate in a demanding industry where quality assurance (QA) and quality control (QC) failures can trigger investigations and corrective and preventive actions (CAPAs), cause batch losses and production delays, and necessitate field actions and recalls. A US Food and Drug Administration (FDA) 483 warning letter (Notice of Inspectional Observations) can cost a company $250K to $5M, depending on the complexity of required remediation and production scale. Significant issues can lead to costs 10X to 100X higher, including regulatory consequences, reputational harm, lost revenue, supply chain disruption, and more. As a result, HLS companies are motivated to improve their root cause analysis (RCA) processes, to identify anomalies and mitigate problems before they cascade quickly.
A $50 billion pharmaceutical and medical device company partnered with Tredence to develop a generative AI (GenAI)-powered RCA agent to automate and enhance the identification of root causes of operational, inventory, and supply chain anomalies. The solution translates natural-language business questions into data-driven insights, enabling faster, more accurate decision-making.
Tredence designed an innovative RCA platform leveraging a graph-based ontology and knowledge graph to uncover deep, multi-hop relationships across supply chain processes. This approach provided comprehensive visibility into operational inefficiencies, enabling the organization to optimize inventory levels, reduce losses, and improve overall supply chain efficiency.
Addressing Operational Challenges that Harmed the Business
The HLS leader operates a multi-cloud IT landscape across AWS, Azure, and GCP, with most of its data and analytics workloads running on Databricks on AWS.
Despite significant investments in supply chain and planning systems, the organization continued to face persistent operational challenges. Data remained siloed across planning, procurement, manufacturing, QA, logistics, and customer fulfillment, leading to forecast inaccuracies, inventory imbalances (out-of-stocks, excess, shortages), and shipment delays and supplier failures.
While the data was available in Databricks, teams struggled to connect events across systems and identify the root cause of inventory and supply chain anomalies.
Traditional relational databases (RDBMS) are optimized for transactional and highly structured data. Still, they are not well suited to multi-hop relationship traversal, which is critical for RCA in complex supply chain ecosystems, such as those in which HLS companies operate.
Developing a Knowledge Graph and GenAI-Based Root Cause Analysis Platform
The HLS company required an advanced RCA solution that would leverage existing Databricks data while enabling deep relationship analysis and explainability. The firm’s business requirements were to:
- Leverage data across suppliers, manufacturing, QA, and distribution to create a unified visibility and root cause diagnostics model
- Enable actionable inventory insights for operations and planning teams
- Support natural language queries and alert-driven workflows for faster decision-making
Tredence designed and implemented an innovative knowledge graph-driven, GenAI-powered RCA platform:
- Defining a domain ontology capturing entities and relationships across stock keeping units (SKU), suppliers, plants, QA, and distribution
- Implementing a knowledge graph to link multi-source inventory and supply chain data
- Deploying a GenAI-powered RCA engine capable of traversing the graph and explaining root causes using large-language models (LLMs)
- Building a conversational user interface (UI) enabling natural language queries and RCA workflows
- Enable event-driven alerting for inventory anomalies such as OOS, excess, and shortages
Defining Ontology
As a first step, Tredence collaborated closely with business subject matter experts (SMEs) to understand the questions the business needed answered. These questions served as the foundation for designing the ontology and graph structure and included:
- What is the current state of inventory across SKU locations?
- What is the recent inventory trend for brand group ABC—is it increasing or decreasing?
- What are the top reasons for the declining inventory trend for material X over the last four weeks?
- Which SKUs are experiencing OOS, excess, or shortage issues?
- What are the primary root causes behind existing inventory issues?
- What is the overall inventory health for top SKUs?
- Which SKUs faced OOS situations in the last X weeks, and why?
- Which SKUs were stocked out due to quality-related issues?
Based on these requirements, Tredence designed a comprehensive supply chain ontology that supports in-depth relationship analysis and actionable insights.
Implementing a Knowledge Graph
Once the ontology was finalized, Tredence implemented the knowledge graph using Neo4j, a leading graph database platform.
- The ontology was translated into a graph data model.
- Inventory and supply chain data were hydrated from Databricks into Neo4j using out-of-the-box Databricks–Neo4j connectors.
- Multi-source data across suppliers, plants, QA, and distribution was linked to enable end-to-end visibility.
This graph foundation enabled efficient traversal of the complex relationships required for RCA.
Developing GenAI-Powered Root Cause Analysis
On top of the knowledge graph, Tredence built a GenAI-driven, agent-based RCA layer to answer business questions in natural language and generate explainable insights.
The solution leveraged multiple specialized agents, including:
- Guardrail agents for query validation and governance
- Planner agents to determine the optimal analysis path
- Summary agents to generate human-readable explanations
These agents utilized tools such as Text-to-SQL and Text-to-Cypher to dynamically query Databricks and the knowledge graph, enabling accurate, contextual, and explainable RCA.
Creating a Conversational User Interface
Tredence built a composable, conversational UI to make the solution intuitive and business-friendly, using:
- ReactJS for the frontend
- NodeJS for the backend orchestration layer
- GenAI endpoints hosted on Databricks
- Secure infrastructure using AWS CloudFront, API Gateway, and IAM
Depending on the user’s natural-language query, agents intelligently routed requests to either Databricks data or the knowledge graph, ensuring efficient, relevant responses.
Enabling Alerts and Notifications
To support proactive decision-making, Tredence implemented automated alerts and notifications for supply chain anomalies.
- Combined rule-based detection with agent-driven analysis
- Triggered alerts for key scenarios such as OOS, excess inventory, and quality-driven stockouts
- Enabled near real-time awareness and faster corrective action
Solution Architecture for the Knowledge Graph and GenAI-Powered RCA Solution
Key Outcomes Delivered
The new solution:
- Delivers end-to-end visibility and traceability of inventory drivers across the supply chain
- Enables fast, explainable RCA for strategic decision-makers using natural language
- Reduces diagnostic time by ~60%, accelerating teams’ responses to anomalies
- Improves alignment across supply, manufacturing, QA, and distribution functions
- Achieves 60% faster root cause analysis of inventory anomalies
- Delivers explainable insights and aligns cross-functional actions
With its new RCA solution, the pharmaceutical company is well-positioned to improve processes across the product lifecycle continuously: reducing expensive equipment issues that create waste, aligning manufacturing with demand, and ensuring products reach customers in all the markets it serves.

AUTHOR - FOLLOW
Maulik Divakar Dixit
Senior Director, Data Engineering, <br>Databricks Champion<br>Databricks MVP
Next Topic
How a US Wellness Brand Is Leveraging Agentic Commerce to Win the Buyer’s Journey
Next Topic



