Metasense V2: Enhancing, improving and productionisation of LLM powered data governance

Nick Buhrer14 Nov 2024

Problem

Grab uses an LLM to tag the columns of its data-lake tables for data governance. The tags, together with privacy rules, set each table's sensitivity tier. After rollout the model covered most of the lake, but table owners still had to verify every result by hand. Growing the evaluation set with owner feedback and manual classifications from the Data Governance Office showed where the model failed: columns that look harmless but contain personal data.

Example from the article: a "business email" column can hold a personal address with a legal name, nested JSON can hide names and phone numbers among other fields, and passenger messages to support sometimes include phone numbers.

Solution in brief

The team treated the errors as a capacity problem: the model knew what PII is but lost focus on large, mixed samples. They split the job into a PII-only tagger and a separate tagger for everything else, shortened the prompt, and cut large tables into chunks. LangChain and LangSmith let data scientists edit and evaluate prompts without touching service code.

Questions this case answers
  • How to raise the accuracy of an LLM that must pick one label per item from a long label list when it loses focus on the rare, important labels
  • How to let a cross-functional team change, evaluate and deploy LLM prompts independently of the service code
  • How to make an LLM tag data-lake columns as PII reliably when tables mix PII and non-PII values?
  • How to let data scientists iterate on LLM prompts and deploy them without a service release?

Tools and methods

  • LLM column classification — tags each table column and feeds sensitivity-tier rules
  • Task decomposition — separate PII and non-PII taggers
  • LangChain — backend chain that runs both tagging tasks
  • LangSmith — prompt hub, evaluation datasets and metrics
Continue reading — it's free

Google or a one-time email code. No password.