Datasets:
The dataset viewer is not available for this subset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
LLM Next Prime Dataset
This dataset contains factual observations from experiments recording how different large language models answer next-prime questions in three execution modes.
Each question has the form:
What is the smallest prime number that is strictly greater than
n?
One dataset row corresponds to:
one input number × one model × one mode
The goal is not to provide a definitive benchmark ranking. The dataset is intended as raw experimental material for analyzing model behavior, tool use, latency, cost, and failure modes on a simple but objectively checkable numerical task.
Quick start
from datasets import load_dataset
df = load_dataset("hoololi/llm-next-prime", split="train").to_pandas()
df.head()
Or with pandas:
import pandas as pd
df = pd.read_parquet("next_prime_20260821.parquet")
Experiment setup
Models were queried through OpenRouter. For each input number and each model, the experiment was run in three modes:
- raw: the model answers the question directly.
- prompted: the model receives a more explicit prime-number-oriented system prompt.
- tool: the model may call a deterministic local
next_prime(n)tool, then produce a final answer.
The correct result was computed locally with Python prime-checking utilities and was not included in the prompt.
Dataset composition
The current published file contains:
100 input cases × 23 models × 3 modes = 6900 rows
This revision adds observations for inception/mercury-2, a diffusion-style language model, to the previous 22-model dataset. This makes it possible to compare its speed, cost, reliability, and accuracy against the autoregressive models already included in the dataset.
The 100 input numbers were generated with a fixed seed and balanced across magnitude ranges:
1–99100–9991,000–9,99910,000–99,999100,000–999,999
There are 20 cases per range.
Revisions
- 2026-07-22 initial release: 100 cases, 22 models, 3 modes, 6,600 rows.
- 2026-08-21 revision: adds
inception/mercury-2, giving 23 models and 6,900 rows.
Important fields
Core task fields:
task_type: experiment type, herenext_prime.operation_id: case identifier.operation: question sent to the model.correct_result: smallest prime strictly greater than the input number.input_number: value ofn.magnitude_group: order-of-magnitude group, such as10^3.distance_to_next_prime:correct_result - input_number.input_is_prime: whether the input number itself is prime.
Model and mode fields:
model_familymodelmodemodel_providermodel_label
Answer/evaluation fields:
answer_text: final model response text.extracted_answer: numeric answer extracted fromanswer_text.final_result_correct: whether the final extracted answer equalscorrect_result.run_success: whether the model call produced a usable final response.run_error: captured error message, if any.latency_secondscostinput_tokens,output_tokens,total_tokens
Tool fields:
tool_calledtool_call_counttool_expression: tool input, represented as text for compatibility with the arithmetic dataset.tool_resulttool_result_correcttool_errortool_error_typetool_calls: nested details of tool calls when available.
Notes on interpretation
final_result_correct is strict: it evaluates the final model answer after numeric extraction. In tool mode, this can differ from tool_result_correct.
For example, a model may successfully call the tool and receive the correct result, but then fail to produce a final answer or produce a final answer that is not cleanly extractable. These cases are intentionally preserved because they reveal end-to-end agent reliability issues.
Useful derived metrics include:
- final-answer accuracy: mean of
final_result_correct; - tool-output accuracy: mean of
tool_result_correctfor tool-mode rows; - recoverable tool accuracy: whether either the final answer or the tool output was correct.
Error message redaction
Provider error messages were redacted before publication to remove account-specific identifiers such as OpenRouter user IDs. Provider names, error codes, rate-limit messages, and endpoint errors are otherwise preserved when available, because they are useful for analyzing run failures.
Suggested analysis questions
This dataset can be used to investigate:
- accuracy by input magnitude and mode;
- end-to-end accuracy versus accuracy among successful responses only;
- whether tool use removes the magnitude-dependent accuracy drop;
- latency and cost by model family and mode;
- run failure rates by model and provider;
- tool-call success versus final-answer success;
- wrong-answer distance from the correct next prime;
- cost/latency/accuracy trade-offs.
Limitations
- Results are raw observations from specific provider setups, model lists, prompt designs, tool interfaces, and run dates.
- Model/provider versions and routing can change over time.
- Cost and token metadata depend on provider reporting and may be missing for some rows.
- The dataset is not intended as a definitive benchmark leaderboard.
- Tool mode evaluates an agentic pipeline, not just the mathematical correctness of the local tool.
License
Released under CC BY 4.0.
- Downloads last month
- 46