Kayden Pellegrini

Kayden Pellegrini

Data Engineer | AI Systems Developer

I build the data layer and the AI layer that business operations run on. Pipelines and models that produce a number people can stand behind, and LLM tooling connected to the systems those numbers come from.

Data EngineeringPower Platform and BIAI SystemsIntegration and Hardware

Italian and South African citizen. Full EU work authorisation, no sponsorship required.

CI_CHECKINGChecking serial-margin-dbt on GitHub Actions

What I do

I own the operational data layer at a medical device distributor, end to end: the Dataverse model, the Sage integration, the Power BI reporting and the Power Apps the warehouse runs on. Most of the hard work is getting a number to survive being checked, so cost is rebuilt per serialised unit and a figure that stops reconciling fails the build before it reaches a report. On top of that data I have shipped LLM tooling through Model Context Protocol, along with the rules for what it is allowed to claim.

Case studies

Data engineering

Margin at the grain of the unit

Built at Virtumed. The method is described here. The public version of the same technique runs on synthetic data.

The problem

The business could not say what it actually made on a product. Margin was being worked out from list price and valuation figures, and neither of those is what anything cost.

Stock bought abroad arrives on a purchase order in a foreign currency, shares the freight, customs and bank charges of the shipment it came in on, and is sold one numbered unit at a time. A list price captures none of that.

What I built

Landed cost rebuilt at the grain of the individual serialised unit. Each unit takes its cost from the supplier price at the exchange rate actually paid on that transaction, plus its share of the freight, customs and bank charges on its shipment.

Every inventory record traces back to the purchase order line that paid for it, so any margin figure can be followed to its source. The logic runs through a mix of Dataverse and dbt models, with tests written to fail the build when a number stops reconciling. A figure that cannot be defended stops there instead of reaching a report.

What changed

Margin by product is measured against real cost rather than list price or valuation figures, and any figure can be followed back to the transactions that produced it.

tests/assert_no_fanout_on_serial_join.sqllines 8 to 15, commit 0f8f395
with fact as (    select count(*) as row_count, count(distinct serial_number) as serial_count    from {{ ref('fct_serial_margin') }}) select *from factwhere row_count <> serial_count
A test from the public version. A join that fans out duplicates units and inflates every total built on it, so the build fails if the row count and the distinct serial count ever differ.View these lines on GitHub

Hardware to report

RFID stocktake across three provinces

Built at Virtumed. No screens from the real system are shown. The Build Lab has a reconstruction on synthetic data.

The problem

Stock was counted by hand across three provinces. Counts were slow and hard to trust, and when one finished there was no clean way to separate what had been confirmed from what was missing and what had turned up where it was not expected.

What I built

Handheld RFID scanners feeding Power Apps and Dataverse, with Power Automate producing HTML and printable reports at the end of each count.

The off-the-shelf capture path was too slow, so I wrote a native iOS app in Swift that decodes SGTIN-96 EPC tags and GS1 barcodes over Bluetooth Low Energy and passes serials straight into the stocktake app. Reconciliation is part of the count itself rather than a job for afterwards.

What changed

A 30 item scan went from minutes to under 15 seconds. Every count reconciles confirmed, missing and unexpected stock in one pass, across all three provinces.

AI systems

Not taking AI output at its word

Built at Virtumed. The public audit skills use the same verification architecture.

The problem

AI-generated changes to a real system cannot be taken at face value. A model will report a fix it did not make, rename something and call it a security improvement, or claim a control exists because the word appears in a comment. "It says it fixed it" is not evidence.

What I built

A multi-agent verification framework. Independent passes review and then confirm each change, and the confirming pass never sees the reasoning of the reviewing pass. An adjudication pass then checks every claimed change against the actual result and classifies it as verified, overclaimed, hallucinated, cosmetic or a regression.

The LLM tooling itself reaches Dataverse, Power Apps and Microsoft 365 through Model Context Protocol, so analysis runs against the live systems instead of a pasted extract.

