Skip to content

Commit d86ec34

Browse files
author
EgonBot
committed
fix: per-archetype PremortemTask decomposition for small-model compatibility
PremortemAnalysis required the LLM to emit a deeply nested schema: 3 AssumptionItem + 3 FailureModeItem, with 11+ required fields per item including linked cross-reference IDs. Qwen 3.5-35B and other small local models consistently echoed the schema structure back instead of producing values, causing validation errors after exhausting all retries. Fix (applies the 'LLMs handle narrative; code handles structure' principle): - New ArchetypeNarrative schema: 5 plain text fields only (no IDs, no cross-references, no counts). The LLM writes narrative content only. - Per-archetype decomposition: one independent LLM call per archetype with up to 5 retries. Failed archetypes are skipped gracefully. - IDs, indices, and cross-references (assumption_id, failure_mode_index, root_cause_assumption_id) are assigned by code, not the LLM. - falsifier derived from test_now field to avoid hardcoded tautologies. - _calculate_risk_level_verbose returns 'Not Scored' when likelihood or impact is None (was rendering 'Likelihood None/5, Impact None/5'). - Dead code removed: ArchetypeAnalysis class, PREMORTEM_SYSTEM_PROMPT_TEMPLATE. Validated: PremortemTask PASSED on GLM 4.7 Flash (HVT_minimal run).
1 parent 70918f9 commit d86ec34

1 file changed

Lines changed: 153 additions & 146 deletions

File tree

0 commit comments

Comments
 (0)