AI for Quality Control in Manufacturing: From a Messy NCR Log to a Corrective Action
A worked example that takes 90 days of nonconformance reports, turns them into a Pareto table by count and by cost, and drafts the corrective action request.

Most plants already have the data to find their biggest quality problem. It sits in a nonconformance log that three inspectors fill in three different ways. Nobody has time to clean it up, so the weekly quality meeting talks about whatever went wrong yesterday. AI is good at the clean-up and the counting. Finding the root cause still happens at the machine.
The example plant
A 90-person job shop machines hydraulic fittings on three lines. Over the last 90 days, inspectors logged 148 nonconformance reports (NCRs). The log is an export from the quality system with no employee names: NCR number, date, line, part number, operation, a free-text defect description, quantity and disposition. All figures in this example are illustrative.
Data you'll need first
- An NCR export for at least 90 days, with inspector and operator names removed.
- The cost of each disposition: scrap value per part, rework minutes and your shop rate, and the cost of any customer return.
- Your defect code list, if you have one. If you do not, the first prompt builds one.
- A business-plan AI account approved for company data, or the AI built into your quality or ERP system. Customer drawings and specifications stay out of free tools.
Before: the raw log
Here are eight of the 148 rows as they came out of the system.
| NCR | Date | Line | Op | Defect description | Qty | Disposition |
|---|---|---|---|---|---|---|
| 4417 | 02 Sep | 1 | 40 | burr x-drill port | 12 | Rework |
| 4421 | 03 Sep | 2 | 30 | thd NOGO went in | 40 | Scrap |
| 4430 | 05 Sep | 1 | 40 | deburr missed on port 2 | 8 | Rework |
| 4436 | 09 Sep | 3 | 20 | OD .002 over | 15 | Scrap |
| 4441 | 10 Sep | 2 | 30 | thread gauge fail - no-go | 25 | Scrap |
| 4458 | 16 Sep | 2 | 60 | cert shows wrong heat # | 200 | Hold |
| 4462 | 17 Sep | 3 | 50 | scratches from tote | 6 | Use as is |
| 4470 | 19 Sep | 2 | 30 | Thd fail NG | 30 | Scrap |
Three inspectors, four ways to write "thread gauge fail". A spreadsheet pivot on this column returns 60 categories. That is why nobody does it.
The prompt that changes it
Check the mapping tab before anything else. If "cert shows wrong heat #" lands in "Other" instead of a paperwork category, fix the mapping and ask it to rebuild the tables.
After: the Pareto tables
By count of NCRs
| Defect category | NCRs | % of total | Cumulative % |
|---|---|---|---|
| Burr on cross-drilled port | 52 | 35.1% | 35.1% |
| Thread gauge fail | 38 | 25.7% | 60.8% |
| OD out of tolerance | 24 | 16.2% | 77.0% |
| Surface scratches | 14 | 9.5% | 86.5% |
| Paperwork or cert error | 9 | 6.1% | 92.6% |
| Missed operation | 6 | 4.1% | 96.6% |
| Other | 5 | 3.4% | 100.0% |
| Total | 148 | 100% |
By cost
| Defect category | Cost | % of cost |
|---|---|---|
| Thread gauge fail | $9,880 | 35.7% |
| OD out of tolerance | $7,440 | 26.9% |
| Paperwork or cert error | $4,500 | 16.3% |
| Burr on cross-drilled port | $2,860 | 10.3% |
| Missed operation | $1,620 | 5.9% |
| Surface scratches | $980 | 3.5% |
| Other | $400 | 1.4% |
| Total | $27,680 | 100% |
The two tables tell different stories. Burrs are the most frequent defect, but they are reworked at the bench for a few dollars each. Thread gauge failures are scrapped, and they cost more than three times as much. The nine paperwork errors look small by count, but one held shipment of 200 parts drove most of that $4,500. Run both tables every time. Count tells you where inspectors spend their day; cost tells you where the money goes.
In this example, the breakdown showed 29 of the 38 thread failures on Line 2 at operation 30, the thread-cutting step. That is where the team goes next, with a gauge and the tool change log, not with another prompt.
Draft the corrective action request
ISO 9001 clause 10.2 asks you to react to a nonconformity, review it and determine its causes, check whether similar problems exist or could occur, take action, review whether the action worked, and keep records. A draft that follows that order saves the quality manager an hour of formatting.
Where this breaks
The mapping is a judgment. AI will group "burr" and "sharp edge" together whether or not your customer sees them as the same defect. A quality engineer approves the category list.
Math. Ask for formulas, then check that the counts add to the number of rows in the export and the costs add to the total on the cost tab.
Root cause. A language model can list likely causes. It cannot see a worn insert or a gauge that was dropped. Root cause is confirmed at the machine, with evidence.
Safety-critical and customer-specific requirements. Disposition decisions, customer notifications and anything affecting product safety follow your quality system and your customer's requirements, not an AI draft.
Start with one line
- Pick one line and 90 days of NCRs. Run the clean-up and both Pareto tables.
- Bring the tables to the weekly quality meeting. Agree on the top category by cost and assign one owner.
- Run the same prompt every month. Keep the approved mapping tab so categories stay consistent month to month.
- Fix the log at the source. Once the categories are settled, add them as a drop-down in your quality system so next quarter's data arrives clean.
For other ways plants use the data they already have, see AI in manufacturing for mid-size plants.
Free buyer's guide
Quality Management System (QMS) Buyer's Guide
What your certifications require, which tools fit your plant, and how to move quality tracking off spreadsheets.
Last checked 24 November 2026 against published explanations of ISO 9001:2015 clause 10.2. This is an independent guide, and no vendor reviewed or paid for it.
Source: Auditor Training Online, "ISO 9001 clause 10.2 nonconformity and corrective action", checked 24 November 2026. Check the standard itself for exact wording. Example figures in this article are illustrative.
Related Articles
- AI for Manufacturers: Guides for Plant, Supply Chain and Finance Teams
- AI Demand Planning: Better Forecasts for Mid-Size Distributors and Manufacturers
- AI in Procurement and Purchasing: A Guide for Mid-Size Manufacturers and Distributors
- AI Predictive Maintenance for Mid-Size Plants: Start With the Work Orders You Have