> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/koala73/worldmonitor/llms.txt
> Use this file to discover all available pages before exploring further.

# World Brief

> AI-generated global intelligence summaries with multi-tier provider fallback

The **World Brief** provides an AI-synthesized summary of the most significant global developments. Instead of manually scanning hundreds of headlines, you get a concise intelligence digest generated by language models.

## How It Works

World Monitor uses a **4-tier provider fallback chain** to ensure you always get a summary, even when cloud services are unavailable:

<Steps>
  <Step title="Tier 1: Local LLM (Ollama/LM Studio)">
    If you've configured a local inference endpoint, World Monitor attempts generation first on your machine. This keeps your data private and eliminates API costs.

    **Timeout**: 5 seconds

    **Models supported**: Any OpenAI-compatible endpoint (Ollama, LM Studio, llama.cpp server, vLLM)
  </Step>

  <Step title="Tier 2: Groq (Cloud)">
    Fast cloud inference using Llama 3.1 8B at temperature 0.3. Requires a Groq API key.

    **Timeout**: 5 seconds
  </Step>

  <Step title="Tier 3: OpenRouter (Cloud)">
    Multi-model fallback for additional redundancy. Requires an OpenRouter API key.

    **Timeout**: 5 seconds
  </Step>

  <Step title="Tier 4: Browser-side T5 (Transformers.js)">
    If all API providers fail, World Monitor falls back to a small summarization model (T5) running entirely in your browser using WebAssembly. No network required.

    **Note**: This is the slowest option but guarantees you'll always get a summary.
  </Step>
</Steps>

## Deduplication & Caching

To optimize performance and reduce API costs:

* **Content deduplication** — Headlines are compared using word-overlap similarity (Jaccard). Near-duplicates (>60% overlap) are merged before sending to the LLM, reducing prompt size by 20–40%
* **Redis caching** — Summaries are cached for 24 hours with a composite key based on mode, variant, language, and content hash. If 1,000 users view the same headlines, only one LLM call is made
* **Variant-aware prompts** — The system prompt adapts to your dashboard variant:
  * **World Monitor**: emphasizes geopolitical events, conflict escalation, diplomatic shifts
  * **Tech Monitor**: focuses on funding rounds, AI breakthroughs, startup news
  * **Finance Monitor**: highlights market movements, central bank signals, economic data

## Multilingual Output

When you change the UI language in World Monitor, the World Brief automatically generates summaries in that language. The LLM prompt instructs the model to output in your selected language:

<Tabs>
  <Tab title="English">
    ```
    Summarize these global developments in English:
    - Ukraine conflict escalates...
    - Fed signals rate cut...
    ```
  </Tab>

  <Tab title="French">
    ```
    Résumez ces développements mondiaux en français:
    - Le conflit ukrainien s'intensifie...
    - La Fed signale une baisse des taux...
    ```
  </Tab>

  <Tab title="Arabic">
    ```
    لخص هذه التطورات العالمية بالعربية:
    - تصاعد الصراع في أوكرانيا...
    - الاحتياطي الفيدرالي يشير إلى خفض الفائدة...
    ```
  </Tab>
</Tabs>

## Configuring Local LLM

To use Ollama or LM Studio for local generation:

1. Open **Settings** (Cmd+, or click the gear icon)
2. Navigate to the **LLMs** tab
3. Enter your local endpoint URL:
   * Ollama default: `http://localhost:11434`
   * LM Studio default: `http://localhost:1234`
4. Click **Verify & Save**

World Monitor will automatically discover available models and populate a dropdown. Embedding-only models are filtered out.

<Tip>
  If model discovery fails, a manual text input appears as fallback. Default fallback model: `llama3.1:8b`
</Tip>

## Progress Indicators

While generating a summary, World Monitor displays which provider tier is being attempted:

* **"Generating summary (Ollama)..."** — Trying local endpoint
* **"Generating summary (Groq)..."** — Trying cloud inference
* **"Generating summary (OpenRouter)..."** — Trying multi-model fallback
* **"Generating summary (Browser)..."** — Using local browser model

If a tier fails or times out, the UI seamlessly advances to the next tier without user interaction.

## Privacy Considerations

<Tabs>
  <Tab title="Ollama/LM Studio (Tier 1)">
    ✅ **100% private** — No data leaves your machine\
    ✅ **No API keys required**\
    ✅ **No internet required** (after model download)
  </Tab>

  <Tab title="Groq/OpenRouter (Tiers 2-3)">
    ⚠️ **Data sent to cloud** — Headlines are sent to third-party APIs\
    ⚠️ **API key required**\
    ⚠️ **Subject to provider terms of service**
  </Tab>

  <Tab title="Browser T5 (Tier 4)">
    ✅ **Runs in browser** — No data sent to servers\
    ⚠️ **Slower than cloud** — Model runs on CPU/GPU via WebAssembly\
    ⚠️ **Downloads ONNX model** — \~50MB one-time download
  </Tab>
</Tabs>

## API Key Management

API keys for cloud providers are stored securely:

* **Desktop app**: OS keychain (macOS Keychain, Windows Credential Manager)
* **Web app**: Browser localStorage (encrypted in transit via HTTPS)

Keys are never logged or transmitted to World Monitor servers — they go directly to Groq/OpenRouter.

<Warning>
  Never share your API keys. If compromised, regenerate them immediately in your provider dashboard.
</Warning>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Summary always falls back to browser model">
    This means all three API tiers are timing out or returning errors:

    1. Check your **Settings → LLMs** tab to verify Ollama/Groq/OpenRouter are configured
    2. Test your Ollama endpoint: `curl http://localhost:11434/api/tags`
    3. Verify API keys are valid (click **Verify & Save** in Settings)
    4. Check browser console for detailed error messages
  </Accordion>

  <Accordion title="Ollama tier always skipped">
    Ensure:

    * Ollama is running: `ollama serve`
    * The endpoint URL is correct in Settings (default: `http://localhost:11434`)
    * At least one chat model is installed: `ollama list`
    * The model isn't embedding-only (e.g., `nomic-embed-text` won't work)
  </Accordion>

  <Accordion title="Summaries are in the wrong language">
    The UI language setting controls summary language. Change it via the language selector in the header:

    1. Click the language flag icon (e.g., 🇬🇧)
    2. Select your preferred language
    3. The page will reload with the new language
    4. Generate a new World Brief — it will now use your language
  </Accordion>

  <Accordion title="Summary is stale or outdated">
    Summaries are cached for 24 hours. To force regeneration:

    * Wait for new headlines to arrive (cache key includes content hash)
    * Or clear your browser cache and reload
  </Accordion>
</AccordionGroup>

## Related Features

* [Country Analysis](/guide/country-analysis) — AI-generated briefs for specific countries
* [Signal Intelligence](/guide/signal-intelligence) — Real-time threat detection and convergence alerts
* [Localization](/guide/localization) — Changing UI language and regional settings
