src.dackar.RCA.orchestrators.ishikawa_evaluator¶
ishikawa_evaluator — Deterministic Ishikawa (fishbone) matrix builder.
Extracted from rca_reasoning_orchestrator.py. The parent module re-exports HeuristicIshikawaEvaluatorV1 for backward-compatible imports.
Attributes¶
Classes¶
First deterministic Ishikawa evaluator. |
Functions¶
Module Contents¶
- class src.dackar.RCA.orchestrators.ishikawa_evaluator.HeuristicIshikawaEvaluatorV1[source]¶
First deterministic Ishikawa evaluator.
- Builds a structured fishbone-style matrix from:
candidate hypotheses
KG context
temporal support
retrieved evidence
optional PM / operational context
- CATEGORY_ORDER = ['equipment_hardware', 'process_procedure', 'measurement_instrumentation',...[source]¶
- evaluate(event, telemetry_summary, kg_context, tskr_patterns, causality_candidates, evidence_bundle, operational_context, pm_compliance, run_context)[source]¶
Build the Ishikawa contributing-factor matrix for an event.
Assembles category-grouped rows from the causal candidates (each cited with its own supporting evidence — see
_supporting_evidence_by_candidate()), telemetry/TSKR measurement signals, maintenance and operating-context factors, process evidence, and KG-context factors.- Parameters:
event (JsonDict) – Target event (must carry
event_idorid), its telemetry summary, and the KG neighbourhood.telemetry_summary (JsonDict) – Target event (must carry
event_idorid), its telemetry summary, and the KG neighbourhood.kg_context (JsonDict) – Target event (must carry
event_idorid), its telemetry summary, and the KG neighbourhood.tskr_patterns (Optional[JsonDict]) – TSKR chain-position patterns, or None.
causality_candidates (JsonDict) – Ranked candidate hypotheses and their retrieved evidence.
evidence_bundle (JsonDict) – Ranked candidate hypotheses and their retrieved evidence.
operational_context (Optional[JsonDict]) – Optional supporting artifacts, or None.
pm_compliance (Optional[JsonDict]) – Optional supporting artifacts, or None.
run_context (JsonDict) – Orchestrator run context (
run_id).
- Returns:
An Ishikawa matrix conforming to
schemas/ishikawa_matrix.json(categories, rows, and a summary of top candidates).- Return type:
- _supporting_evidence_by_candidate(evidence_bundle)[source]¶
Index the evidence bundle by the candidate each hit supports.
Groups the bundle’s
resultsby theirmetadata.linked_candidate_id(falling back tometadata.candidate_id), keeping only non-superseded,support_role == "supporting"hits, so that each Ishikawa row cites the evidence retrieved for its own candidate rather than the first three snippet ids in the bundle.- Parameters:
evidence_bundle (JsonDict) – Evidence bundle whose
resultslist holds normalized retrieval hits (top-levelsnippet_id/support_score/superseded, withsupport_roleand candidate linkage undermetadata).- Returns:
Maps
candidate_idto its supporting snippet ids, highestsupport_scorefirst and capped at three. Candidates with no supporting evidence are absent (callers default to[]).- Return type:
Dict[str, List[str]]