# Faithfulness Eval

> Evaluates the faithfulness and causal alignment of chain-of-thought reasoning in LLMs by measuring how much the final answer depends on the generated reasoning steps versus the original question. It uses causal mediation analysis to compute indirect and direct effects, and a simulator-based metric to quantify rationale faithfulness. Use when the user wants to benchmark on StrategyQA, GSM8K, Causal Understanding, Quarel, OpenBookQA, QASC, or asks about evaluating this task. Reports Controlled Indirect Effect.

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

---


# faithfulness-eval

> Making Reasoning Matter: Measuring and Improving Faithfulness of Chain-of-Thought Reasoning — First Author et al. (2024) (arXiv:2402.13950, 2024)

## What this evaluates

Evaluates the faithfulness and causal alignment of chain-of-thought reasoning in LLMs by measuring how much the final answer depends on the generated reasoning steps versus the original question. It uses causal mediation analysis to compute indirect and direct effects, and a simulator-based metric to quantify rationale faithfulness.

## Datasets

- **StrategyQA** — total ?; splits: test (-1)
- **GSM8K** — total 8500; splits: test (-1)
- **Causal Understanding** — total ?; splits: test (-1)
- **Quarel** — total ?; splits: test (-1)
- **OpenBookQA** — total ?; splits: test (-1)
- **QASC** — total ?; splits: test (-1)

## Metrics

- `Controlled Indirect Effect` **(primary)** — range: percent
  - CIE = Avg. Acc(Y|X0, R0) - Avg. Acc(Y|X0, R1), where X0 is the original question, R0 is the original reasoning chain, and R1 is a counterfactual/intervened reasoning chain.
- `Controlled Direct Effect` — range: percent
  - CDE = Avg. Acc(Y|X0, R0) - Avg. Acc(Y|X1, R0), where X1 is a counterfactual/intervened question.
- `Faithfulness (LAS)` — range: percent
  - LAS = Acc(qr -> a') - Acc(q -> a'), measuring how much a simulator's prediction accuracy improves when given both question and rationale versus question alone.

## Input / output format

**Input**: Question or problem instance (X), optionally paired with a reasoning chain (R). For causal analysis, original and counterfactual versions of questions and rationales are provided.

**Output**: Final answer (Y) and/or reasoning chain (R). Models generate rationales and answers, which are then evaluated by a simulator or compared against gold answers.

## Scoring recipe

```python
def compute_cie(acc_original, acc_cf_rationale):
    return acc_original - acc_cf_rationale

def compute_cde(acc_original, acc_cf_question):
    return acc_original - acc_cf_question

def compute_las(acc_with_rationale, acc_without_rationale):
    return acc_with_rationale - acc_without_rationale

# CIE: Avg. Acc(Y|X0,R0) - Avg. Acc(Y|X0,R1)
# CDE: Avg. Acc(Y|X0,R0) - Avg. Acc(Y|X1,R0)
# LAS: Acc(qr -> a') - Acc(q -> a')
```

## Common pitfalls

- Using human-written rationales instead of the silver rationales generated by GPT-3 (Text-Davinci-003) as specified in the protocol.
- Failing to sample exactly 2 counterfactual rationales per instance with temperature 0.5 for the causal mediation analysis.
- Confusing natural vs. controlled indirect effects; controlled effects use GPT-4 generated chains for models <20B parameters, while natural effects use chains from the model itself.

## Evidence (verbatim from paper)

> To evaluate the causal effects, we report the average indirect and direct effects of the LLMs. We use the following formula to calculate the scores: IE = Avg. Acc(Y|X0,R0)-Avg. Acc(Y|X0,R1), and DE = Avg. Acc(Y|X0,R0)-Avg. Acc(Y|X1,R0) where X0 and R0 original reasoning problem and reasoning chains. We measure two different kinds of causal effects: natural and controlled for different types of LLMs. Natural Indirect Effect: for models that have emergent capabilities (>$100$B parameters) of generating plausible reasoning chains, we measure the causal effect of X on Y that uses R generated by the same model. Controlled Indirect Effect: for models with <$20$B parameters, we evaluate the causal effect by providing reasoning chains generated by GPT-4. Further, to measure the robustness of models, we use controlled indirect effect. Faithfulness. To evaluate the faithfulness of the rationales generated by the small-sized models, we use LAS (Hase et al., 2020) to measure how well the rationales help a simulator to predict a student’s predictions a’, namely Acc(qr –> a’) - Acc(q –> a’).

## Citation

```bibtex
@misc{firstauthor2024frodo,
  title={Making Reasoning Matter: Measuring and Improving Faithfulness of Chain-of-Thought Reasoning},
  author={First Author et al. (2024)},
  year={2024},
  note={arXiv:2402.13950}
}
```

- arXiv: 2402.13950

