diff --git a/infra/migrations/026_ai_agents.sql b/infra/migrations/026_ai_agents.sql index 9a89a14..9ca8965 100644 --- a/infra/migrations/026_ai_agents.sql +++ b/infra/migrations/026_ai_agents.sql @@ -7,8 +7,8 @@ CREATE TABLE IF NOT EXISTS ai_agents ( name VARCHAR(100) NOT NULL UNIQUE, slug VARCHAR(100) NOT NULL UNIQUE, purpose TEXT NOT NULL DEFAULT '', - model_provider VARCHAR(50) NOT NULL DEFAULT 'vllm', - model_name VARCHAR(200) NOT NULL DEFAULT 'qwen3.5:9b', + model_provider VARCHAR(50) NOT NULL DEFAULT 'ollama', + model_name VARCHAR(200) NOT NULL DEFAULT 'qwen3.5:9b-fast', system_prompt TEXT NOT NULL DEFAULT '', user_prompt_template TEXT NOT NULL DEFAULT '', prompt_version VARCHAR(100) NOT NULL DEFAULT '', @@ -37,8 +37,8 @@ SELECT * FROM (VALUES 'Document Intelligence Extractor', 'document-extractor', 'Extracts structured intelligence (sentiment, catalysts, impact scores, key facts, risks) from company news, SEC filings, earnings transcripts, and press releases.', - 'vllm', - 'AxionML/Qwen3.5-9B-NVFP4', + 'ollama', + 'qwen3.5:9b-fast', E'You are a financial document analyst. Extract structured data as JSON. Return ONLY a single JSON object. No markdown fences, no explanation, no text before or after the JSON. Every field in the schema is required. Use "other" for catalyst_type if unsure. Keep evidence_spans short (under 20 words each). Keep key_facts to 3-5 items max.', 'document-intel-v2', '2.0.0', @@ -48,8 +48,8 @@ SELECT * FROM (VALUES 'Global Event Classifier', 'event-classifier', 'Classifies global/geopolitical news into structured macro events with impact type, severity, affected regions/sectors/commodities, and estimated duration.', - 'vllm', - 'AxionML/Qwen3.5-9B-NVFP4', + 'ollama', + 'qwen3.5:9b-fast', E'You classify MACRO-LEVEL global news into structured event JSON. Return ONLY a single JSON object. No markdown, no explanation. Every field is required. Keep key_facts to 3-5 items. Keep summary under 3 sentences.\n\nCRITICAL: Only classify articles about MACRO events that affect entire markets, sectors, or economies. Examples: trade wars, interest rate changes, commodity supply disruptions, regulatory changes, geopolitical conflicts, natural disasters.\n\nDO NOT classify as macro events: individual company earnings, lawsuits against a single company, single-company management changes, individual stock analysis, company-specific debt or bankruptcy, product launches by one company. For these, set severity to "low", confidence below 0.3, and leave affected_regions, affected_sectors, and affected_commodities as empty arrays.', 'event-classification-v1', '1.0.0', @@ -59,8 +59,8 @@ SELECT * FROM (VALUES 'Thesis Rewriter', 'thesis-rewriter', 'Rewrites deterministic trade thesis summaries into clear, professional analyst prose. Optional layer — system falls back to deterministic thesis if this fails.', - 'vllm', - 'AxionML/Qwen3.5-9B-NVFP4', + 'ollama', + 'qwen3.5:9b-fast', E'You are a concise financial analyst. You rewrite structured trade thesis summaries into clear, professional prose suitable for an internal research note.\n\nSTRICT RULES:\n1. Do NOT add any information that is not present in the input.\n2. Do NOT fabricate numbers, dates, company names, or analyst opinions.\n3. Keep the rewrite under 150 words.\n4. Preserve all factual claims, risk notes, and evidence counts from the input.\n5. Use a neutral, professional tone. Avoid hype or marketing language.\n6. Return ONLY the rewritten thesis text. No JSON, no markdown, no commentary.', 'thesis-rewrite-v1', '1.0.0',