---
title: "NPHardEval Leaderboard: Unveiling the Reasoning Abilities of Large Language Models through Complexity Classes and Dynamic Updates"
description: "NPHardEval is a dynamic LLM reasoning benchmark of 900 automatically generated algorithmic questions: 9 problems (3 P, 3 NP-complete, 3 NP-hard), each at 10 difficulty levels."
url: "https://swe.quest/articles/nphardeval-leaderboard-unveiling-the-reasoning-abilities-of-large-language-a14bdd78f87edd9c"
canonical: "https://huggingface.co/blog/leaderboard-nphardeval"
source: "Hugging Face"
published: "2024-02-02"
difficulty: "medium"
kind: "Research"
reading_minutes: 5
tags: ["evals","llms"]
---

# NPHardEval Leaderboard: Unveiling the Reasoning Abilities of Large Language Models through Complexity Classes and Dynamic Updates

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-02-02, 5 min read, Research. Original: [https://huggingface.co/blog/leaderboard-nphardeval](https://huggingface.co/blog/leaderboard-nphardeval)

## Summary

NPHardEval is a dynamic LLM reasoning benchmark of 900 automatically generated algorithmic questions: 9 problems (3 P, 3 NP-complete, 3 NP-hard), each at 10 difficulty levels. Its questions are refreshed monthly to prevent overfitting and avoid numerical computation so that logical reasoning is measured on its own. Models are scored by Weighted Accuracy, which weights higher difficulty levels linearly more, and by Failure Rate, the share of responses that cannot be parsed. Closed models led, with GPT-4 Turbo best overall. Claude 2 did best on NP-complete questions, and open models such as Yi-34b, Qwen-14b, Phi-2 and Mistral-7b beat closed ones on some tasks. Instructions for reproducing the zero-shot and few-shot runs are included.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- computational complexity classes
- LLM evaluation basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

NPHardEval, GPT-4 Turbo, Claude 2, Hugging Face, NP-hard

## Related posts

- [BigCodeBench: The Next Generation of HumanEval](https://swe.quest/articles/bigcodebench-the-next-generation-of-humaneval-19fbda5688a2d115.md): Hugging Face · 2024-06-18 · Medium · 10 min read · Evaluation, AI for coding, LLMs, Python
  BigCodeBench is a code-generation benchmark of 1,140 Python function-level tasks that require composing calls from 139 libraries.
- [Introducing the Open Chain of Thought Leaderboard](https://swe.quest/articles/introducing-the-open-chain-of-thought-leaderboard-6b7ce484cba7687f.md): Hugging Face · 2024-04-23 · Medium · 10 min read · Evaluation, LLMs
  The Open CoT Leaderboard ranks LLMs by the accuracy gain from chain-of-thought prompting (accuracy with CoT minus loglikelihood accuracy without it) rather than by absolute accuracy, which makes it more robust to training-data contamination.
- [Beat GPT-4o at Python by searching with 100 dumb LLaMAs](https://swe.quest/articles/beat-gpt-4o-at-python-by-searching-with-100-dumb-llamas-907f6997678a8d61.md): Modal · 2024-08-05 · Medium · 7 min read · LLMs, Inference & serving, Evaluation, AI for coding, Serverless
  Sampling LLaMA 3.1 8B Instruct many times and checking each candidate against HumanEval's unit tests raises pass@k from 66.4% at k=1 to 90.5% at k=100, matching GPT-4o's reported 90.2% pass@1, and to 95.1% at k=1000.
- [Fixing Open LLM Leaderboard with Math-Verify](https://swe.quest/articles/fixing-open-llm-leaderboard-with-math-verify-1998ec51368d0a40.md): Hugging Face · 2025-02-14 · Medium · 6 min read · Evaluation, LLMs
  The Open LLM Leaderboard's MATH-Hard evaluation systematically underscored models because its answer pipeline required an exact Minerva-style answer string, parsed answers with SymPy that couldn't handle boxed LaTeX, intervals, matrices or percentages, and compared results without rounding, numeric evaluation, variable assignment or set equivalence.
- [Introducing the LiveCodeBench Leaderboard - Holistic and Contamination-Free Evaluation of Code LLMs](https://swe.quest/articles/introducing-the-livecodebench-leaderboard-holistic-and-contamination-free-cd05ed71356a1cca.md): Hugging Face · 2024-04-16 · Easy · 4 min read · Evaluation, LLMs, AI for coding
  LiveCodeBench is a code-LLM benchmark built from LeetCode, AtCoder and CodeForces contest problems annotated with release dates, so models can be scored only on problems published after their training cutoff to avoid contamination.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
