You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

SHARP

Introduction

SHARP is a corpus for step-level hallucination detection in mathematical reasoning. Open 7B models were asked to solve GSM8K and MATH problems, and a large teacher model then marked the exact fragments of each solution that are wrong or unsupported. The result is a step-labelled corpus that can be used to train Process Reward Models (PRMs), to benchmark error localization, or to study where small models go off the rails.

The corpus is published in two parallel views:

  • step viewSHARP-GSM8K, SHARP-Math. Solutions split into steps with one binary label per step, cut at the first faulty step. This is the format used to train the SHARP PRMs.
  • span viewSHARP-GSM8K-SPAN, SHARP-Math-SPAN. The same solutions, untruncated, carrying the raw <HAL>...</HAL> markup exactly as the annotator produced it.

Row i of a step subset and row i of the matching span subset describe the same solution, so the two views can be joined by position.

Subsets

Config Rows (train / test) Fields
SHARP-GSM8K 7,559 / 840 question, steps, step_labels
SHARP-GSM8K-SPAN 7,559 / 840 question, model_answer, hallucination_annotation
SHARP-Math 10,021 / 1,114 question, steps, step_labels
SHARP-Math-SPAN 10,021 / 1,114 question, model_answer, hallucination_annotation

Step view

{
  "question": "1 chocolate bar costs $1.50 and can be broken into 3 sections ...",
  "steps": [
    "Let's first determine the number of chocolate bars needed. ...",
    "Number of chocolate bars = Number of scouts * S'mores per scout / S'mores per bar ...",
    "Number of chocolate bars = 15 * 2 / 3 = 5 bars"
  ],
  "step_labels": [1, 1, 0]
}

step_labels[i] == 1 means the step is sound, 0 means it contains a hallucination. Because every solution is truncated at its first error, a row has either no zero at all, or exactly one zero as its last label. In other words, steps is always a valid reasoning prefix, and the last step is the first place where the model went wrong.

Span view

{
  "question": "1 chocolate bar costs $1.50 and can be broken into 3 sections ...",
  "model_answer": ["Let's first determine ...", "Number of chocolate bars = ...", "..."],
  "hallucination_annotation": ["Let's first determine ...", "Number of chocolate bars = <HAL>15 * 2 / 3 = 5</HAL> bars", "..."]
}

model_answer is the untruncated generation split on blank lines; hallucination_annotation is the same text with minimal erroneous fragments wrapped in <HAL>...</HAL>. Solutions with no error carry no tags.

Ratio of erroneous to correct steps

The step subsets are balanced at the level of steps, not of records: variants were selected so that the share of label-0 steps in the whole subset hits a target value.

Config Split Records Steps Erroneous Correct Erroneous share Ratio
SHARP-GSM8K train 7,559 31,062 4,746 26,316 15.3% 1 : 5.5
SHARP-GSM8K test 840 3,782 666 3,116 17.6% 1 : 4.7
SHARP-Math train 10,021 53,843 5,384 48,459 10.0% 1 : 9.0
SHARP-Math test 1,114 6,908 691 6,217 10.0% 1 : 9.0

Since truncation leaves at most one erroneous step per record, the share of records that contain an error is much higher than the share of erroneous steps: 62.8% (GSM8K train), 79.3% (GSM8K test), 53.7% (Math train), 62.0% (Math test). Solutions are short — 4.1 steps on average in GSM8K and 5.4 in Math.

For the span subsets the corresponding figures count annotated spans on full, untruncated solutions:

Config Split Records Avg. steps Records with <HAL> Total spans
SHARP-GSM8K-SPAN train 7,559 6.9 4,752 (62.9%) 20,953
SHARP-GSM8K-SPAN test 840 8.5 668 (79.5%) 3,423
SHARP-Math-SPAN train 10,021 8.0 5,386 (53.7%) 35,042
SHARP-Math-SPAN test 1,114 8.9 691 (62.0%) 3,511

Pipeline

1. Problems

GSM8K Math
Source openai/gsm8k (main) qwedsacf/competition_math (train)
Unique problems 8,399 11,135

The GSM8K part draws on both official splits — 7,464 problems come from train and 935 from test — so it must not be used to evaluate a solver on GSM8K test. The train/test split published here is a split of SHARP itself, not of the underlying benchmarks.

2. Generation

Solutions were sampled with vLLM, four independent samples per problem, temperature 0.7, top-p 0.8, using a plain math system prompt asking for step-by-step reasoning with steps separated by blank lines.

