Home / Case studies / Industry compliance document generation engine

In-House Product / Vertical LLM

Industry Compliance Document Generation Engine

Companies compile a full set of policies to national standards, moving from “hire a consultancy” to “generate it yourself in 15 minutes”.

Background

To pass work safety standardisation review, a company must compile a full set of policies, emergency plans and registers.

The traditional route is to hire a consultancy: around CNY 50,000–100,000, 15–20 days. That is a heavy burden for smaller companies, and what you get is a generic template detached from your actual organisational structure and equipment list.

The essence of this step is not 'writing articles' but 'translating national standard clauses into documents a company can actually execute'.

Solution

In-house vertical LLM application: national standard clauses are structured into a knowledge base, document sets are broken into generatable templates, and once the company fills in its basic information the whole document set is generated in one pass.

The knowledge base covers two national standard systems: a full system for large and medium enterprises and a streamlined one for small businesses.

Results can be edited online and exported to Word, so companies can revise them to their own situation and use them straight away.

Beyond standard-compliance documents, we also provide tools for hazard identification, risk notification cards, emergency plans, safety signage and training plans.

Technical composition

The table below lists this project's technical elements so clients can verify them independently.

Tech stack

Knowledge BaseStructuring national standard clauses
Template EngineTemplated document sets covering policies / emergency plans / registers
ModelLLM-generated, filled in with company information
InteractionForm-based input lowers the barrier to use
OutputEdit online · export to Word · print directly

Outcomes

  • Preparation time for a document set dropped from 15–20 days to minutes.
  • SMEs no longer need expensive consulting services.
  • Generated content is based on national standard clauses rather than generic templates and can be mapped to specific clauses.
  • Covers two national standard systems, matched automatically to company size.

Capabilities Used

Discuss a similar scenario

01 / Constraints

The constraints the project was built under

Project stories without constraints are fiction. This section sets out four constraints: time, site, staffing and compliance.

These constraints directly shape the solution; every problem under 'Key challenges' below is forced out by one of them.

Four kinds of constraint

KnowledgeStandard texts and industry procedures are scattered across dozens of files in inconsistent formats.
OutputThe generated policy documents must be usable directly for review; format and clause structure must match.
DataInformation submitted by companies concerns internal management and must not leave the site.
Time limitThe longest wait a business user will accept is a draft within 15 minutes.
02 / Key challenges

Where It Actually Gets Stuck

It is not “we worked hard”; it is “what the problem looked like, how we solved it, and what it cost”.

How standard clauses become generative knowledge

Dumping the standard PDF straight into the vector store yields content that looks like the standard but cites it inaccurately, often mixing up clause numbers.
How we solved it: structured extraction — split each standard into four fields (clause number / clause text / scope of application / responsible party) and store them in a structured database. At generation time, match clauses by industry and scale first, then let the model phrase them. Clause numbers stay exact while the wording stays flexible.

Wrong output format means reviewers reject it

The first version produced fluent prose, but reviewers wanted the standard format of section + clause + responsible department, and the two were incompatible.
How we solved it: changed the output to 'skeleton + filling' — chapter order, mandatory clauses and responsible-department fields are fixed by the template, and the model only writes the descriptions. After generation a field-completeness check runs, and anything missing is regenerated.

How to keep company-submitted data from leaving the site

A cloud model means the organisational structure and the names of responsible persons are uploaded. That is the concern enterprises are most sensitive about.
How we solved it: switched to fully on-premise deployment — model, knowledge base and generation service all run on the company's own machines with no network access at all. It demands hardware, but this single point removed the procurement objection.
03 / Reusable elements

What other projects can borrow directly

This section is for peers. If you are doing something similar, these points will save you a few detours.

Structure clauses, then generate

Any scenario that “issues documents to a standard” must first break the standard into structured fields; otherwise references will go wrong.

Skeleton + filling

When the format is strict, do not let the model decide the structure.

On-premise deployment is a double-edged sword

It removes compliance concerns but raises the hardware bar. Choose according to each client's actual situation, not with a blanket rule.

04 / Retrospective

If we did it again

Talking only about successes is unconvincing. This section covers what we got wrong or did too late.

Doing it again, we would build the industry template library earlier. As it is, every industry needs templates configured from scratch; a generic template engine abstracted at the start would make adding industries much faster.

We started evaluating generation quality too late. Early on we judged 'does it look right' by eye with no quantitative metrics, so tuning was guided by gut feel. It improved only after we built an evaluation set.

Mobile was not built at all. We assumed such tools were only used on PC, but many small business owners want to check results on their phones and could only be given a read-only page.

← All case studies Back to home