Artificial Intelligence

How Indegene is modernizing and scaling enterprise data quality in life sciences

This post is co-written with Shravan K S from Indegene Limited.

Enterprise AI is creating new opportunities for life sciences organizations to improve decision-making across commercial, medical, market access, and other business functions. But the quality of every AI model, dashboard, and business insight depends on one thing: trusted data. As enterprise data grows across multiple platforms, pipelines, and business domains, maintaining consistent data quality has become increasingly difficult. Manual data quality rule creation, fragmented governance, and evolving business definitions make it challenging to scale data quality across the enterprise.

This post explores how Indegene built a production-grade, large language model (LLM) powered Data Quality Agent within its NEXT Unified Data Platform (NEXT UDP) on AWS. The agent generates context-aware data quality rules, validates them, and produces ready-to-run SQL and Python code under centralized, human-in-the-loop governance. Together, these capabilities help organizations improve data quality at enterprise scale while reducing the effort required to build and maintain data quality programs.

About Indegene

Indegene Limited (BSE: 544172, NSE: INDGN) is the strategic operating partner to the life sciences industry, orchestrating commercial, medical, R&D, and safety operations across the product lifecycle. Trusted by the world’s top 20 biopharma companies, Indegene helps run complex, highly regulated workflows at global scale. Indegene combines deep life sciences expertise with AI-embedded platforms and governed operating models to improve speed, consistency, and compliance across mission-critical operations. By integrating technology into how work is executed and scaled, Indegene helps life sciences organizations deliver measurable outcomes in regulated environments.

Why conventional data quality programs break down

Most organizations have established data quality processes but keeping them effective is becoming increasingly difficult as enterprise data ecosystems evolve.

One of the biggest challenges is the divide between technical and business rule ownership. Data engineers typically define technical rules that confirm whether data is structurally correct. For example, verifying that an HCP ID (Healthcare Professional ID) isn’t null, follows the required format, is unique, and maps to a valid reference record. Business teams define rules that determine whether the data makes sense in its operational context. For example, confirming that product market share totals 100 percent within a territory or that an HCP’s prescription activity aligns with their specialty and eligibility criteria. Because technical rules are often maintained in code while business rules reside in glossaries, SOPs, and subject-matter expertise, keeping them aligned and consistently governed across datasets and platforms becomes difficult.

Traditional validation techniques also have inherent limitations. Checks for null values, data types, uniqueness, or referential integrity remain essential, but they can’t capture business-specific context. Validating product hierarchies, customer segmentation, territory alignment, or commercial business rules requires domain knowledge that static validation logic can’t easily represent.

Creating and maintaining data quality rules is equally demanding. Every new dataset requires data profiling, rule definition, SQL development, validation, and ongoing maintenance. These rules are often spread across SQL scripts, pipeline code, spreadsheets, data catalogs, and tool-specific configurations. As schemas, business definitions, or validation thresholds change, the effort required to update and govern these rules grows significantly.

Additionally, the operational impact is significant. Onboarding new datasets becomes slower because many activities are repeated manually. Maintaining quality rules across hundreds of datasets consumes valuable engineering effort. Business users lose confidence when validation rules are difficult to understand, trace, or relate to business context.

As a result, data quality often becomes a periodic governance activity rather than a continuous, scalable capability.

Rethinking data quality with generative AI

Traditional data quality tools often operate as standalone capabilities, disconnected from the broader enterprise data ecosystem. As organizations scale AI and analytics, data quality needs to be embedded within the data platform itself, where governance, metadata, lineage, and analytics work together.

Indegene addresses this through the NEXT Unified Data Platform (NEXT UDP), a modern, AI-driven data platform built specifically for life sciences. NEXT UDP brings together fragmented commercial, medical, clinical, and enterprise data into a single, governed environment so organizations can manage the complete data lifecycle from ingestion to analytics. NEXT UDP provides several standalone AI agents, such as the Data Ingestion agent, Data Quality agent, Orchestration agent, Data Catalog agent, and SQL Bot Generator agent. You can use them standalone within your data pipelines or customize them further for agent-to-agent communication.