GSM8K Math
Generator mistralai/Mistral-7B-Instruct-v0.3 mistralai/Mathstral-7B-v0.1
Max new tokens 2,048 7,168
Raw generations ~32,000 ~40,000

Deliberately choosing mid-sized generators is what makes the corpus useful: their solutions contain a realistic mix of sound and faulty reasoning rather than being almost always right or almost always wrong.

3. Annotation

Every generation was annotated by openai/gpt-oss-120b served with vLLM. The annotator receives the problem and the solution and returns the solution verbatim with the minimal wrong fragments wrapped in <HAL>...</HAL>; a clean solution is returned as the literal string No hallucinations. Annotations that failed to reproduce the source text were repaired or regenerated before the corpus was assembled.

Two more annotators were run for agreement analysis. Over 70,300 commonly annotated solutions, GPT-OSS-120B and Qwen3-235B-A22B-Instruct agree with Cohen's κ of 0.897 on whether a solution contains an error at all, κ 0.689 at the level of individual steps, and they identify the same first faulty step in 65.9% of solutions. Llama-3.3-70B-Instruct agrees markedly less (κ 0.404 per step against GPT-OSS-120B), which is why the released labels come from GPT-OSS-120B.

4. Conversion to step labels

  1. Split the annotated solution into steps on blank lines.
  2. Label a step 0 if any <HAL> span intersects it, otherwise 1.
  3. Truncate steps and step_labels at the first 0, keeping that step. A PRM therefore only ever sees a prefix that is correct up to its final step, which removes the ambiguity of scoring reasoning that continues after an error has already been made.

5. Ratio balancing and splitting

Each problem has four annotated variants, and they differ in how early the model fails. Variants are picked greedily, one per problem, so that the overall share of erroneous steps approaches a target:

  • Math — target 10% applied to the truncated data, hit exactly (10.00% in every split).
  • GSM8K — target 30% applied to the untruncated solutions (28.7% there); after truncation to the first error this corresponds to 15.5% erroneous steps.

The corpus is then split 9:1. For Math the split is computed with a MILP that keeps the erroneous-step share identical in train and test; the GSM8K split is random, which is why its two splits differ slightly (15.3% vs 17.6%).

Usage

from datasets import load_dataset

step = load_dataset("ZaandaTeika/SHARP", "SHARP-Math", split="train")
span = load_dataset("ZaandaTeika/SHARP", "SHARP-Math-SPAN", split="train")

print(step[0]["step_labels"])                 # e.g. [1, 1, 1, 0]
print(span[0]["hallucination_annotation"][0])  # same solution with <HAL> markup

To build a PRM training example, append a <extra_0> marker to every step and join with blank lines:

def build_prompt(question, steps):
    body = "\n\n".join(f"{s.strip()}<extra_0>" for s in steps)
    return f"Question: {question}\n\nSolution:\n{body}"

Models trained on SHARP

Model Base Supervision
Qwen2.5-1.5B-SHARP-Span Qwen2.5-Math-1.5B-Instruct span
Qwen2.5-1.5B-SHARP-Step Qwen2.5-Math-1.5B-Instruct step
Qwen2.5-7B-SHARP-Span Qwen2.5-Math-7B-Instruct span
Qwen2.5-7B-SHARP-Step Qwen2.5-Math-7B-Instruct step

Limitations

  • Labels are model-generated. They come from GPT-OSS-120B, not from humans, and inherit its biases. Per-step agreement with an independent annotator is moderate (κ 0.689), so individual labels are noisier than the solution-level signal.
  • Step boundaries follow blank lines in the generator's output. Where a model wrote a numbered list on consecutive lines, several logical steps can end up inside one step string.
  • The two views are not perfectly aligned token-for-token. The annotator occasionally reflowed whitespace, so stripping the tags from hallucination_annotation does not always reproduce model_answer character for character. In SHARP-GSM8K-SPAN a portion of the error-free rows still carry the annotator's placeholder No hallucinations instead of the solution text.
  • Some MATH problems carry a LaTeX escaping artifact inherited from the source dataset: in 469 rows a \right command was decoded as a carriage return followed by ight.
  • GSM8K problems come from both official splits, so this subset is unsuitable for measuring solver accuracy on GSM8K test.
Downloads last month
18

Models trained or fine-tuned on ZaandaTeika/SHARP