Key points
- Treat every prompt like a technical work instruction given to a junior engineer.
- Anchor the model with governing standards such as API, ASME, or ISO to prevent fictional rules.
- Force the model to show step-by-step calculations with units before it gives a final number.
- Include strict negative constraints and tell the model to state when data is missing.
- Always verify raw numbers yourself because language models predict words, not physical laws.
Prompt engineering for engineers is not about finding magic keywords. You apply engineering discipline to natural language models. When you size a pump, you do not tell a supplier to deliver a good pump. You specify flow rate, differential head, fluid viscosity, and design standards. You must treat language models the exact same way.
A large language model predicts the next most likely token in a sequence. If your input lacks boundary conditions, the model fills the gap with averages from internet text. In engineering, average assumptions lead to failed seals, undersized relief valves, and plant downtime. A structured prompt restricts the solution space to sound engineering methods.
Key terms in plain English
- Large Language Model (LLM): A statistical text generator trained on vast datasets to predict the most likely next word, defined under ISO/IEC 22989 as a machine learning model designed to process natural language.
- Prompt: The natural language instruction and contextual data you provide to direct the output of a model.
- Hallucination: An ungrounded, incorrect output generated by a model with high syntactic confidence despite lacking factual basis.
- Few-Shot Prompting: Providing one or more complete, worked examples in your instruction to establish an exact technical pattern.
- Chain-of-Thought: A prompting method that forces the model to write out each intermediate logical or mathematical step before stating the final result.
- System Prompt: Background instructions that define the permanent persona, core operating boundaries, and safety rules for a model session.

