What problem does it solve? Determining whether a language model's answer is correct or a hallucination usually requires external ground truth, but this Skill trains linear probes on the model's own hidden states to predict correctness from internal representations. ## Core Features & Use Cases - Representation Extraction: Capture hidden states and MLP activations from specific layers and token positions in models like Mistral-7B and Llama-3-8B using forward hooks. - Hallucination Probing: Train logistic regression probes on extracted representations to classify answers as correct or hallucinated, with accuracy, precision, recall, and F1 metrics. - Layer-Token Analysis: Generate heatmaps of probe performance across layers and token positions, plus error-type classification from resampled answers. - Use Case: Run the full experiment pipeline on TriviaQA to find which layer best encodes answer correctness, then use the trained probe to flag likely hallucinations in new generations. ## Quick Start Probe Mistral-7B's internal representations on TriviaQA and tell me which layer best predicts whether its answers are hallucinations.