Software
Harnessing the Power of LLMs: Prompt Engineering for Quality Engineers
Prompt Engineering may be the missing link between traditional quality tools and the AI-powered future.

As artificial intelligence (AI) and Large Language Models (LLMs) like ChatGPT, Claude, and Gemini are becoming prevalent in the professional world, quality engineers are presented with a unique opportunity. These tools can streamline audits and processes, accelerate root cause analysis, improve documentation and even simulate decision trees. In fact, 85% of Gen Z professionals in the quality workforce report using AI tools already, highlighting how quickly these technologies are being adopted. But the real key to unlocking this potential isn’t just access to AI—it’s learning how to talk to it. Enter Prompt Engineering.
Prompt Engineering is the craft of designing precise, structured inputs to AI systems to receive accurate, useful and consistent outputs. For quality engineers, who live by structured processes and Standard Operating Procedures (SOPs), Prompt Engineering may be the missing link between traditional quality tools and the AI-powered future. Prompt Engineering is not only critical for public AI LLMs but also enterprise level in-house developed models too.
Why Prompt Engineering Matters in Quality
LLMs are not omniscient—they respond based on patterns in their training data and the prompts they receive. A vague prompt can yield generic or incorrect results, while a well-structured one can produce insights comparable to those of an experienced quality professional. In other words, the quality and specificity of your prompt directly influences the relevance and accuracy of the AI’s response. The risks of hallucinations still exist but the output received is within clearly defined boundaries.
Consider this example of prompting an AI for help with a Failure Modes and Effects Analysis (FMEA):
- Weak Prompt: “Help me with an FMEA for welding process”
- Strong Prompt: “Generate a Process FMEA template for a catheter welding process in a Class II medical device, including potential failure modes, effects, and recommended controls. Align with ISO 14971 risk management principles.”
The latter prompt is far more likely to yield a useful, detailed result. It reflects the structured thinking that quality engineers already use, specifying the context (catheter welding in medical devices), scope (process FMEA template), and constraints (align with ISO 14971). In essence, prompt engineering formalizes the clarity and thoroughness that quality professionals intuitively apply in their work. Indeed, using a refined, detailed prompt can significantly improve an LLM’s output quality.
>Courtesy of Priyankkumar Patel
Key Applications for Quality Professionals
-
Document Drafting and Review - Prompting an AI model to draft or review procedures, SOPs, templates, protocol, reports or quality plans saves time—especially when the prompts specify regulatory context, audience, and formatting. LLMs like ChatGPT can generate solid first drafts of essential quality documents (e.g. 8D reports, audit checklists, CAPA descriptions) based on your guidelines.
- Example: “Draft a Design Control Procedure for a Class III orthopedic implant per 21 CFR 820.30 and ISO 13485, including risk-based decision points and design review milestones.”
-
Audits - AI can simulate portions of a supplier or internal audit if the prompt includes the applicable standard and organizational context. This can help auditors practice or generate ideas for questions and checklists. In fact, quality professionals are already using ChatGPT or Microsoft Co-pilot or their in-house developed custom enterprise LLMs to build audit checklists and even simulate auditor Q&A sessions for training.
- Example: “Act as an ISO 13485 lead auditor reviewing our CAPA system. Ask 10 probing questions and provide sample objective evidence you’d expect to see.”
-
Root Cause Analysis and CAPA - LLMs can guide or critique your analysis when fed incident data. By providing details of a nonconformance or complaint, you can prompt the AI to assist with techniques like 5 Whys or fishbone analysis. This helps ensure no angle is missed and can even suggest corrective action plans.
- Example: “Given a field complaint involving seal leakage in batch X214, provide a 5 Whys root cause analysis and suggest a CAPA plan with effectiveness checks.”
-
Training - Prompted LLMs can create role-specific training guides or quizzes based on internal SOPs. This is a quick way to develop training materials that are tailored to your processes.
- Example: “Create a 10-question quiz to train junior engineers on our ECO (Engineering Change Order) process. Reference SOP-412-RevD.”
Control Limits are the key.
History reminds us that raw power alone doesn’t guarantee purposeful direction. Long before vehicles, we relied on horses—majestic, strong, and capable of carrying us across vast terrains. But a horse left unguided would wander, expend energy inefficiently, or even lead us into danger. It needed a skilled rider to harness its potential.
The same principle applied when the internet emerged: it was an immense repository of information, but without structured queries and filters, it often led to misinformation or distraction. In each case, controls and guidance were needed to channel power into productive use.
Now, with AI and large language models (LLMs), we again find ourselves with a powerful tool—one that can accelerate insight, automate tasks, and facilitate decision-making. But like the horse and the early internet, LLMs require guidance. Prompt Engineering is our modern set of reins, allowing us to direct this power toward meaningful, accurate, and value-adding outcomes. Without it, the AI may wander—responding with plausible-sounding but incorrect or irrelevant outputs. With it, we stay in control. This truly aligns with the concept of control limits which we as quality engineers live and breathe daily.
Structure: The Language of Quality
Quality engineers are no strangers to structure – it is the very language we speak. From the rigor of ISO 9001 clauses to the disciplined methodology of Six Sigma, structure is what transforms ambiguity into reliability. The importance of systematic process thinking has long been emphasized by giants in the field. W. Edwards Deming famously taught, “If you can’t describe what you are doing as a process, you don’t know what you are doing.” In other words, undefined work is inherently uncontrolled. Joseph M. Juran likewise advocated for a structured approach to quality, breaking it down into planning, control, and improvement (now known as the Juran Trilogy). He made it clear that quality does not happen by accident; it must be deliberately planned and continually improved. And Philip B. Crosby memorably declared that quality isn’t a subjective feeling of excellence, but rather conformance to requirements - meeting defined standards every time. These pioneers all sent a common message: quality is achieved by design and by process, not by chance. It is a function of clear requirements, consistent methods, and ongoing refinement.
Prompt engineering is simply the extension of that mindset into the AI age. When we craft a prompt for an LLM, we are effectively describing a process: we outline what we want (the task and output), we provide context and constraints (the requirements and standards to conform to), and we often specify how to structure the answer. We are, in Deming’s terms, describing what we’re doing as a process so that the AI “knows what it’s doing.” The more structured and explicit our prompt, the closer the AI’s output will conform to our requirements – which is exactly Crosby’s definition of quality. In short, quality professionals already know how to communicate in precise, structured terms. Prompt engineering just channels that skill into working with AI, ensuring the technology’s output meets our high standards of accuracy and usefulness.
Best Practices for Prompt Engineering in Quality
The 5 pillars of Prompt Engineering are
|
Prompt Engineering Pillar |
Questions Answered |
Quality Tools to be used |
Explanation |
|
Specific |
What |
SMART objectives |
Clearly defines what the AI is supposed to do—task, deliverable, or outcome |
|
Context |
Who? Where? When? |
Gemba Walks |
Gives AI an identity (Who), defines situational conditions (Where and When), such as acting as an auditor, for a high-risk supplier, during an ISO audit. |
|
Structure |
How? |
Process Flow Diagram Templates |
Guides how the AI should format, organize, and deliver the response (lists, tables, sections, etc.). |
|
Constraint |
Why? |
Quality Standards Regulatory Frameworks SoPs Etc. |
Adds the Why by enforcing boundaries—e.g., to stay within compliance, avoid data leakage, or meet specific regulatory constraints. |
|
Iterate and Refine |
All 5W 1H continuous improvement |
PDCA cycle PDSA cycle DMAIC Etc. |
Adjusts or clarifies any of the 5Ws and H as the conversation evolves. Each iteration may zoom in further on the Who, What, Where, etc. depending on the quality of the response. |
Case Study: Prompt Engineering for CAPA System Audit
Objective
Generate audit questions aligned with ISO 13485 to assess CAPA effectiveness at a high-risk supplier.
Weak Prompt
- “Give me audit questions about CAPA.”
Output
- How are internal nonconformities escalated into the CAPA system?
- What criteria determine whether an issue requires a corrective or preventive action?
- What root cause analysis methods are used to investigate CAPAs?
- How is responsibility for CAPA ownership assigned and approved?
- How are containment actions tracked and verified before CAPA closure?
- How are CAPA timelines monitored to ensure timely closure?
- What steps are taken to verify the effectiveness of implemented CAPAs?
- How are preventive actions proactively identified within the organization?
- How does the system identify and address recurring or systemic issues?
- How is CAPA data reviewed and analyzed during Management Reviews?
Strong Prompt with the 5 Pillars
-
Specific – What
- “Generate a list of 10 comprehensive audit questions focused on internal CAPA execution and effectiveness verification.”
-
Context – Who, Where, When
- “Act as a certified ISO 13485 lead auditor conducting an on-site supplier audit for a Class III medical device manufacturer. The supplier has a history of recurring internal nonconformities in their CAPA system.”
-
Structure – How
- “For each question, provide (1) a rationale tied to ISO 13485:2016 clauses, and (2) the type of objective evidence you would expect to observe.”
-
Constraint – Why
- “Exclude questions related to post-market surveillance or customer complaints.”
-
Iterate and Refine – All
- In the next prompt, improve on all the above to provide any missing information.
“Act as a certified ISO 13485 lead auditor conducting an on-site supplier audit for a Class III medical device manufacturer. The supplier has a history of recurring internal nonconformities in their CAPA system. Generate a list of 10 comprehensive audit questions focused specifically on internal CAPA execution and effectiveness verification. For each question, provide (1) a rationale tied to ISO 13485:2016 clauses, and (2) the type of objective evidence you would expect to observe. Exclude questions related to post-market surveillance or customer complaints.”
Output
|
# |
Audit Question |
Rationale (ISO 13485 Clause) |
Expected Objective Evidence |
|
1 |
How does the supplier determine which internal issues are escalated into formal CAPAs? |
Ensures compliance with Clause 8.5.2 (Corrective Action) — issues with significant risk must trigger CAPA. |
Internal audit findings, NCR logs, documented CAPA triggers, escalation criteria SOPs. |
|
2 |
What methodology is used for root cause analysis, and how is it documented for each CAPA? |
Verifies Clause 8.5.2 b — requirement to investigate root cause of nonconformities. |
Completed 5 Whys, Fishbone diagrams, RCA templates in CAPA files. |
|
3 |
How are CAPA action plans developed and approved before implementation? |
Confirms Clause 8.5.2 c — need for documented action planning to eliminate root cause. |
CAPA forms with planned actions, approvals, signatures, defined responsibilities. |
|
4 |
How is the implementation of corrective actions tracked and monitored to closure? |
Tied to Clause 8.5.2 d — corrective actions must be implemented and recorded. |
Gantt charts, action item trackers, CAPA dashboards, project timelines. |
|
5 |
What controls are in place to ensure CAPAs are closed within target timelines? |
Supports Clause 8.5.2 and 4.1.6 (Control of outsourced processes) — effective process control and risk management. |
CAPA overdue reports, metrics/KPIs on aging CAPAs, escalation records for delays. |
|
6 |
How is the effectiveness of each CAPA verified, and what criteria define success? |
Confirms Clause 8.5.2 e — requirement to verify that actions were effective. |
Effectiveness check forms, internal audit follow-up reports, trend data, quality metrics before/after CAPA. |
|
7 |
How are repeat nonconformities identified and linked to previous CAPAs? |
Evaluates Clause 8.4 (Analysis of Data) and 8.5.1 (Continual Improvement). |
Cross-reference logs, trend analyses, repeated NCR logs tied to same root cause, management review records. |
|
8 |
What preventive action processes exist to identify and mitigate similar risks before issues recur? |
Ensures Clause 8.5.3 (Preventive Action) is actively implemented, not just reactive fixes. |
Risk analysis records, FMEA updates, cross-functional reviews, preventive action CAPAs. |
|
9 |
How are CAPA trends analyzed and used to drive systemic improvement? |
Aligns with Clause 8.4 — organizations must analyze quality data for trends. |
Monthly or quarterly CAPA trend reports, Pareto charts, input into management review. |
|
10 |
How is management informed about CAPA status, overdue actions, and effectiveness trends? |
Addresses Clause 5.6 (Management Review) — leadership must be aware of QMS effectiveness. |
Management review minutes, KPI dashboards, CAPA summary reports shared with leadership. |
This table is an AI generated output so it might contain inaccuracies. The aim is to demonstrate that strong prompts provide better results than weak prompts for the goal at hand.
Prompt Engineering doesn’t replace your quality knowledge—it amplifies it. Think of it as teaching a new team member—one that works at machine speed and scale, but only as well as you guide it. By mastering Prompt Engineering, Quality Professionals can position themselves not just as stewards of compliance, but as leaders in intelligent transformation.
Citations
- https://www.mastercontrol.com/gxp-lifeline/how-ai-can-transform-life-science-capa-process/#:~:text=years%E2%80%94a%20competitive%20advantage%20that%20can%27t,be%20ignored
- https://www.ibm.com/think/topics/prompt-engineering-guide#:~:text=guide%20AI%20behavior%20and%20outputs
- https://www.ibm.com/think/topics/prompt-engineering-guide#:~:text=guide%20AI%20behavior%20and%20outputs
Looking for a reprint of this article?
From high-res PDFs to custom plaques, order your copy today!





