Spaces:
Sleeping
Sleeping
Commit History
-
fix: Margin-consistency gate check and final-evaluation labelβ
- data_gate cross-checks net_margin against net_income/revenue; a disagreement (period mixing upstream) quarantines the pair so a wrong margin can never be cited (companion to the Researcher-side duration fix in fundamentals extraction) - Critic's 4th evaluation after max revisions now labeled 'final evaluation' instead of the confusing 'iteration 4/3'c90d619 -
feat: Deterministic data gate on the Researcher->Analyzer edgeβ
Applies the AgentAsk edge-contract principle deterministically (no LLM): - DG: per-category required-metric rules audited on the exact extracted view the Analyzer consumes; gaps render as an explicit MISSING section in the reference table instructing 'DATA NOT PROVIDED' - the silent empty-valuation case can no longer pass unflagged, and the Critic's existing constraint rule finally has something to enforce - SC: sanity bounds quarantine impossible magnitudes (decimal/unit slips) before they can enter the reference table and be cited; bounds reject the impossible, not the unusual (Boeing's real 9.92 D/E passes) - Both findings logged to the activity stream; 7 gate tests added7abf8e9 -
fix: Boeing-run findings β canonical refs, edge contracts, guardrailsβ
1. Canonical [M##] alignment: final result now carries metric_reference (the analyzer's own numbered list); the Quantitative Data table renders from it so table refs match SWOT text citations exactly (was: positional row numbering that diverged from the analyzer's 16-item list) 2. Numeric validator: accept citations exact at displayed precision ("$2.2B" for 2.237e9); mismatch messages now include raw values 3. Parser edge contract: only [M##]-cited lines enter the quadrants; uncited action lines route to a new Recommendations block, data-quality prose to quality notes; markdown headers can no longer leak as rows 4. Interpretation guardrails in analyzer prompts (VIX bands, margin benchmarks, internal-W/external-T classification) and a critic rubric line penalizing misclassification and W/T metric duplication 5. Citation coverage counts distinct cited metrics (no more 125%); provider failure logs deduped to one line per provider Contract tests added (tests/tesβ¦e961a43
-
fix: Update citation patterns to match new SWOT output formatβ
The SWOT output format changed from VALUE [M##] to [M##] Metric: Value but the citation validator patterns weren't updated, causing: - 0% citation coverage (pattern didn't match) - 25+ "uncited" values flagged (all values appeared uncited) - Score capped at 4.5/10 Changes: - Added CITATION_PATTERN_NEW for [M##] Metric: Value format - Kept CITATION_PATTERN_OLD for backwards compatibility - Added CITATION_REF_PATTERN for simple [M##] counting - Updated extract_citations() to try both patterns - Updated find_uncited_numbers() to exclude both patterns - Updated get_citation_count() to use ref pattern Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>e3b7287 -
Fix revision loop exit: change > 3 to >= 3, handle ESCALATEβ
Bug: Loop didn't exit after 3 revisions because: 1. revision_count > 3 was False when count = 3 2. ESCALATE status wasn't checked in should_continue Fix: - Change revision_count > 3 to >= 3 - Add check for critique_details.status == "ESCALATE" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>6ab9879 -
Decrease quality threshold from 7 to 6β
- Weighted score threshold: 7.0 β 6.0 - Evidence grounding hard floor: 7 β 6 - Updated conditions.py, graph_cyclic.py, critic.py Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>07bfcf6
-
Fix: Temporal data extraction and frontend date displayβ
Backend: - Extract dates for valuation/volatility/macro in analyzer.py - Fix workflow_store.py to use regular_market_time for valuation - Fix workflow_store.py to use generated_at for volatility - Add Layer 2 (minimum citation count) to numeric_validator.py - Add Layer 3 (uncited number detection) to numeric_validator.py - Integrate Layers 2/3 in critic.py Frontend: - Add normalizeDate() for YYYY-MM-DD format (2025Q3β2025-09-30) - Add inferDataType() "Spot" for valuation metrics - Add extractDate() with multiple field fallbacks for news Fixes issues 2, 3, 5, 6, 8 from frontend data display audit. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>09c3333 -
Layer 4: Add deterministic numeric validation in Criticβ
Enforces machine-verifiable numeric accuracy: 1. Prompt changes (analyzer.py): - Require [M##] citations for all metric values - Example: "Revenue of $394.3B [M01] demonstrates..." - Clear warning that citations are auto-verified 2. New validator (numeric_validator.py): - Extract [M##] citations from SWOT output - Normalize values ($394.3B -> 394300000000) - Compare against metric_reference with tolerance - Return specific mismatch descriptions 3. Critic integration (critic.py): - Validate citations after LLM evaluation - If mismatches: cap evidence_grounding at 4, force rejection - Add specific feedback for revision - Log validation results to activity log Tested with Ford hallucination case: - Detects: market_cap $43.4B vs expected $56.6B - Detects: pe_trailing 21.3 vs expected 12.14 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>a2c9702 -
Refactor: Analyzer handles revisions directly, remove Editor nodeβ
Architecture change: Researcher β Analyzer β Critic β Analyzer (revision loop) - Add conditional focus area blocks to Analyzer based on failed rubric criteria - Add _build_revision_prompt() for structured Critic feedback integration - Analyzer detects revision mode via revision_count > 0 and critique_details - Route "retry" from Critic back to Analyzer instead of Editor - Rename editor_skipped β analyzer_revision_skipped in conditions.py - Delete redundant src/nodes/editor.py - Update Critic to LLM-only weighted rubric evaluation - Update workflow version to 2.0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>53fe655
-
Initial commit: Instant SWOT Agentβ
Multi-agent strategic analysis system with: - Research Gateway (A2A client to Researcher-Agent) - Analyzer, Critic, Editor workflow nodes - Data grounding enforcement in all LLM calls - React frontend with real-time progress π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>0c591a7