Around it sit the standards I set for AI-assisted analysis on live systems: one source of truth per data domain, confidence labelling, read-only scoping, human confirmation before anything destructive runs, no merging of records that have not been verified, and no margin calculated from a placeholder cost.

What changed

A repeatable way to trust or reject AI output on production systems, decided by what actually changed rather than by what the model says changed.

Selected work

Public repositories on synthetic data, so every claim made about them can be checked against the code.

serial-margin-dbt

Serial level margin and purchase reconciliation

Gross margin rebuilt per serialised unit, from purchase order to invoice, on synthetic data. Nine data defects are planted on purpose, each one either handled by a model or caught by a test. Runs on DuckDB with no warehouse account, and CI runs the build on every push.

tests/assert_credit_notes_are_netted.sqllines 5 to 12, commit 0f8f395
select    serial_number,    net_quantity,    is_fully_credited,    is_margin_reliablefrom {{ ref('fct_serial_margin') }}where is_fully_credited  and (net_quantity > 0 or is_margin_reliable = true)
A serial that was sold and then fully credited must not count as sold.View these lines on GitHub
Open the repository

readiness-audits

Audit skills that verify their own fixes

Two Claude Code audit skills, one for AI agents and one for conventional codebases. Every section runs through two independent sub-agents and then an adjudicator whose job is to catch the first two overstating what they did.

agent-readiness-audit/references/agent-roles.mdlines 99 to 108, commit 3ddcac9
> **For every claimed fix in the report**, locate the corresponding change in the real diff and assign a verdict:> `VERIFIED`, `OVERCLAIM`, `HALLUCINATED`, `COSMETIC`, `REGRESSION`, `SCOPE-CREEP`, or `UNRESOLVED-OK` (see the> taxonomy for detection method + examples). For each, cite the diff hunk (or its absence) that justifies the> verdict, and give the corrected confidence.>> **Also independently check the whole, not just the parts:**> - Did fixing one trifecta leg reopen another? (Cross-section: e.g. §2.4 egress tightened but §3.1 still feeds>   untrusted content into a data-bearing context with another exfil path.)> - Did the test pass-rate drop vs baseline? Any new failure is a `REGRESSION` regardless of what the report says.> - Are any `Verified` labels unsupported by the diff? Downgrade them and mark `OVERCLAIM`/`HALLUCINATED`.
Part of the contract the adjudicator works to. It reads the diff, not the report.View these lines on GitHub
Open the repository
Open the Build Lab

Skills

Data

  • SQL
  • Python
  • dbt
  • DuckDB
  • Data modelling
  • Data quality testing

Power Platform

  • Power Apps
  • Power Automate
  • Dataverse
  • Power BI
  • DAX
  • Power Fx

AI systems

  • Model Context Protocol
  • LLM tooling
  • Agent evaluation

Integration

  • Sage Accounting
  • REST APIs
  • PrintNode
  • Entra ID
  • Cloudflare Access
  • AWS EC2

Hardware

  • RFID
  • SGTIN-96 and EPC
  • GS1 and DataMatrix
  • Bluetooth Low Energy
  • Swift

Experience

  1. April 2024 to present

    Data and Systems Developer

    Virtumed, Johannesburg

    Data model, integration, reporting, apps, hardware and AI tooling for a medical device distributor.

  2. February 2022 to March 2024

    Escape Room Manager

    Hashtag Escape, Johannesburg

    Ran daily operations and bookings, and maintained and troubleshot the room equipment, control software and technical systems, diagnosing faults between live sessions. Synced bookings through the Acuity API.

  3. June 2021 to January 2022

    Waiter

    The Fat Ginger, Johannesburg

    Customer service and floor operations in a high volume restaurant.

  4. 2021 to 2023

    Diploma in Systems Development

    Boston City Campus

    Certificate received 2024, NQF Level 6.

Contact

Email is the quickest way to reach me.

Italian and South African citizen. Full EU work authorisation, no sponsorship required.