// Admin Topic Segmentation Audit — sample 50 labelled segments with context. const AdminTopicSegAuditTab = ({ lang }) => { const t = lang === 'zh'; const [items, setItems] = React.useState(null); const [error, setError] = React.useState(null); const [reloading, setReloading] = React.useState(false); const reload = React.useCallback(async () => { setError(null); setReloading(true); try { const res = await apiFetch('/admin/topic-seg/audit-sample?n=50'); if (!res.ok) throw new Error(`HTTP ${res.status}`); setItems(await res.json()); } catch (err) { setError(err.message || String(err)); } finally { setReloading(false); } }, []); React.useEffect(() => { reload(); }, [reload]); return (
{t ? 'LLM 標註後抽 50 段隨機樣本,協助你檢查標籤合理性。粗體是被標的段落,上下兩行是前後文。' : 'Random sample of 50 labelled segments. The bold middle line is the labelled segment.'}