feat(advisor): add 0.85 advisory threshold triggering LLM suggestions
- Add advisory_threshold=0.85 field to MetricRule (higher-is-better metrics) - diagnose() now emits severity='low' for scores in (warning_threshold, 0.85) - noise_sensitivity (lower-is-better) keeps its existing two-tier thresholds - writer.py: severity labels mapped to Chinese (严重/警告/待优化) - llm_analyzer.py: prompt explains low/warning/critical tiers in Chinese - Tests: 5 new cases for 'low' severity, updated log summary assertions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -91,9 +91,9 @@ class TestWriteAdvice(unittest.TestCase):
|
||||
]
|
||||
summary = _format_log_summary(diags, self.advice_path)
|
||||
self.assertIn("faithfulness", summary)
|
||||
self.assertIn("critical", summary)
|
||||
self.assertIn("严重", summary) # "critical" maps to Chinese label
|
||||
self.assertIn("context_recall", summary)
|
||||
self.assertIn("warning", summary)
|
||||
self.assertIn("警告", summary) # "warning" maps to Chinese label
|
||||
|
||||
def test_write_empty_diagnoses_still_creates_file(self):
|
||||
write_advice(
|
||||
|
||||
Reference in New Issue
Block a user