Home / Technical articles / Vertical LLM
A general-purpose LLM cannot produce compliance documents: what it lacks is not language ability but the knowledge of which documents are required and which clauses each must contain. This article breaks down the engineering structure of a vertical LLM in compliance scenarios.
Ask a general-purpose LLM to write a “work safety responsibility system” and it will give you a passage that looks very much like one.
But what companies actually need is a coherent document set: which role owns what, which elements each document contains, which clause of the national standard it maps to, and how the documents fit together. That is not a language problem — it is a knowledge-structure problem.
The training corpora of general models contain no structured knowledge of which documents an industry needs under a given national standard, so the model can only invent. The output looks professional but cannot actually be used.
The first step in engineering is not connecting a model — it is breaking down the standard.
A national standard is usually a three-layer structure: elements → clauses → requirements. Making it machine-usable takes three things: number the elements, split the clauses into separate items, and tag each item with the document type it belongs to.
Example: chapter 5 of a standard covers “construction requirements”, divided into siting and layout, scenario design, equipment and facilities, functional zoning, and signage. Once split, each sub-clause maps to “which document this clause will appear in”.
This step accounts for more than half the project workload, and it has to be done by people who understand the business; it cannot be outsourced to a data-labeling vendor.
The knowledge base answers what to write; the template answers how to write it.
Compliance documents follow a fixed skeleton: policies typically run purpose, scope, responsibilities, process, records and supplementary provisions; emergency plans run general provisions, risk analysis, organisation, response process and safeguards.
Abstract these skeletons into templates so the model only fills in content and never invents structure.
Another benefit of templating is verifiability: after generation you can check whether every required section has content, and locate the specific section if something is missing.
When the model is actually called, the input is not “write me a responsibility system” but structured company information:
Industry, scale, organisational structure, equipment list, job positions, and whether the work is high-risk.
The model receives three things — a template, the relevant knowledge entries and company information — and outputs completed paragraphs.
After generation, post-processing is required: check that clause references exist, that job titles match the company information, and that units of measurement are consistent. This catches most low-level errors.
Pitfall 1: building the knowledge base as full-text search. Full-text search finds relevant passages but cannot tell you which document a given requirement maps to. Structured tagging is mandatory; storing raw text is not enough.
Pitfall 2: templates too rigid. Company sizes vary widely, so templates must support conditional inclusion and exclusion of sections; otherwise a micro-enterprise gets documents full of requirements it cannot meet, such as a dedicated safety management department that must be established.
Pitfall 3: skipping post-processing. Model output may read smoothly, but in a compliance document one wrong clause number is a fatal flaw. Post-processing cannot be skipped.
Good for: scenarios with a clear standard basis, a relatively fixed document structure and a need for batch generation. Compliance documents, test reports and review materials all fall into this category.
Not suitable for: scenarios that need original opinions, cross-domain reasoning, or where the standard itself is still changing.
The test is simple: if an experienced consultant could sit down and write these documents one by one from the standards, the structure works. If they would have to rethink each one from scratch, it does not.