← All writing

·1 min read

Using LLM-as-judge for regulatory compliance reviews

How we scored client documents against Saudi PDPL for accuracy, completeness and authenticity, and turned the gaps into a remediation plan.

  • Evaluation
  • DeepEval
  • Compliance

On komplyance.ai, a PDPL compliance platform now live with banks and finance companies in Saudi Arabia, the core question was hard to automate: does this company’s policy actually meet the law?

Turn the question into rubrics

“Is this compliant?” is too vague for a model, and for most people too. We broke it into three scored dimensions:

  • Accuracy: do the statements match what the regulation and our internal knowledge base say?
  • Completeness: are all required articles and controls covered?
  • Authenticity: does the document describe this organisation’s real processes, or is it boilerplate?

Each dimension has its own rubric, grounded in retrieved passages from the regulation, so the judge always works from the source text and not from memory.

Combine off-the-shelf metrics with custom judges

DeepEval handled the standard metrics (faithfulness, contextual relevance). The domain-specific checks used custom LLM-as-judge prompts, each with a strict output schema: a score, the clause it refers to and a short justification. The structured output then becomes a gap report that compliance teams can act on.

Close the loop with generation

A gap report is only half the product. A remediation pipeline drafts fixes that keep the original document’s structure, and new documents are generated from company policies. On our test set the generated documents kept 95% content fidelity, so reviewers needed only minor edits before SDAIA submission.

What I’d tell anyone building the same thing

  1. Have humans label a small calibration set first, and keep checking the judge against it.
  2. Make every score cite the clause behind it. Reviewers trust what they can check.
  3. Trace everything. When a judge drifts, the traces show you why.
HM
Hamza Munir

Forward Deployed Engineer & AI Engineer, LLM & Agentic Systems. Get in touch.