fix: default model to qwen3.5:9b + improve event classifier prompt
- Migration 026 and OllamaConfig now default to qwen3.5:9b instead of llama3.1:8b. Existing deployments keep their current model (qwen3.5:9b-fast) since the migration uses WHERE NOT EXISTS on slug. - Event classifier system prompt expanded with macro-vs-company filtering: explicitly instructs the model to NOT classify single-company news (lawsuits, earnings, management changes, debt crises) as macro events. Sets severity=low and confidence<0.3 for company-specific articles. Reserves 'critical' severity for multi-country/global market events. Prevents over-tagging event_types by requiring direct description. - Updated test_system_prompt_is_concise threshold to accommodate the expanded prompt (300 → 1000 chars).
This commit is contained in:
@@ -159,7 +159,7 @@ class TestBuildEventClassificationPrompt:
|
||||
def test_system_prompt_is_concise(self):
|
||||
result = build_event_classification_prompt("text")
|
||||
assert "JSON" in result["system"]
|
||||
assert len(result["system"]) < 300
|
||||
assert len(result["system"]) < 1000 # expanded to include macro-vs-company filtering rules
|
||||
|
||||
def test_user_prompt_lists_impact_types(self):
|
||||
result = build_event_classification_prompt("text")
|
||||
|
||||
Reference in New Issue
Block a user