Skip to content

Case 02 / Compliance engine · award-winning

Guardian

A compliance console that reads a supplier's messy dossier and blocks non-compliant cosmetic listings against real Vietnamese law — verdicts come from a deterministic engine, never the LLM.

Sweep48 live pages · 0 false positives
Law as data9 clauses · 80-row watchlist
StackNext.js 16 · Postgres · AI SDK · Vitest
guardian — compliance console200 OK
Guardian — compliance review

Demo

youtube.com/watch

The rule

Exactly one LLM call per document — extraction only. The verdict is a pure function running six checks. Verdicts never come from the LLM.

Build notes

The 48-page sweep

Swept 48 product pages from the client's own live site through the exact production matcher: 45 clean, 3 correctly flagged — one violation buried in body copy — zero false positives.

Law as data, not prompt text

9 policy clauses each citing Circular 06/2011/TT-BYT or the 2012 Advertising Law, an 80-row recall watchlist from a real DAV decision, and a 5-substance banned-ingredient screen.

The Vietnamese matcher

Fixes a real false-positive class: 'trị' alone fires on 'giá trị' in invoices — so it matches full claim phrases, plus a diacritic-stripped twin for OCR'd scans.

Concurrency done right

Concurrent review runs are serialized with a Postgres advisory lock that stays correct through pgBouncer, with a 5-minute staleness window to recover crashed runs.

More screens

Guardian verdict detail for a flagged listing: Blocked status, the cited regulation, and the required-docs checklist
Guardian dossier upload screen with the drag-and-drop zone and product name field

Award

Agentic AI Build Week 2026 certificate of achievement presented to Tom Nguyen for Runner-Up in the Retail track with Guardian, Ho Chi Minh City, July 8–12, 2026