SATQuest-RFT-3k / README.md
sdpkjc's picture
Create README.md
70e819a verified
metadata
license: mit
task_categories:
  - question-answering
size_categories:
  - 1K<n<10K

SATQuest Dataset

License MIT GitHub Repo PyPI

TL;DR. Synthetic CNF benchmark for LLM reasoning: 3000 matched SAT/UNSAT pairs with n in [3, 8] and ratio m in [2.1n, 4n]. The dataset stores only CNF formulas and solver stats; use the SATQuest Python library to render prompts/answers for SATDP, SATSP, MaxSAT, MCS, and MUS in four formats (math, DIMACS, story, dual story).

Data fields

  • id: unique identifier for each row.
  • num_literal: total number of literals in the unsatisfiable formula.
  • sat_dimacs: DIMACS representation of the satisfiable CNF.
  • unsat_dimacs: DIMACS representation of the unsatisfiable CNF.
  • num_variable: number of variables n, between 3 and 16.
  • num_clause: number of clauses m in the CNF, with m=4n.
  • solver_metadatas: dictionary of PySAT solver statistics (conflicts, decisions, propagations, restarts) for SATSP, MaxSAT, MCS, MUS, SATDP_SAT and SATDP_UNSAT tasks.

Quick usage

Install the package and load a CNF instance:

from datasets import load_dataset
from satquest import CNF, create_problem, create_question

item = load_dataset('sdpkjc/SATQuest', split='test')[0]
cnf = CNF(dimacs=item['sat_dimacs'])

problem = create_problem('SATSP', cnf) # or 'SATDP', 'MaxSAT', 'MCS', 'MUS'
question = create_question('math')  # or 'dimacs', 'story', 'dualstory'
prompt = problem.accept(question)
answer = problem.solution  # reference answer
reward = int(problem.check(answer))  # 1 if answer is correct, 0 otherwise

Reproducing the dataset

To build an identical dataset from scratch, clone the repository and run the provided generation script:

pip install datasets numpy tyro
git clone https://github.com/sdpkjc/SATQuest.git
cd SATQuest

# produce the train set (3000 CNF pairs)
python gen_cnf_rft_dataset.py --hf-entity {YOUR_HF_ENTITY} --seed 9527

Citation

Please cite the SATQuest paper if you use this dataset:

@misc{satquest2025,
  author = {Yanxiao Zhao, Yaqian Li, Zihao Bo, Rinyoichi Takezoe, Haojia Hui, Mo Guang, Lei Ren, Xiaolin Qin, Kaiwen Long},
  title = {SATQuest: A Verifier for Logical Reasoning Evaluation and Reinforcement Fine-Tuning of LLMs},
  year = {2025},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/sdpkjc/SATQuest}},
}