Skip to main content
Quality issues rarely come from a single source. They emerge from the intersection of materials, machines, operators, and processes. Catching a pattern — like a defect spike every time a specific material lot runs on Line 3 during the night shift — requires cross-referencing data that typically lives in separate systems. By the time someone manually assembles that picture, you have already scrapped hundreds of units. This use case connects your quality management system and production database to a Wayak agent that analyzes defect patterns on demand. You can ask natural-language questions like “Which line had the highest scrap rate last week?” or “Show me defect trends for product X by shift.” The agent pulls from your SOPs knowledge space to recommend corrective actions grounded in your own procedures.

What you need

Data sources

  • Quality management system — Defect logs with defect type, severity, line, shift, operator, and timestamp
  • Production database — Output records to calculate defect rates as a percentage of total production

Knowledge spaces

  • Standard operating procedures (SOPs) — Upload process-specific SOPs so the agent can reference correct procedures when recommending corrective actions
  • Quality manual — Your quality standards, acceptable defect thresholds, and escalation criteria
Semantic layer: Define these in your ontology before setting up the agent.
ComponentNameDefinition
ObjectDefect RecordMaps to the quality system defect log. Represents a single defect event with type, severity, and context
ObjectInspection ResultMaps to inspection records. Represents a pass/fail outcome for a batch or unit
MetricDefect RateTotal defects divided by total units produced, as a percentage, over a given period
MetricScrap CostSum of material and labor cost for scrapped units, pulled from ERP cost postings
DimensionDefect CategoryGroups defects by root cause type: material, process, operator, machine
DimensionSeverityClassifies defects as critical, major, or minor based on quality standards
See building a semantic layer for a step-by-step guide.

Agent setup

1

Create the agent

Go to Agent Space > New agent.
FieldValue
NameQuality Assurance Analyst
RoleQuality control specialist
GoalIdentify defect patterns and reduce scrap rates
2

Set the description

You are a quality control analyst focused on reducing defect rates. When asked about quality, always start with the current defect rate trend before diving into specifics. Group defects by category (material, process, operator, machine) and highlight the highest-impact area first. Use precise numbers and percentages. Recommend corrective actions based on data and reference the relevant SOP when available. Do not make assumptions about causes you cannot verify from the data.
3

Scope data access

Grant access to:
  • Quality management system data source (defect logs and inspection results)
  • Production database data source (output records)
  • SOPs knowledge space
  • Quality manual knowledge space
  • Defect Record and Inspection Result objects in the semantic layer
4

Add skills

Trigger: User asks about defect trends, quality issues, or scrap rates
  1. Identify the time range, product, or line from the user’s request, defaulting to the last 30 days if unspecified.
  2. Pull all defect records matching the criteria from the quality management system.
  3. Calculate the overall defect rate and compare it to the previous period.
  4. Group defects by category (material, process, operator, machine) and rank by count.
  5. Cross-reference the top defect category with shift and line data to identify correlations.
  6. Reference the relevant SOP from the knowledge space and note any deviations that could explain the pattern.
  7. Present findings with a summary table and a recommended corrective action.
Trigger: User asks for a Pareto chart or top defect causes
  1. Pull all defect records for the specified period.
  2. Count defects by type and sort in descending order.
  3. Calculate the cumulative percentage for each defect type.
  4. Identify the defect types that account for 80% of total occurrences.
  5. Present the Pareto table with defect type, count, percentage, and cumulative percentage.

Automation

Playbook: Weekly quality summary

1

Set the trigger

Schedule the playbook to run every Monday at 7:00 AM.
2

Build the workflow

The playbook compiles the previous week’s quality data into a summary report with trend comparisons.
  1. Query step — Pull all defect records and production output for the previous 7 days.
  2. Query step — Pull the same data for the week before that (for trend comparison).
  3. Format step — Build a summary showing defect rate by line, top defect categories, and week-over-week change.
  4. Condition step — If any line’s defect rate increased by more than 1 percentage point, add it to a “needs attention” section.
3

Configure delivery

Send the report via email to the quality manager and plant manager. Include the overall defect rate and trend direction in the subject line.
4

Test and activate

Click Run now to test with live data, then toggle to Active.

What’s next

Maintenance scheduling

Automate equipment service tracking and get alerts before failures happen.

All manufacturing use cases

See the full list.