By integrating data ingestion, transformation, data quality, governance, metadata management, and analytics within a unified platform, NEXT UDP helps organizations:

  • Consolidate fragmented enterprise data into a trusted source of truth.
  • Standardize data quality and governance across business domains.
  • Improve metadata visibility, lineage, and traceability.
  • Reduce manual effort across data engineering workflows.
  • Deliver trusted, AI-ready data for enterprise analytics and decision-making.
NEXT Unified Data Platform dashboard showing use-case cards, project metrics, and available AI agents including the Data Quality agent.

Figure 1: NEXT Unified Data Platform dashboard with use cases and AI agents

NEXT UDP technical architecture on AWS organized into connector, data foundation, unified semantic intelligence, AI foundation, and experience layers.

Figure 2: NEXT UDP technical architecture on AWS

Indegene’s life sciences clients needed an agent that could run reliably in production and meet strict governance requirements, while giving the team flexibility in how they build it. Within NEXT UDP, Generative AI powers an intelligent Data Quality Agent that augments existing data quality processes. The agent boosts data engineer and data steward productivity by accelerating rule creation, simplifying validation, and helping maintain consistent governance at enterprise scale.

Indegene built the Data Quality Agent on a set of AWS services, with Amazon Bedrock, Strands Agents and Amazon Bedrock AgentCore at its core. Amazon Bedrock, provides a choice of foundation models (FMs), built on a foundation of security, privacy, and responsible AI controls. For life sciences organizations, this matters because their data often includes sensitive healthcare professional and patient information. Strands Agents streamlines building and updating the agent, and its evaluation tools help Indegene test rule accuracy, which is critical in regulated life sciences environments. The agent runs on Amazon Bedrock AgentCore, a platform to build, connect, and optimize agents at scale, with any framework or model. The solution also inherits existing AWS security and audit controls, so Indegene can focus on data quality logic instead of agent infrastructure.

What makes the Data Quality Agent unique? Two knowledge bases that power context-aware data quality

Any data quality tool can check for null values, duplicates, or invalid data types. Services such as AWS Glue Data Quality, a capability of AWS Glue, already recommend rules like these from data statistics, and they remain a strong foundation. The harder problem is determining whether the data makes sense for its business purpose. To address this, the Data Quality Agent uses two complementary knowledge bases that combine curated domain knowledge with experience gained from governed usage.

The first is an Internal Enterprise knowledge base: It combines internal business glossaries, data dictionaries, SOPs, regulatory guidance, approved data quality rules, validated scripts, profiling results, historical anomalies, and subject matter expert (SME) feedback. Content is ingested, vectorized, and retrieved through Retrieval Augmented Generation (RAG) to generate data quality rules grounded in enterprise standards and proven outcomes.

The second is an External Reference knowledge base: It’s built and periodically updated using approved standardized data quality frameworks, web search, and controlled web-scraping. When a dataset is selected, the agent analyzes table and column metadata and retrieves relevant data quality standards, reference values, and validation best practices from trusted sources. For example, for an NPI (National Provider Identifier) column, it can identify applicable quality standards, recommend format (the required 10-digit numeric format) and perform reference-validation checks.

How it works

Process flow for the Data Quality Agent: select a data source, profile data, detect anomalies, generate and review rules, and centralize rule management.

Figure 3: Data Quality Agent process flow

The Data Quality Agent takes users from data profiling to rule creation and governance in a single workflow:

  1. Select source: Connect to a supported source such as Amazon Redshift or Snowflake.
  2. Select database and schema: Browse the available tables, with the rule count and active rule status for each.
  3. Profile data: The solution computes quality metrics and column patterns for the table, which users review.
  4. Detect anomalies: The solution flags anomalies against historical baselines, and users review the total, critical, and warning issues and the affected records.
  5. Manage rules: Review a table’s existing rules or start creating new ones.
  6. Choose rule mode: Pick Column Level, Table Level, or Custom Query.
  7. Generate rule suggestions: The agent uses metadata, profiling results, anomalies, existing rules, and knowledge base context to recommend technical and business rules, each with a severity.
  8. Review, refine and apply: Users edit or approve each recommendation.
  9. Generate and validate code: The agent produces SQL and Python for approved rules, and a validation step checks them.
  10. Store in the central rule repository: Approved rules become available for execution, monitoring, and audit.

Solution architecture of the generative AI-powered Data Quality Agent on AWS

The following diagram shows the end-to-end architecture of the Data Quality Agent on the NEXT UDP platform, from the data steward request to rule execution.

