emas.ai
DecisionCore
by TechnoNet Sdn Bhd
Reference Scenario (illustrative)  ·  HR & Payroll SaaS  ·  Malaysia

Explaining payroll exceptions,
integrated in 4 hours.

In this scenario, a Malaysian HR and payroll SaaS platform, Prisma Data Sdn Bhd, integrates DecisionCore to explain AI-generated payroll exceptions — with a formal explanation record for every payment hold, per-purpose consent records and breach monitoring.

Illustrative scenario — Prisma Data Sdn Bhd is a fictional company, not a DecisionCore client. Figures and quotes show how the product works; they are not results from a real deployment.

Industry
HR & Payroll SaaS
Scale
1.2M records / month
Integration time
4 hours
DPO violations
0 in 6 months
Background

The company.

Prisma Data Sdn Bhd is a Malaysian HR and payroll SaaS platform serving over 200 enterprise clients across manufacturing, retail, and professional services. Their platform processes more than 1.2 million employee records per month — handling everything from statutory contributions and leave management to salary dispute resolution and payroll exception flagging.

Prisma Data introduced AI-assisted payroll exception flagging in early 2025. The system automatically identifies anomalies — unusual overtime claims, duplicate salary entries, suspected benefit manipulation — and flags them for HR review. When a flag results in a payment hold, the affected employee is notified that their payroll has been suspended pending investigation.

By mid-2025, Prisma Data was processing approximately 3,400 exception flags per month across their client base. Their legal team flagged an emerging problem: with Malaysia's AI governance direction and the PDPA in mind, each payment hold was treated as a Significant Decision — and the team decided that every affected employee should receive a formal explanation.

The challenge

3,400 decisions.
Zero explanations.

Before DecisionCore, Prisma Data had no mechanism to generate formal explanation records. When an employee disputed a payment hold, HR teams would manually reconstruct the reasoning from the exception log — a process that took 3–5 business days per dispute and relied on the availability of the analyst who originally reviewed the flag.

Three compounding problems made this unsustainable:

Governance exposure. Malaysia was moving towards AI governance legislation, with the National AI Office's AIGE principles already calling for transparency. Prisma Data's AI exception engine was a textbook Significant Decision system. Generating explanations retrospectively, on dispute, was not good enough — the explanation needed to exist at the point of the decision.

PDPA consent gaps. The PDPA Amendment Act 2024 requires granular, per-purpose consent for employee payroll data processing. Prisma Data's existing consent model was a single blanket clause buried in the employment contract. No per-purpose records. No withdrawal mechanism. No version tracking.

Breach notification risk. With 1.2 million employee records under active processing, a breach likely to cause significant harm would have to be notified to the PDP Commissioner within 72 hours. Prisma Data had no automated breach detection — their DPO was relying on ad hoc security alerts that averaged 96 hours from incident to awareness.

The solution

DecisionCore at the
point of every flag.

Prisma Data integrated DecisionCore into their exception flagging pipeline via the REST API. The integration was written in Python and added a single POST /explain call at the point each exception flag was raised and resulted in a payment hold action.

Week 1 — Day 1
API Integration
Prisma Data's backend team integrated the DecisionCore REST API into their exception pipeline. Total integration time: 4 hours. One POST /explain call per payment hold, with the exception type and rule criteria passed as subject_description. Explanation records returned as JSON and stored in the audit log.
Week 1 — Day 2
Sovereign Deployment
DecisionCore deployed on Prisma Data's own server — an on-premise node running the DeepSeek R1 reasoning model and BGE-M3 embedding model via Ollama. Employee payroll data never leaves Prisma Data's network. PDPA data sovereignty requirement met by architecture, not by contract.
Week 2
Consent Widget Rollout
Prisma Data embedded the DecisionCore granular consent widget in their employee self-service portal. Per-purpose consent replaced the blanket clause — separate toggles for payroll processing, exception flagging, and performance analytics. Existing employees prompted to re-consent on next login. 94% re-consent rate within 3 weeks.
Week 3
72-hr Breach Detection
DecisionCore's breach detection agent deployed, monitoring Prisma Data's application logs for anomalous access patterns and data exfiltration indicators. DPO notification workflow configured — automatic alert within 4 hours of detection, well within the 72-hour PDPA window. Legacy 96-hour detection gap eliminated.
Prisma Data integration — exception flag handler (Python)
import requests
from app.config import settings