Prompt engineering for engineers: the six-part method
To obtain reliable technical answers, structure every complex prompt using six distinct sections. This mirrors how you write standard operating procedures or design briefs. When you skip a section, you force the model to guess your design intent.
1. Role and goal
State who the model must act as and what you need it to accomplish. Be specific about the engineering discipline. A senior piping engineer approaches a transient pressure problem differently than a software developer. For example, instruct the model: “Act as an experienced process safety engineer. Calculate the required orifice area for a pressure relief valve.”
2. Context and inputs
Provide every process condition, fluid physical property, and standard needed to solve the problem. Include design standards such as API 520 Part I or ASME Section VIII. State your assumptions clearly. If fluid viscosity changes with temperature, state the operating temperature and fluid behaviour directly.
3. Output format
Define the layout of the response. Demand an HTML table, a comma-separated list, Python code, or numbered derivation steps. When you demand a specific format, you stop the model from writing rambling commentary. For equipment lists, state the exact column headers you require, such as tag number, fluid, flow rate, and design pressure.
4. Negative constraints and limits
Tell the model what it must not do. This is the most neglected part of technical prompt design. Tell it never to guess missing fluid properties. Tell it to flag missing parameters and stop. Instruct it to state “insufficient data” instead of inventing a discharge coefficient or pipe roughness factor.
5. Reference example
Provide one worked example of a good answer. This is known as one-shot prompting. If you want a calculation presented with standard variable names, units, and citation clauses, show one completed sample. Models mirror the tone, density, and formatting of your example with high fidelity.
6. Independent verification instructions
Tell the model to review its own output against standard physical checks. Require it to list the governing equations, substitute numbers step by step, and check unit consistency across every term. Make it list the primary standard references used during the derivation.
Worked example: sizing a liquid relief valve
Let us look at a practical prompt for sizing a pressure relief valve on a positive displacement pump discharge line. Below is a structured prompt built using the six-part method, followed by how an engineer evaluates the response.
Example Prompt:
Role & Goal: Act as an ASME pressure vessel design engineer. Calculate the required relief valve orifice area for a liquid system.
Context & Standards: Follow API 520 Part I (10th Edition). Liquid is water at 20 °C (density ρ = 998 kg/m3). Set pressure Pset = 10.0 barg. Overpressure = 10% (so relieving pressure P1 = 11.0 barg). Backpressure Pb = 0.0 barg. Required relieving flow rate Q = 30 m3/h. Discharge coefficient Kd = 0.62. Capacity correction factor due to viscosity Kv = 1.0. Backpressure correction factor Kw = 1.0.
Format: Show the base equation from API 520, then the unit conversions, then the step-by-step substitution, and conclude with the calculated area in mm2 and the nearest standard API 526 letter designation.
Limits: Do not guess values. If any required correction factor is missing, state it plainly. Do not round numbers until the final step.
The model follows the liquid relief sizing equation from API 520 Part I, Section 5.8:
A = Q / (38 · Kd · Kw · Kv) · (ρ / (P1 − Pb))0.5
Where:
- A = calculated discharge area (mm2)
- Q = flow rate (m3/h) = 30 m3/h
- Kd = rated discharge coefficient = 0.62
- Kw = backpressure correction factor = 1.0
- Kv = viscosity correction factor = 1.0
- P1 = upstream relieving pressure (barg) = 11.0 barg
- Pb = total backpressure (barg) = 0.0 barg
- ρ = fluid density relative to water at 15 °C = 998 / 999 ≈ 0.999
The model performs the calculation step by step:
Differential pressure ΔP = P1 − Pb = 11.0 − 0.0 = 11.0 bar.
Square root term: (ρ / ΔP)0.5 = (0.999 / 11.0)0.5 = (0.09082)0.5 = 0.30136.
Denominator constant: 38 · Kd · Kw · Kv = 38 · 0.62 · 1.0 · 1.0 = 23.56.
Required area calculation:
A = (30 / 23.56) · 0.30136 · 1000 = 383.7 mm2
According to API 526 (7th Edition, Table 1), the standard orifice sizes include:
- G orifice: area = 325 mm2 (undersized)
- H orifice: area = 506 mm2 (adequate)
The model correctly selects the H orifice. As the engineer reviewing this output, you check the standard edition used, verify the constant (38 is used for metric units in API 520), and recompute the final multiplication. The prompt succeeded because it defined the constant basis and standard edition in advance.
Advanced prompt methods for engineering tasks
Simple single-sentence prompts fail when applied to multi-stage problems. You must choose the prompting strategy that matches the complexity of your technical task.
1. Chain-of-Thought (CoT) prompting
Force the model to think before it writes. By instructing the model to explain your reasoning step by step before stating the result, you reduce arithmetic errors. LLMs generate answers one word at a time. Writing down the intermediate steps allows the model to attend to its own prior intermediate tokens, which sharply reduces logic failures.
2. Least-to-most decomposition
Break a massive system into smaller subsystems. If you design a balance of plant for a water electrolysis skid, do not ask for the entire piping and instrumentation diagram in one prompt. First prompt for the mass balance. Next, prompt for line sizing based on that mass balance. Finally, prompt for control valve pressure drop criteria. This prevents token context overload and preserves accuracy.
3. Retrieval-Augmented Generation (RAG) context feeding
Never rely on a model’s internal memory for private datasheets, company design manuals, or current component pricing. Paste the exact text of the standard, pump curve data, or material certificate directly into the prompt context. Under ISO/IEC 42001, verifying the lineage and source of operational data is a central management requirement.
Benchmarks: how the options compare
Engineers can interact with AI models through several prompting architectures. The table below compares these approaches across typical technical parameters.
| Prompting Method | Engineering Use Case | Hallucination Rate | Setup Effort | Source |
|---|---|---|---|---|
| Zero-Shot | Rough document summaries, simple coding syntax lookups | 15% to 35% on technical calculations | Low (single prompt) | NIST SP 1270 / Typical vendor data |
| Few-Shot (In-Context Examples) | Equipment data sheets, standard inspection test plans | 5% to 15% on structured text | Medium (requires verified examples) | ISO/IEC 22989 benchmark criteria |
| Chain-of-Thought (CoT) | Fluid dynamics sizing, thermodynamic cycle balances | 3% to 8% on multi-step maths | Medium (requires structured prompts) | NIST AI Risk Management Framework |
| Retrieval-Augmented Generation (RAG) | Searching proprietary piping specs, internal failure reports | 1% to 4% against retrieved text | High (requires vector database and pipeline) | ISO/IEC 23894 / Industry benchmark |
Managing engineering risks and standards compliance
Using artificial intelligence in industrial environments introduces compliance and safety requirements. You cannot treat an AI tool as an unverified authority. Several international frameworks govern how AI systems should be audited and maintained.
ISO/IEC 42001 specifies requirements for establishing, implementing, maintaining, and continually improving an Artificial Intelligence Management System (AIMS). It requires organizations to trace the data sources used to guide technical decisions. When you generate code or calculation sheets via prompts, you must archive those prompts and their base references as part of the engineering record.
Risk management must align with ISO/IEC 23894, which guides AI risk assessments. In safety-critical sectors, such as offshore piping, high-pressure hydrogen, or nuclear systems, you must subject language model outputs to human-in-the-loop review. The European Union AI Act classifies AI systems used in safety components of critical infrastructure as high-risk. This demands data governance, logging, and human oversight.
Cybersecurity must not be overlooked. Under IEC 62443, industrial automation and control systems require strict network and data segregation. Never paste proprietary plant schematics, unreleased valve casting geometries, or plant network IP addresses into public cloud models. Ensure your prompt workflows comply with your facility’s cyber security level (SL) designations under IEC 62443-3-3.
What is happening now
Trade discussions shift from general software demos toward robust safety practices. As reported by IEEE Spectrum in October 2026, engineers guard the line between fast demos and safe products. In the same month, IEEE Spectrum highlighted why engineers should brave Capitol Hill to help shape realistic technical policy.
Checklist for engineers
- Identify the governing code or standard (such as ASME B31.3, API 520, or ISO 22734) before writing the prompt.
- Specify all process inputs with explicit metric or imperial units and baseline temperatures.
- Demand an explicit Chain-of-Thought calculation showing all unit cancellations.
- Add negative constraints directing the model to stop if variables or coefficients are unknown.
- Strip all proprietary plant tags, client identifying data, and confidential drawings to comply with IEC 62443.
- Verify the mathematical output independently using verified calculation tools or reference tables.
- Archive the successful prompt, model version, and verified result within your design record to meet ISO/IEC 42001 standards.
Frequently asked questions
Can prompt engineering replace standard engineering calculation software?
No. Prompt engineering does not turn a text model into a deterministic solver like ANSYS, Aspen Plus, or Mathcad. Language models predict text sequences. They help you draft code, find applicable standards, structure documentation, and run rough order-of-magnitude estimates. For formal design sign-off, you must rely on validated, dedicated numerical software.
Why do large language models make simple math errors in prompts?
Language models do not possess an internal calculator. They break numbers into tokens, which are character chunks. When multiplying large or floating-point numbers, the model generates the most statistically likely characters rather than executing arithmetic. You can resolve this by prompting the model to write and execute a Python script to perform the calculations.
How do I stop a model from inventing engineering standards?
Provide the standard number, section title, and year of publication directly within your prompt context. Include a strict negative constraint: “Cite only clauses from the provided standard. If you do not know the exact clause, state that you do not know.” This prevents the model from generating plausible-sounding standard numbers.
What is the difference between system prompts and user prompts?
A system prompt sets the permanent background instructions, persona, and technical boundaries for the entire session. A user prompt contains the specific problem, process numbers, and immediate format request. Putting standard constraints and unit rules in the system prompt ensures they apply to every follow-up question you ask.
If your team needs help implementing structured AI workflows, evaluating balance of plant calculations, or auditing technical data processes, reach out to Avoltium for independent engineering support.