End-to-end architecture of the Data Quality Agent on NEXT UDP, from the data steward request through profiling, Bedrock AgentCore rule generation, human review, and rule execution.

Figure 4: Solution architecture of the Data Quality Agent on NEXT UDP

Data stewards and data quality analysts call the solution from the Indegene application. The following table provides a walkthrough of the solution pipeline and lists the AWS services used for each layer. It also captures other options the solution supports, so you can adapt it to your data volumes, existing tools, and operational preferences.

Layer AWS / platform services Also supported Role
API and access AWS WAF, Amazon API Gateway, Amazon Cognito – Data stewards and data quality analysts call the solution through Amazon API Gateway. AWS WAF filters requests before they reach the API, and Amazon Cognito authenticates users with OAuth 2.0 and validates the JWT on each request.
Data source layer Amazon Redshift Snowflake connector, Amazon Simple Storage Service (Amazon S3), JDBC/ODBC sources Provides structured and semi-structured data for data quality profiling and rule execution.
Metadata catalog layer AWS Glue Data Catalog AWS Glue crawlers for automatic schema discovery Captures databases, schemas, tables, columns, data types, and rule coverage.
Profiling and anomaly detection layer AWS Lambda (Python), with results stored in Amazon DynamoDB AWS Glue jobs, Amazon Athena, Amazon Redshift SQL

Column statistics, such as null rates, distinct counts, data type conformance, patterns, value ranges and table-level signals are computed by a Python-based profiling process on AWS Lambda,

The same Lambda performs anomaly detection using statistical comparison against historical baselines to flag unexpected shifts, such as a null-rate spike or a cardinality change.

Knowledge/RAG layer Amazon Bedrock Knowledge Base with Amazon Aurora PostgreSQL (pgvector) and S3 for storing knowledge documents exposed as tools through AgentCore Gateway, a capability of Amazon Bedrock AgentCore Amazon OpenSearch Serverless for vector store, Amazon S3 Vectors, a capability of Amazon S3 Retrieves from the Amazon Bedrock Knowledge Bases (external reference standards and internal enterprise knowledge). AgentCore Gateway connects the agent to its knowledge bases as tools.
LLM intelligence layer Strands Agents on AgentCore runtime, a capability of Amazon Bedrock AgentCore, Claude Sonnet 4.5 on Amazon Bedrock, Amazon Bedrock Guardrails, AgentCore memory Other foundation models available in Amazon Bedrock Generates data quality rules and uses the assembled context and few-shot prompting to recommend both technical checks (completeness, format, uniqueness) and pharma-specific business rules. Amazon Bedrock provides a choice of FMs to generate rules. AgentCore runtime provides a managed, session-isolated environment, AgentCore memory retains reviewer feedback to improve future recommendations.
Orchestration and human review layer AWS Step Functions, AWS Lambda, Amazon Simple Queue Service (Amazon SQS), Amazon Simple Notification Service (Amazon SNS), Amazon EventBridge – Coordinates profiling, LLM calls, rule generation, rule execution, status updates, and human review.
Rule metadata repository Amazon DynamoDB Amazon Aurora / Amazon Relational Database Service (Amazon RDS) Stores rule ID, name, type, column, status, author, created date, severity, and version details.
Code generation, validation and storage Amazon Bedrock – Claude Sonnet 4.5 and AgentCore Code Interpreter, a capability of Amazon Bedrock AgentCore, with approved scripts store in Amazon S3 – Generates Python / SQL code and checks before storage
Execution layer AWS Lambda AWS Glue jobs, Amazon Athena, Amazon Redshift SQL Runs data quality checks and writes violation counts and detailed anomalies.
Monitoring and dashboard layer Amazon CloudWatch, AgentCore Observability, a capability of Amazon Bedrock AgentCore or application UI Amazon Quick, Amazon OpenSearch Dashboards Data quality dashboard displays the rules applied and their status, along with total anomalies, critical anomalies, checks run, and issue details.
Security and governance AWS Identity and Access Management (AWS IAM), AWS Key Management Service (AWS KMS), AWS Secrets Manager, AWS CloudTrail, AWS Config, Amazon GuardDuty, AWS Security Hub, Amazon Inspector, virtual private cloud (VPC) endpoints – Authentication, encryption, secrets, audit, and threat detection

