← Back to Ideas
✅ WORKING PRODUCT

Event Oracle

Natural language interface to 11.9 million structured SEC filing events. Built while waiting for transformer model to train. PostgreSQL as Structured RAG.
11.9M
SEC Events
110K
Companies
66K
Event Types
$0.015
Per Query

🎯 Key Innovation: PostgreSQL as Structured RAG

Architecture

User Question (Natural Language)
Claude Opus (SQL Generation)
PostgreSQL Query Execution
Claude Haiku (Result Formatting)
Natural Language Answer

Latency: 2-3 seconds total | Cost: ~$0.015 per query

Cost Comparison: Event Oracle vs Fintool

Fintool (Traditional RAG)

$143K

per month (1K queries/day)

  • ✓ Text-based search
  • ✓ Q&A on SEC filings
  • ✗ No temporal patterns
  • ✗ No aggregations
  • ✗ No predictive analysis
  • Event Oracle (Structured RAG)

    $450

    per month (1K queries/day)

  • ✓ Structured event queries
  • ✓ Q&A on SEC events
  • ✓ Temporal patterns (SQL JOINs)
  • ✓ Aggregations (GROUP BY)
  • ✓ Predictive analysis (returns)
  • 200x CHEAPER

    Test Results: 5 Query Types Demonstrated

    TEST 1

    Aggregation Query - Most Common Events

    "Show me the top 10 most common event types"
    SELECT event_type, COUNT(*) as count
    FROM events
    GROUP BY event_type
    ORDER BY count DESC
    LIMIT 10;
    Rank Event Type Count
    1complied_regulatory_compliance_moderate531,486
    2developed_product_development_moderate475,810
    3developed_technology_development_moderate395,604
    4authorized_other_material_small305,332
    5complied_financial_compliance_moderate189,940
    6impaired_asset_impairment_medium183,231
    7developed_drug_development_moderate175,118
    8reorganized_corporate_restructuring_substantial173,055
    9approved_regulatory_approval_small159,153
    10granted_stock_option_none151,001

    💡 Insight

    Regulatory compliance (721K events) and innovation/development (1.05M events) dominate, representing 15% of all 11.9M events. High frequency of routine compliance validates our compression strategy.

    TEST 2

    Pattern Matching - Red Flag Detection

    "Find companies with workforce reductions in 2024"
    SELECT cik, company_name, event_type, event_date, sentiment
    FROM events
    WHERE (event_type LIKE 'reduced_%workforce%' OR event_type LIKE 'terminated_%')
      AND event_date >= '2024-01-01'
      AND event_date < '2025-01-01'
    ORDER BY event_date DESC
    LIMIT 20;

    💡 Insight

    Mix of minor adjustments and major restructuring efforts. Most terminations reported on December 31 (fiscal year-end timing). Claude correctly used LIKE patterns to match compound event_type format (verb_object_magnitude).

    TEST 3

    Predictive Analysis - Returns by Event Type

    "Which event types have the best average 6-month returns with at least 100 occurrences?"
    SELECT event_type, AVG(return_6m) as avg_return_6m, COUNT(*) as count
    FROM events
    WHERE return_6m IS NOT NULL
    GROUP BY event_type
    HAVING COUNT(*) >= 100
    ORDER BY avg_return_6m DESC
    LIMIT 20;
    Rank Event Type Avg 6M Return Count
    1discontinued_operation_cessation_major2,010.87%414
    2entered_consulting_agreement_minor1,165.69%108
    3covenant_violation_default_major702.46%157
    4filed_bankruptcy_filed_critical648.72%454
    5impaired_goodwill_impairment_critical412.33%127

    💡 Insight

    Massive returns associated with distress events - likely survivorship bias. Only companies that recovered from bankruptcy/discontinuation still report returns 6 months later. Failed companies have no return data.

    Alpha Opportunity: Market initially overreacts to distress signals. Predictive models could identify which distressed companies will survive.

    TEST 4

    Red Flag Detection - Auditor Dismissals

    "Show me companies with auditor dismissals in the last 5 years"
    SELECT cik, company_name, event_type, event_date
    FROM events
    WHERE (event_type LIKE 'dismissed_auditor%' OR event_type LIKE 'changed_auditor%')
      AND event_date >= CURRENT_DATE - INTERVAL '5 years'
    ORDER BY event_date DESC
    LIMIT 20;

    💡 Insight

    Most auditor changes are routine, but CRITICAL and MAJOR dismissals indicate serious issues:

    • Disagreements over accounting treatment
    • Discovery of material weaknesses
    • Precursor to restatements or investigations
    • Potential fraud or going concern issues

    Use Case: Run daily to generate red flag alerts for investment risk systems. Automatic notifications when CRITICAL or MAJOR dismissals occur.

    TEST 5

    Temporal Pattern Detection - Partnership → Development

    "Find companies that had a partnership event followed by a product development event within 90 days"
    SELECT p.cik, p.company_name,
           p.event_type as partnership_event, p.event_date as partnership_date,
           d.event_type as development_event, d.event_date as development_date
    FROM events p
    JOIN events d ON p.cik = d.cik
                     AND d.event_date > p.event_date
                     AND d.event_date <= p.event_date + INTERVAL '90 days'
    WHERE p.event_type LIKE 'partnered_%'
      AND d.event_type LIKE 'developed_%'
    ORDER BY p.event_date DESC
    LIMIT 20;
    Company Partnership Event Development Event Gap
    CUMMINS INCpartnered_joint_venture_substantialdeveloped_technology_development_significant⚡ 4 days
    BioAtla, Inc.partnered_licensing_agreement_moderatedeveloped_tax_law_development_moderate⚡ 4 days
    Nukkleus Inc.partnered_strategic_alliance_substantialdeveloped_exclusive_distribution_moderate⚡ 9 days
    Blue Gold Ltdpartnered_strategic_alliance_substantialdeveloped_product_development_moderate19 days
    PALATIN TECHNOLOGIESpartnered_strategic_alliance_substantialdeveloped_technology_development_moderate32 days

    💡 Insight

    Strategic partnerships lead to rapid product development within 1-3 months. Three patterns emerge:

    • Lightning-fast (⚡ 4-9 days): Partnership was FOR the development
    • Rapid (19-39 days): Development initiated immediately after partnership
    • Planned (61-80 days): Development rolled out over 2-3 months

    🚫 This Query is IMPOSSIBLE with Text-Based RAG (Fintool)

    Fintool searches text chunks and returns passages. It cannot JOIN events by company and calculate date differences. Vector search has no concept of temporal ordering. SQL's date arithmetic (INTERVAL '90 days') has no equivalent in embedding space.

    This is Event Oracle's unique advantage: Structured events + SQL = temporal pattern discovery impossible with text search.

    Capability Comparison: RAG vs Structured

    Capability Fintool (RAG) Event Oracle (Structured)
    Basic Q&A Excellent Excellent
    Temporal Patterns Impossible Native (SQL JOINs)
    Aggregations Limited Native (GROUP BY)
    Predictive Analysis Not available Returns pre-calculated
    Pattern Discovery Cannot do Complex SQL queries
    Cost (1K queries/day) $143K/month $450/month
    Query Speed 2-5 seconds 2-3 seconds

    Key Insight

    Knowledge compression (500GB text → 11.9M structured events) enables capabilities that text-based RAG cannot match. PostgreSQL as Structured RAG is faster, cheaper, and more capable than traditional vector search.