# Saplma Truthfulness Eval

> Evaluates whether an LLM's internal hidden layer activations can predict the veracity of a given statement. It probes the model's implicit knowledge of truthfulness by training a classifier on neural activations rather than relying on explicit prompting or output probabilities. Use when the user wants to benchmark on True-False Dataset, LLM-Generated Statements, or asks about evaluating this task. Reports accuracy.

- Skill: `qhjqhj00/saplma-truthfulness-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/saplma-truthfulness-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/saplma-truthfulness-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/saplma-truthfulness-eval

---


# saplma-truthfulness-eval

> The Internal State of an LLM Knows When It's Lying — Azaria et al. (2023) (arXiv:2304.13734, 2023)

## What this evaluates

Evaluates whether an LLM's internal hidden layer activations can predict the veracity of a given statement. It probes the model's implicit knowledge of truthfulness by training a classifier on neural activations rather than relying on explicit prompting or output probabilities.

## Datasets

- **True-False Dataset** — total ?; splits: train (-1), test (-1)
- **LLM-Generated Statements** — total 245; splits: train (-1), val (-1), test (-1)

## Metrics

- `accuracy` **(primary)** — range: [0, 1]
  - The proportion of correctly classified statements (true or false) out of the total number of evaluated statements.
- `AUC` — range: [0, 1]
  - Area Under the Receiver Operating Characteristic Curve, measuring the model's discriminative ability across classification thresholds.

## Input / output format

**Input**: A single factual statement (sentence).

**Output**: Binary classification label: 'true' or 'false'.

## Scoring recipe

```python
def compute_accuracy(predictions, gold_labels):
    correct = sum(1 for p, g in zip(predictions, gold_labels) if p == g)
    return correct / len(gold_labels)
```

## Common pitfalls

- The evaluation uses a held-out validation set (30% of the generated statements) to determine the optimal classification threshold, rather than a fixed 0.5 cutoff.
- Baselines relying on LLM output probabilities are confounded by token frequency and sentence length, requiring ratio-based normalization or careful prompt design.

## Evidence (verbatim from paper)

> Table 1 and Figure 2 present the accuracy of all the models tested using the OPT-6.7b LLM, for each of the topics, along with the average accuracy. As depicted by the table and figure, SAPLMA clearly outperforms BERT and Few-shot learning, with BERT, 3-shot, and 5-shot learning achieving only slightly above a random guess (0.50).

## Citation

```bibtex
@misc{azaria2023internal,
  title={The Internal State of an LLM Knows When It's Lying},
  author={Azaria et al. (2023)},
  year={2023},
  note={arXiv:2304.13734}
}
```

- arXiv: 2304.13734

