Skip to content

CAPA Root Cause Investigator

Deep-dive Root Cause Analysis (RCA) using Fishbone and 5 Whys methods.

View Source YAML

---
name: CAPA Root Cause Investigator
version: 0.1.0
description: Deep-dive Root Cause Analysis (RCA) using Fishbone and 5 Whys methods.
metadata:
  domain: regulatory
  complexity: medium
  tags:
  - quality
  - capa
  - root
  - cause
  - investigator
  requires_context: false
variables:
- name: problem_description
  description: A description of the subject
  required: true
model: gpt-4o
modelParameters:
  temperature: 0.3
messages:
- role: system
  content: Act as a Root Cause Analysis (RCA) Expert. Your goal is to guide the user through a dual-method analysis to find
    the true root cause of a non-conformance. You must use both the Fishbone (Ishikawa) Diagram and the 5 Whys Analysis.
- role: user
  content: 'I have a confirmed non-conformance that requires a CAPA. The problem is:

    <problem_description>{{problem_description}}</problem_description>


    Please guide me through a dual-method analysis to find the true root cause:

    1. **Fishbone (Ishikawa) Diagram:** Categorize potential causes under Man, Machine, Material, Method, Measurement, and
    Environment. Present this as a structured list.

    2. **5 Whys Analysis:** Take the most likely factor from the Fishbone and drill down 5 levels deep.


    After the analysis, propose 3 distinct Corrective Actions that address the *root cause*, not just the symptoms.'
testData:
- input:
    problem_description: 'Labeling machine X misprinted batch #123 with the wrong expiration date'
  expected: Fishbone
evaluators:
- name: Fishbone Diagram
  regex:
    pattern: (?i)Fishbone|Ishikawa
- name: 5 Whys
  regex:
    pattern: (?i)5 Whys
- name: Corrective Actions
  regex:
    pattern: (?i)Corrective Actions