How the Data Quality Agent builds context

Before recommending any validation rule, the Data Quality Agent assembles context from six distinct sources, each answering a different question about the data:

Context Source What it provides Question it answers
Table/Column Metadata (Catalog) Schema, data types from the Data Catalog What is this data?
Data Profile Column-level statistics computed from the actual data, such as null rates, distinct counts, value ranges, frequent values and detected patterns What does the data look like right now?
Anomaly Detection Results Unexpected changes flagged by comparing the latest profile with historical baselines, such as a sudden rise in nulls, a change in distinct values, or out-of-range values What has changed or looks wrong?
Existing Active Data Quality Rules Rules already applied at the table or column level, retrieved from the rule repository What rules already exist, so we don’t duplicate or conflict?
External Reference Knowledge Base Universal, publicly established data quality standards and validation best practices (for example, format and structural rules for identifiers like the National Provider Identifier) What are the industry standards for this field?
Internal Enterprise Knowledge Base Organization-specific data quality rule patterns, prior reviewer feedback, and curated business/technical rule libraries How does this organization define quality?

Together, these sources let the agent reason like an experienced data steward. Grounding every recommendation in what the data is, what the standards require, how the enterprise defines quality, and what has already been implemented.

What the solution does

The Data Quality Agent generates several categories of checks and keeps data stewards in control of the results.

Anomaly checks generation

The solution generates anomaly checks that catch values which are technically valid but don’t match how a pharmaceutical market behaves. These include negative switch percentages, market shares that don’t add up to 100 percent within a market, inconsistent drug rankings (for example, a drug ranked first with a lower share than the drug ranked second), rating values outside the defined scale, and panel sizes that are too small or don’t match the number of respondents.

Context-aware rule generation with RAG

The Data Quality Agent generates rule recommendations in three modes:

Rule Type Description
Column Level Generates data quality rules for a specific, individual column selected by the user. The agent reads that column’s metadata and profiling signals to suggest checks such as data type validation, null and mandatory-field checks, length and range validation, pattern/format validation, and uniqueness.
Table Level Generates data quality rules for the table as a whole, driven by the table’s metadata and relationships across its columns. This covers record consistency, duplicate detection, cross-column validation, referential integrity checks, and table-wide business consistency.
Custom Query Generates SQL-based rules from natural language input. The user describes the business validation in plain English and the agent produces the corresponding SQL, which can then be refined conversationally or edited directly to support complex validations that fall outside standard column and table checks.

The Create New Quality Rule interface provides dedicated Column Level, Table Level, and Custom Query modes.

The platform supports both technical validation and business-specific quality checks.

For technical rules, the agent generates checks that confirm the data is structurally sound. These include null checks for mandatory fields, data type validation, range validation for numeric and date values, pattern validation for formatted fields such as identifiers and codes, duplicate detection, and referential integrity checks between related tables.

For business rules, the agent generates life sciences checks that confirm the data is consistent with how the business operates. These include account affiliation consistency (for example, a healthcare provider linked to the correct organization), segmentation logic, eligibility criteria, and market share and product share validation (for example, shares within a territory not exceeding 100%).

Real use-case example

Consider an HCP Product Performance table with the columns HCP_ID, Specialty, Territory_ID, Product_ID, Prescription_Volume, Market_Share_Pct, Switch_Pct, Rating_Scale, and Reporting_Month. Using the table profile and the two Knowledge Bases, this is how the Data Quality Agent generates and performs the following checks:

  1. Anomaly checks performed.
    • Negative switch percentage.
    • Market share total mismatch.
    • Sudden increase or decrease in prescription volume.
    • Inconsistent product rankings.
    • Invalid rating-scale values.
  2. Technical rules generated.
    • HCP_ID must not be null or duplicated.
    • Prescription_Volume must be numeric and non-negative.
    • Market_Share_Pct and Switch_Pct must be between 0 and 100.
    • Reporting_Month must follow the required date format.
    • Territory_ID and Product_ID must match their reference tables.
  3. Business rules generated.
    • Market share across all products must total 100 percent for each territory and reporting month.
    • The HCP’s product eligibility must align with their specialty.
    • Only eligible HCPs can be included in the target segment.

AI-assisted severity recommendation

