import { AreaChart, Area, XAxis, YAxis, Tooltip, ReferenceLine, ResponsiveContainer, CartesianGrid, Dot, } from "recharts"; export default function HallucinationRiskTimeline({ steps = [], threshold = 0.65, height = 180 }) { const data = steps.map((s) => ({ step: `s${s.step_n}`, composite: s.hallucination.composite, entropy: s.hallucination.entropy, attn: s.hallucination.attention_diffusion, uncertainty: s.hallucination.uncertainty_features, flag: s.hallucination.flag, })); return (
active && payload && payload.length ? (
{label}
risk: {payload[0].payload.composite.toFixed(3)}
entropy: {payload[0].payload.entropy.toFixed(2)}
attn diffusion: {payload[0].payload.attn.toFixed(2)}
uncertainty: {payload[0].payload.uncertainty.toFixed(2)}
) : null } /> { const { cx, cy, payload } = props; if (cx == null || cy == null) return null; return ( ); }} isAnimationActive={false} />
integrity note — early warning diagnostic only. SAE-steering intervention has ~20–30% correction success rate in literature (Mar 2026). Use this to flag trajectories for human review, not as ground truth.
); }