Author: Tatyana Paklinskaya, Occupational Safety Specialist — SC "Edelweiss"
Implementing AI in HSE is not just about giving a neural network a task. It is a process where we first become students in order to later teach the machine. Let me tell you how I automated the development of HSE instructions.
Where I Started: Testing the Hypothesis
Before creating an AI assistant, I decided to test how neural networks generally handle such a task. First, I worked with Grok — it learns perfectly, remembers everything, and has no text length limits. Then I tried working with ChatGPT and discovered that it has output volume limits, which causes it to arbitrarily shorten the text of the HSE instruction, something I absolutely could not allow. GigaChat from Sber, unfortunately, completely failed to understand what to do and produced unstable results. And DeepSeek turned out to be a big dreamer — it was impossible to keep track of what it made up and what was true.
The second problem I encountered was that neural networks cannot formulate detailed, specific descriptions that are understandable to employees. They produce general phrases but do not specify exactly what, how, and in what sequence the worker should act. I had to show examples, striving for the exact style required for presenting HSE instructions. When I got a result I liked, I saved it as a benchmark instruction example.
Invariant and Variable Parts of the Instruction
Once the neural network learned to understand the difference between a bad and a good instruction, I analyzed what is constant in the instruction and what is the variable part.
The invariant part (what is always the same):
- Structure. Strictly defined by the Ministry of Labor Order No. 772n.
- Style. Always formal, with detailed and unambiguous phrasing.
- System references. Constant reference to the enterprise's HSE Management System Regulation.
The variable part (what changes):
- Job title and its corresponding professional standard.
- List of occupational risks. This is what determines the key content — those specific actions of the employee.
This separation became the key to automation.
Algorithm for Creating the Assistant: 3 Key Steps
Step 1. Collecting and structuring the knowledge base.
The assistant should not "fantasize." I gathered a package of documents for it to rely on:
- Ministry of Labor Order No. 772n in a truncated version — there is no point in uploading the entire text of the order to the assistant's knowledge base; it is better to leave only what specifically relates to the development of HSE instructions. This way, the assistant will work better and more accurately.
- A list of HSE Rules relevant to the enterprise with a brief description for better orientation of the neural network.
- The company's HSE Management System Regulation.
- A benchmark HSE instruction.
Step 2. Developing the prompt (technical specification for the AI).
The prompt is the brain of the assistant. It must be as detailed as possible. My prompt (in a short version) looks like this:
You are an HSE expert.
🔹 Task: develop HSE instructions for workers strictly according to the template ("HSE_Instruction_Writing_Template", uploaded to the base).
🔹 Workflow:
- Find the professional standard (or ETKS/EKS) for the specified job title. If there is no professional standard, use ETKS/EKS.
- Extract generalized labor functions, typical labor actions, knowledge, and skills from the professional standard.
- Based on them, form the responsibilities, harmful and hazardous production factors, and occupational risks.
- Match the risks with the "List of Regulatory Documents" and include only those HSE Rules that are genuinely applicable to the profession.
- Rewrite the instruction text by sections (I – V) tracing the "HSE_Instruction_Writing_Template", maintaining the style, structure, and continuous numbering.
- In Section I, always indicate: the professional standard, Ministry of Labor Order No. 772n, and the employer's local acts ("HSE Management System Regulation" and "HSE Policy").
🔹 Formatting:
- Section headings: Roman numerals (I, II, III, IV, V).
- Main points: continuous Arabic numbering (1., 2., 3.… until the end of Section V).
- Nested sub-points within the main point: X.1., X.2., X.3.… (for example: "4. List of hazardous factors", then "4.1. …", "4.2. …").
- After completing a nested list, continue the main numbering (for example, after 4.10 comes 5.).
- Output paragraphs and sub-points exactly as in the template.
- No "*" or "-" for lists.
🔹 What is forbidden:
- Do not provide reasoning, comments, or ask clarifying questions.
- Do not shorten the text or change the style.
- Do not add new sections.
- Do not offer options ("foreman like this or like that").
- Do not output the entire instruction all at once.
🔹 Text Output:
- Each response = one complete section.
- Always maintain continuous numbering.
- Output only the finished text of the instruction.
- No introductory words ("understood", "great", "I will compose").
Step 3. Setup and launch.
By combining all the components in an assistant builder (for example, in ChatGPT), I got a working "digital partner." You need to work with it for a while to identify operational errors and improve the prompt to eliminate them.