import React, {useEffect, useState} from 'react'; import {Download, Play, RefreshCw, Upload} from 'lucide-react'; async function call(path, payload, signal) { const response = await fetch(path, {method: payload === undefined ? 'GET' : 'POST', headers: payload === undefined ? {} : {'Content-Type': 'application/json'}, body: payload === undefined ? undefined : JSON.stringify(payload), signal}); if (!response.headers.get('content-type')?.includes('application/json')) { throw Error(`The service returned HTTP ${response.status} instead of JSON. Check the connection and retry.`); } const data = await response.json(); if (!response.ok) throw Error(data.detail || `Request failed (${response.status}).`); return data; } function save(data, name) { const url = URL.createObjectURL(new Blob([JSON.stringify(data, null, 2)], {type: 'application/json'})); const a = document.createElement('a'); a.href = url; a.download = name; a.click(); URL.revokeObjectURL(url); } const value = n => n == null ? '—' : Number(n).toLocaleString(undefined, {maximumFractionDigits: 3}); export default function ChallengePanel({country}) { const [packet, setPacket] = useState(null), [connections, setConnections] = useState(null); const [input, setInput] = useState(''), [report, setReport] = useState(null); const [busy, setBusy] = useState(false), [error, setError] = useState(''); useEffect(() => { const controller = new AbortController(); const timeout = setTimeout(() => controller.abort(), 30000); Promise.all([call('/api/challenge_packet', {country}, controller.signal), call('/api/connections', undefined, controller.signal)]) .then(([p, c]) => {setPacket(p); setConnections(c);}) .catch(e => {if (!controller.signal.aborted) setError(e.message); else setError('Connection timed out. Reopen LLM challenge to retry.');}) .finally(() => clearTimeout(timeout)); return () => {clearTimeout(timeout); controller.abort();}; }, [country]); const score = async submission => { setBusy(true); setError(''); setReport(null); try { if (submission.country !== country) throw Error(`This submission is for ${submission.country || 'an unspecified market'}. Select ${country} predictions.`); setReport(await call('/api/challenge_score', submission, AbortSignal.timeout(30000))); } catch (e) {setError(e.name === 'TimeoutError' ? 'Scoring timed out. Retry the same submission.' : e.message);} finally {setBusy(false);} }; return <>
PORTABLE MODEL COMPARISON

Our model. Astra. The same test.

Run a chosen plugin, base model or fine-tuned adapter on four six-month forecasts. Compare its returned predictions with the recorded model family.

{country} · 24 TARGETS
{error &&

{error}

} {!packet ?

{error || 'Loading the frozen challenge…'}

: <>
1. Get prompts2. Run our chosen model3. Upload predictions4. Compare
Download test & fine-tuning kit

The baseline button checks the workflow with seasonal naive predictions. It does not call Astra or train a model.

Fine-tuning files and chronological boundaries

The kit contains chat-format train.jsonl, validation.jsonl and answer-free test-prompts.jsonl, plus a response template and checksums.

Training targets stop before October 2022. Validation covers October 2022–September 2024; test covers October 2024–September 2026. Each prompt contains only history observed through its origin. Keep evaluation prompts out of training.

This is a small public historical challenge. Its outcomes have already been published; fresh private or prospective data is required for an independent improvement claim.