def flag_payroll_exception(employee_id: str, exception_type: str,
                           rule_description: str, amount: float) -> dict:
    """Raise a payroll exception flag and generate a formal explanation."""

    # Generate explanation at point of decision
    response = requests.post(
        f"{settings.DC_BASE_URL}/explain",
        json={
            "decision": f"Payroll exception flagged: {exception_type}",
            "subject_description": (
                f"Employee {employee_id}. Rule triggered: {rule_description}. "
                f"Amount under review: RM {amount:,.2f}."
            ),
            "sector":    "hr",
            "tenant_id": "prisma-data",
        },
        headers={
            "Authorization": f"Bearer {settings.DC_API_KEY}",
            "Content-Type":  "application/json",
        },
        timeout=60,
    )
    response.raise_for_status()
    result = response.json()

    # Store audit_id alongside the exception record
    return {
        "exception_id": create_exception_record(employee_id, exception_type, amount),
        "audit_id":    result["audit_id"],
        "report_url":  result["report_url"],
    }
Results

Six months
after deployment.

In the scenario, after six months of operation, Prisma Data's DPO gives an assessment of the compliance posture across three dimensions: regulatory readiness, dispute resolution efficiency, and data incident response.

DPO breach violations
0
Illustrative outcome: no PDPA incidents over six months, and breach detection time reduced from 96 hours to under 4 hours. JPDP notification window never at risk.
Dispute resolution
95%
95% reduction in dispute resolution time. Average resolution from 3–5 business days to same-day — the explanation record is available the moment the employee receives the payment hold notice.
Consent coverage
98%
98% of active employees on granular per-purpose consent records within 6 weeks of rollout. Consent audit trail now includes version, timestamp, IP, and purpose ID for every record.
Before DecisionCore, every dispute was a manual archaeology project. We had to reconstruct the reasoning from logs, find the analyst who reviewed the flag, and produce something coherent — usually three days after the employee first complained. Now the explanation exists before the employee even opens the notification. Our dispute backlog dropped to zero in the first month.
Illustrative quote — Head of Compliance, Prisma Data Sdn Bhd (fictional)

An unexpected benefit emerged from having structured explanation data at scale: Prisma Data's compliance team identified three systematic rule calibration issues in their exception engine. The DeepSeek R1 reasoning chains consistently cited edge-case conditions that the original rules had not accounted for. Two rules were recalibrated, reducing false-positive exception flags by 18%.

Technical detail

Architecture
overview.

Prisma Data's DecisionCore deployment runs entirely within their private cloud — a single VM on their colocation node in Kuala Lumpur.

Inference
DeepSeek R1 via Ollama
Chain-of-thought reasoning model. Generates traceable explanation paths citing Employment Act 1955 and PDPA provisions. Full reasoning chain stored verbatim in the Sovereign Audit Log — not summarised, not truncated.
Embeddings
BGE-M3 via Ollama
1024-dim multilingual embedding model. Matches each exception description against Prisma Data's sovereign regulatory corpus — PDPA Act 709, PDPA Amendment 2024, Employment Act 1955, company HR policy documents — to identify the most applicable provisions.
Vector store
Qdrant (Docker)
Hybrid dense + sparse search across the regulatory corpus. Runs in Docker alongside the application — no external cloud dependency. Corpus updated quarterly as new regulations are published.
Audit log
PostgreSQL — append-only
Every explanation record written to an append-only PostgreSQL table. No UPDATE or DELETE on audit rows. 6-month audit trail available for JPDP inspection, Industrial Court proceedings, or internal compliance review.
Build your own
compliance pipeline.
Start with 3 free explanation reports. Integration guide and Python examples included. No credit card.
Get your free API key → Read the implementation guide →
WhatsApp us