The solution recommends severity based on dataset context, rule type, and business impact. Severity categories help distinguish between:

  • Critical issues, such as invalid commercial metrics, incorrect identifiers, or business rule violations.
  • Basic validations, including schema conformance, null checks, and length validation.
  • Complex validations involving advanced SQL logic, multi-column rules, or domain-specific business checks.
  • Information: Validation conducted for awareness and transparency purposes only. No action is required unless concerns are identified.

SQL/Python code generation and ETL integration

After a rule is approved, the LLM generates the equivalent SQL, Python, and PySpark code. Before it’s stored, the code is validated automatically with syntax checks, a check against the target schema, and a test run on sample data where the language supports it. This means existing extract, transform, and load (ETL) and orchestration tools can run them as part of the current data pipelines.

AI-assisted validation

Using an LLM as a Validation Agent to review data quality (DQ) rules/scripts generated by another LLM for reducing hallucinations and improving governance. Further, Amazon Bedrock provides security, privacy, and responsible AI controls. Prompts and outputs aren’t used to train the models or shared with model providers. Amazon Bedrock is HIPAA eligible and in scope for compliance programs such as SOC, ISO and GDPR, which helps Indegene meet the requirements of its life sciences clients. Amazon Bedrock Guardrails adds configurable safeguards on model inputs and outputs. It detects and masks personally identifiable information (PII), blocks harmful content and prompt injection attacks, and uses contextual grounding checks to flag responses that aren’t supported by the retrieved knowledge.

Human oversight remains central

The Data Quality Agent is designed to augment existing data quality processes. Each generated rule receives a confidence score. Only high-confidence, low-risk rules are approved automatically, while critical and business rules always go to an SME for review. Every decision is recorded in the rule repository, so rule management stays governed, traceable, and aligned with enterprise standards.

Delivering operational impact and business value

In production, across Indegene’s deployments of NEXT UDP for life sciences clients, the Data Quality Agent has reduced the effort to define and implement data quality rules from about 30 hours to about 4 hours per dataset. That’s roughly 85 percent less effort, or about 7x higher productivity. Onboarding a new table now takes 2–4 hours instead of 2–5 working days. Data engineers and data stewards now spend their time reviewing and approving rules rather than writing them from scratch.

Key outcomes include:

  • Less manual effort through AI-generated rules, SQL, and Python.
  • Faster onboarding of new tables, schemas, and business domains.
  • More consistent rules, grounded in approved standards, enterprise knowledge, and existing rules.
  • Better collaboration between business and technical teams through the review, refine, and approve workflow.
  • Earlier detection of data quality issues through automated profiling and anomaly detection.

Table 1: Performance and Scale

Metric Impact*
Enterprise profiling 25–50 schemas; 500–2,000 tables; 10,000–50,000 columns
Table profiling 45–90 sec (~1M rows); 2–5 min (~10M rows)
AI rule generation 20–45 sec per table
SQL generation 3–8 sec per rule; 20–60 sec for 10–15 rules
Rule execution 20–30 sec (standard); 1–3 min (complex SQL)
Central rule repository 1,000–10,000 rules
DQ checks per execution 100–500 per domain. Scalable to 1,000+

*Estimated from Indegene’s production deployments

Table 2: Rule quality and validation

Metric Impact* What does it mean
Rule suggestion accuracy 80–90% Suggestions that are technically valid and apply correctly to the column or table
Rule acceptance rate 60–75% Suggestions approved without any changes
Rule refinement rate / Human Override Rate 20–35% Suggestions approved after the reviewer edited logic or thresholds
SQL validity 90–97% (schema-grounded); 80–90% (custom SQL) Generated SQL that passes validation on the first attempt
Severity recommendation accuracy 75–85% Recommended severity matching the reviewer’s final severity
Business relevance (SME rating) 4.0–4.5 / 5 SME rating of how useful the recommended rules are to the business
Hallucination rate <5–8% Suggestions that reference non-existent columns or incorrect business logic

*Estimated from Indegene’s production deployments

Table 3: Operational efficiency

Metric Impact*
Manual SQL rule authoring 60–80% reduction in end-to-end effort, including review and refinement
New table onboarding 2–5 working days → 2–4 hours
Rule reuse 40–60% of new rules adapted from existing approved rules
LLM cost optimization Up to 90% lower input-token cost on cached context with Amazon Bedrock prompt caching
Compute optimization ~45–51% reduction with metadata-first profiling

