Generative AI Solution for Code Compliance
Generative AI •Logistics •Machine Learning

Generative AI Solution for Code Compliance

We built a cloud-based generative AI MVP for a railway company. It checks the company's software against the ERTMS standards, tracks changes in the relevant rules, and drafts documentation and compliance findings for engineers to review.

Facing a similar challenge? Tell us about the task, and we will show how we would build it for your business.

Build Something Like This for Me

Free 30-min call · One-page solution outline within three business days · No commitment

Overview

A railway company in Europe wanted generative AI to help its engineers keep software in line with the European Railway Traffic Management System (ERTMS) standards. The aim was to speed up documentation and compliance review of the codebase, while engineers keep the final say on every finding.

Solution

We helped build a generative AI MVP on Microsoft Azure for the railway company. The work included configuring storage accounts, setting up compute environments and integrating Azure AI services. The MVP generates code documentation, checks code against ERTMS requirements, and processes incoming data as it arrives. It drafts compliance findings for engineers to review.

Features

  • Automatic generation of code documentation
  • Suggestions that make code easier to read
  • Code verification against stated requirements
  • Draft compliance findings against ERTMS standards
  • Integration with Azure AI services
fw-image

Outcome

The MVP gives the client's engineers a faster start on documentation and compliance review. Key outcomes:

  • Code documentation generation: documentation is drafted from the code, which makes it easier to keep in step with the ERTMS standards.
  • Compliance checks: the system drafts compliance findings that engineers review and accept or reject.
  • Real-time data processing: new data is processed as it arrives, so reviewers work with current information.
20 weeks

from kickoff to MVP

4

MVP capabilities: code documentation, compliance checks, code verification, real-time processing

6

specialists on the team

How We Build LLM Compliance Checking for Code

Compliance checking with language models works when the model never judges alone. A requirement, a piece of code and the evidence linking them all have to be visible to the reviewer. We build these systems as pipelines with three kinds of input and a human at the end:

  1. Regulations as data. Standards and national rules are split into individual clauses with an identifier, a version and an effective date. When a source changes, the pipeline compares versions and lists the clauses that moved.
  2. Code as data. The codebase is parsed into modules and functions, and the existing documentation and tests are attached to each one.
  3. Mapping. Retrieval over PostgreSQL with pgvector or a vector database proposes which clauses apply to which modules. The model explains each proposed link and cites the clause text and the code it relies on.
  4. Findings. For every clause the output is covered, not covered or unclear, with evidence. Draft documentation and amendment notes are generated from the same evidence.
  5. Human review. Engineers and compliance staff accept or reject each finding, and their decisions become test data for the next run.

Today we build the workflow with LangGraph and trace every step in LangSmith, so an auditor can see why each finding was made.

Why Compliance Work Needs Evidence

Regulated engineering has a specific failure mode. A model can produce a fluent compliance statement that cites the wrong clause, an outdated version of a standard, or code that does not do what the text claims. In safety-related domains such as railway signalling, that error is worse than no answer, because it looks finished.

The research points to the same remedy we use: give the model the right documents and train or prompt it to work from them. In the DRAFT study on safety-critical software assessment, a retrieval-augmented, fine-tuned model reached a 7% improvement in correctness over the baseline model, with better handling of evidence. The gain is real but modest, which is why the human reviewer stays in the loop.

We also keep the system narrow. It checks and drafts. It does not sign off. Every finding links to the clause and the code behind it, every regulation version is recorded, and each run stores the model version, prompt, settings and retrieved evidence, so it can be repeated and compared. More on our approach: generative AI consulting and private LLM deployment.

Other cases

AI Agent Platform With Governed Model Access: Many Agents, One Runtime

AI Agent Platform With Governed Model Access: Many Agents, One Runtime

Read more ›
AI Candidate Screening That Checks CV Claims Against Public Evidence

AI Candidate Screening That Checks CV Claims Against Public Evidence

Read more ›
ChatGPT-Powered Content Generation Platform

ChatGPT-Powered Content Generation Platform

