Skip to main content

Overview

World Monitor integrates AI-powered analysis throughout the platform using a 4-tier provider fallback chain that prioritizes local compute and gracefully degrades through cloud APIs.
Privacy-First Design: Local LLM support (Ollama/LM Studio) means intelligence analysis can run entirely on your hardware with zero data leaving your machine.

AI Summarization Chain

The World Brief and country briefs use a cascading provider system:

Fallback Behavior

Ollama / LM Studio
  • Communicates via OpenAI-compatible /v1/chat/completions
  • Auto-discovers available models from local instance
  • Filters out embedding-only models
  • Default model: llama3.1:8b
Configuration (Desktop app):
Local inference is private by default - no API keys, no telemetry, no data leaves your machine.

Headline Deduplication

Before sending to any LLM, headlines are deduplicated:
Example:
  • Input: “Russian forces advance in Bakhmut” (Source A)
  • Input: “Russian troops push forward in Bakhmut region” (Source B)
  • Output: Single deduplicated headline

Redis Caching

All API-tier summaries are cached server-side:
Benefits:
  • Same headlines viewed by 1,000 users → 1 LLM call
  • Instant results for cached queries
  • Reduced API costs
  • Better performance
The first user to view a news configuration triggers the LLM call. All subsequent viewers get instant cached results.

Variant-Aware Prompting

System prompts adapt to the active dashboard variant:

Language-Aware Output

When the UI language is non-English:
LLM translation enables cross-language intelligence gathering - read sources in one language, get summaries in another.

Local Model Discovery

The desktop app automatically discovers available Ollama/LM Studio models:
Manual Fallback:
  • If discovery fails, text input appears
  • Enter model name directly
  • Example: llama3.1:8b, mistral:7b, codellama:13b

Threat Classification Pipeline

Every news item passes through a 3-stage hybrid classifier:
Instant Pattern Matching
  • ~120 threat keywords organized by severity:
    • Critical
    • High
    • Medium
    • Low
    • Info
  • 14 event categories:
    • conflict, protest, disaster, diplomatic, economic,
    • terrorism, cyber, health, environmental, military,
    • crime, infrastructure, tech, general
Output:

UI Never Blocks

Classification uses progressive enhancement:
  1. News items render immediately with keyword classification
  2. ML results arrive within seconds, update UI
  3. LLM results arrive, override if more confident
  4. Each item shows source tag: keyword, ml, or llm
Users never see a blank screen waiting for AI. Keyword results are instant, AI refinements layer on progressively.

Country Brief AI Analysis

Clicking any country opens a full intelligence dossier with AI-generated analysis:
AI Analysis Includes:
  • Situation summary (2-3 paragraphs)
  • Key developments
  • Risk assessment
  • Inline citation anchors [1][8] that scroll to sources

Focal Point Detection

Correlates entities across multiple data streams:
When 3+ signals converge in same geographic area → Focal Point Alert
Spike Classification:
  • 2x baseline: Minor spike
  • 5x baseline: Major spike
  • 10x baseline: Viral spike

Performance Optimizations

Timeout Cascade

Each tier has a 5-second timeout:
Total worst-case: 20 seconds before Browser T5 renders Typical: 0-2 seconds (cached or fast LLM)

Circuit Breaker

Prevents cascading failures:
  • Tracks error rates per provider
  • Opens circuit after repeated failures
  • Skips to next tier immediately

Desktop App Settings

Settings window (Cmd+,) has dedicated LLMs tab:
Cross-Window Secret Sync:
  • Saving in Settings writes to OS keychain
  • Broadcasts localStorage change event
  • Main window hot-reloads secrets
  • No app restart required

API Key Storage

OS Keychain Integration
  • macOS: Keychain Access
  • Windows: Credential Manager
  • Linux: Secret Service API
All secrets stored in single JSON blob:
Reduces authorization prompts:
  • Old: 20+ prompts (one per key)
  • New: 1 prompt per launch

Browser-Side ML Worker

The ML worker runs in a separate Web Worker:
Memory Management:
  • Toggle in AI Flow settings
  • When disabled: Worker never initializes
  • When enabled mid-session: Initializes immediately
  • When disabled: Terminates worker
Disabling the browser model saves ~200MB of WebGL memory and eliminates ONNX model downloads.

Best Practices

For Maximum Privacy
  1. Install Ollama on your machine
  2. Pull a model: ollama pull llama3.1:8b
  3. Configure endpoint in Settings → LLMs
  4. Disable Groq and OpenRouter toggles
  5. All analysis runs locally
For Best Performance
  1. Use Groq (fastest cloud API)
  2. Keep browser ML enabled (instant NER)
  3. Ollama as backup for when offline
  4. OpenRouter for model variety

Troubleshooting

Ollama not connecting?
  • Verify Ollama is running: ollama serve
  • Check endpoint: http://localhost:11434
  • Test models available: ollama list
  • Check CORS (desktop app handles automatically)
Summaries always using Browser T5?
  • Verify API keys are configured
  • Check provider toggles enabled
  • Look for errors in browser console
  • Confirm internet connectivity (for cloud APIs)
Slow summarization?
  • First request triggers LLM (slow)
  • Subsequent requests instant (cached)
  • Consider local Ollama for consistent speed
  • Browser T5 is slowest but always works
  • Live News - AI classifies and summarizes news
  • Desktop App - Local LLM integration
  • Data Layers - AI enhances geographic correlation