*Estimated from Indegene’s production deployments

Table 4: Manual compared to agent-assisted data quality

Activity Traditional DQ Approach Generative AI-powered DQ approach Impact*
Rule Discovery Manual review of schemas, profiling reports, sample data, and documentation. Existing tools can generate basic profiling checks but often miss domain-specific business logic Agent uses metadata, profiling results, table context, existing rule patterns, and optional business descriptions to recommend technical and life sciences-specific data quality rules 80-85% faster
Technical Rule Generation Manual creation of null, data type, range, uniqueness, and integrity rules Automated rule generation with human review 80-85% faster
Business Rule Definition Validation is often based on technical metadata with limited understanding of product, segment, customer, or eligibility logic. Business context depends heavily on SME discussions and manual translation into validation logic Uses RAG to retrieve business glossaries, data dictionaries, existing rules, and historical anomaly patterns to generate context-aware recommendations. 70-75% faster
Rules authoring and SQL/Python Development Engineers manually define validation rules and perform coding, debugging, and testing for each dataset or business requirement. Auto-generated rules at the Column Level, Table Level, and Custom Query levels, and generate SQL/Python for the selected DQ checks. Users can review, refine, and apply the recommendations. 80-85% faster to first working code
Rule Validation Rules are validated manually, involving multiple iterations of executing the queries and refining Agent scores, refines, and optimizes rules automatically 80-85% faster
Rule Reuse Manual copy, modify, and reuse Approved rules and feedback added to the agent’s knowledge 50% faster onboarding for new datasets in an existing domain
Anomaly Detection Manual analysis of profiling outputs and records Automated anomaly detection with business-context explanations 80-85% faster
Severity classification Rule severity and business impact are determined manually, which can lead to inconsistent prioritization. Recommends severity based on rule type, dataset context, and business impact. Consistent, context-based severity
Governance & Traceability Rules are often distributed across tools, scripts, spreadsheets, or catalogs, making governance and traceability difficult. Approval and review workflows vary across teams. Central, versioned rule repository with ownership 85% reduction in maintenance effort
Human Effort SMEs and engineers drive every step SMEs focus on review and approval. The agent handles discovery and generation Higher productivity & scalability, ~7x productivity

*Estimated from Indegene’s production deployments

Looking ahead

As enterprise data ecosystems continue to grow, maintaining consistent and scalable data quality becomes increasingly difficult using manual rule creation and fragmented governance processes. Generative AI provides an opportunity to augment these workflows by accelerating rule generation, incorporating business context, and supporting governed decision-making.

The generative AI-powered Data Quality Agent within the NEXT Unified Data Platform demonstrates how large language models, RAG, and centralized rule governance can work together to simplify data quality management while keeping humans in control of review and approval. Future enhancements will continue to build on this foundation, including:

  • AI-assisted remediation recommendations to help users resolve failed data quality checks.
  • Root cause analysis to identify recurring anomaly patterns and support faster investigation of repeated data quality issues.

As these capabilities evolve, the focus remains the same: helping organizations improve data quality through AI-assisted automation while maintaining governance, transparency, and business oversight.

To learn more, refer to the following resources:

 


About the authors

Bhagyashree Chandak

Bhagyashree Chandak

Bhagyashree is a Solutions Architect at AWS India who turns complex business challenges into practical, production-ready solutions. She works closely with customers to understand their goals and requirements, then designs innovative architectures shaped by real-world implementation experience. She specializes in migration and modernization, data and analytics, and generative AI, helping organizations modernize their platforms and put their data and AI to work for measurable business outcomes.

Shravan K S

Shravan K S

Shravan is a Senior Manager–Data Analytics at Indegene and an experienced GenAI Architect with 18+ years in analytics, data platforms, and system integration across life sciences and healthcare. He has led the delivery of secure, scalable solutions in Generative AI, data engineering, platform modernization, and emerging Agentic AI systems. Skilled in driving transformation through SAFe Agile, he advances innovation via cloud-native architectures and AI-driven data operations. He holds advanced certifications from AWS, Snowflake, Databricks and Dataiku, and combines cutting-edge technologies with real-world impact in pharma and healthcare analytics.