Read more ›
AI Data Analyst in Microsoft Teams: Answers From Live Operational Data

AI Data Analyst in Microsoft Teams: Answers From Live Operational Data

Read more ›
AI Data Verification Layer for Property Data: Rules First, a Person on Borderline Cases

AI Data Verification Layer for Property Data: Rules First, a Person on Borderline Cases

Read more ›
AI Delegation Agent for Executive Teams: Assignments, Statuses and Scores in One Loop

AI Delegation Agent for Executive Teams: Assignments, Statuses and Scores in One Loop

Read more ›
AI Image Annotation Solution for Medical Assessment

AI Image Annotation Solution for Medical Assessment

Read more ›
ML/Computer Vision + Data Annotation for ADAS

ML/Computer Vision + Data Annotation for ADAS

Read more ›
AI/ML-Driven Telecom Network Optimization

AI/ML-Driven Telecom Network Optimization

Read more ›
Custom GenAI Medical Drug Search Accelerator

Custom GenAI Medical Drug Search Accelerator

Read more ›
ML/Computer Vision-Powered Data Annotation for Sports

ML/Computer Vision-Powered Data Annotation for Sports

Read more ›
OCR Retail Receipt Data Extraction Tool

OCR Retail Receipt Data Extraction Tool

Read more ›
Computer Vision + Image Annotation for Insurance

Computer Vision + Image Annotation for Insurance

Read more ›
AI Presale Assistant for a Marketing Agency: From Meeting Transcript to Sourced Draft

AI Presale Assistant for a Marketing Agency: From Meeting Transcript to Sourced Draft

Read more ›
AI Pricing Engine for an Equipment Distributor: The Model Proposes, a Person Approves

AI Pricing Engine for an Equipment Distributor: The Model Proposes, a Person Approves

Read more ›
AI Trade Contractor Sourcing: Verified Profiles and Pre-Screening for a Home Builder

AI Trade Contractor Sourcing: Verified Profiles and Pre-Screening for a Home Builder

Read more ›
Cinema Scheduling and Pricing Optimization: A Week of Showtimes, Computed

Cinema Scheduling and Pricing Optimization: A Week of Showtimes, Computed

Read more ›
Computer Vision + ChatGPT-Powered Recommendations

Computer Vision + ChatGPT-Powered Recommendations

Read more ›
Data Annotation for AI-Driven Sports Analytics

Data Annotation for AI-Driven Sports Analytics

Read more ›
Generative AI Bot for Customer Service

Generative AI Bot for Customer Service

Read more ›
SaaS Marketing Content Generation Platform for Healthcare

SaaS Marketing Content Generation Platform for Healthcare

Read more ›
Interactive Chatbot with an Animated Avatar

Interactive Chatbot with an Animated Avatar

Read more ›
Managed Video Annotation Pipeline for a Client's Own Human-Motion Footage

Managed Video Annotation Pipeline for a Client's Own Human-Motion Footage

Read more ›
ML/AI Technical Due Diligence for Startup Acquisition

ML/AI Technical Due Diligence for Startup Acquisition

Read more ›
OCR Solution for Invoice Processing

OCR Solution for Invoice Processing

Read more ›
Property Management Platform With an AI Voice Assistant for Multiple HOAs

Property Management Platform With an AI Voice Assistant for Multiple HOAs

Read more ›
AI-Powered Platform for Real Estate

AI-Powered Platform for Real Estate

Read more ›
AI Assistant for Report Generation & Visualization

AI Assistant for Report Generation & Visualization

Read more ›
Sitecore Migration

Sitecore Migration

Read more ›
ML/AI Technical Due Diligence for SporTech

ML/AI Technical Due Diligence for SporTech

Read more ›
Voice Interview to Social Posts: AI Content in the Professional's Own Voice

Voice Interview to Social Posts: AI Content in the Professional's Own Voice

Read more ›

Let's talk about your project

We'll help you harness AI and ML technologies to create innovative software solutions

File requirements: pdf, doc, docx, rtf, ppt, pptx — max 15 MB

No file selected