Skip to content
CaseOps is onboarding its first litigation chambers directly.Book a demo
Security
CASEOPS
Log inBook a demo
Demo
  1. Hamza Liaqat
  2. /
  3. Case studies
Case study 02 · Applied machine learning, before ChatGPT

Semantic analysis of assurance standards

Finding semantic overlap across standards, before ChatGPT.

Topic models showed that a set of assurance frameworks shared themes. Stakeholders needed to know which passages overlapped. Hamza moved the analysis to passage-level semantic matching with open-source transformer models, and delivered it as reports people could check line by line.

Role
Data scientist, natural language processing
Engagement
GoSource Australia, through Upwork · Jun 2021 – Jan 2022
Stack
Python · LDA topic modelling · Sentence-transformers · PyTorch · pandas · Google Colab · Google Drive · Excel · Matplotlib · Plotly

The problem

Assurance frameworks and standards often cover the same ground in different words, and sometimes in nearly the same words. Stakeholders needed to see where those overlaps were. Comparing documents by hand, passage against passage, was slow and painstaking.

First attempt: topic modelling

The first approach used classical topic modelling, including Latent Dirichlet Allocation (LDA). It surfaced the themes the documents shared.

But a theme is not an answer. Stakeholders could see that topics overlapped and still could not tell which requirement in one standard corresponded to which in another. The presentation drew little actionable feedback.

The decision: compare meaning, passage by passage

In 2021, before ChatGPT’s public release, open-source transformer models could already represent the meaning of a passage as a vector, a sentence embedding, on modest hardware.

Hamza adapted existing sentence-transformer models to the problem, so passages could be matched by meaning even when their wording differed. The models were applied and adapted, not trained from scratch.

1First attemptThemes, not passages

  1. Documents

    Assurance frameworks

  2. LDA

    Topic modelling

  3. Result

    Shared themes

    But which passages overlap?

Compare meaning, passage by passage

2Passage-level semantic matchingOpen-source transformer models, applied and adapted

  1. Google Drive

    Documents

  2. Extract

    Text

  3. Segment

    Passages

    Source and position kept

  4. Embed

    Sentence-transformers

  5. Match

    Similar meaning

  6. Excel

    Matched-passage reports

Report layoutSchematic, not project output

Passage in standard A

Closest passages in standard B

Explanatory diagram of the pipeline and a schematic of the report layout, drawn for this page. Not project data or output.

The pipeline

  1. 01

    Ingest

    Framework documents were loaded from the team’s Google Drive workspace and their text extracted.

  2. 02

    Segment

    Each document was split into paragraphs or passages, keeping the source document and position of every passage.

  3. 03

    Embed

    Sentence-transformer models turned each passage into an embedding, handled as tensors with PyTorch-based tooling.

  4. 04

    Match

    Embeddings were compared across standards to find candidate passages with related meaning, including passages phrased quite differently.

  5. 05

    Report

    Results were written to Excel workbooks in the same Drive workspace, showing each passage beside its closest counterparts in the other standards.

The breakthrough was the report

Abstract topics had asked stakeholders to trust the model. The workbooks let them read the matching language themselves and judge whether an overlap was significant.

In some cases the matches revealed very similar, apparently repeated wording across standards. Similarity marks passages for a person to compare; it does not by itself establish where wording came from.

The outcome

  • An inspectable, repeatable comparison workflow, run from a Google Colab notebook
  • Hamza recalls a run taking roughly 15 to 30 minutes for a directory of documents, depending on the dataset
  • Results stakeholders could read and act on, where the topic-model presentation had drawn little feedback

What it shows

Machine-learning output becomes valuable when the people it serves can read it, check it and act on it. The same principle runs through source-verifiable AI at CaseOps.

Client reviews · Upwork

Client reviews

The client’s review of the engagement, in full.

5.0 out of 5 stars

Data Scientist for Computational Linguistics / NLP of Assurance Frameworks

Upwork contract · Jun 2021 – Jan 2022

Contract earnings
$45.7K ($45,708.32 earned)
Hours worked
874
Engagement
7 months

“Everything you want from a technologist.”

Next case study · Production data engineering

An automated data and reporting platform, built with Dagster and dbt.

Read the case study
Back to Hamza Liaqat’s portfolio
CASEOPS

Turn case files into AI workspaces for legal work — source-backed, reviewable, built for chambers.

Product

Platform overviewDraftingCaseOps MobileCase File IntakeDossier working briefLegal workSource verificationHearings & order sheetsChamber workspace

Solutions

Litigation chambersSecurity & trustPricing

Company

AboutTechnology & ResearchFAQBlogContact

Legal

Privacy policyTerms of service

© 2025 CaseOps. All rights reserved.

Built for lawyer review, not blind reliance.

CaseOps is a member of the NVIDIA Inception program. NVIDIA and the NVIDIA logo are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.