Create README.md
Browse files
README.md
CHANGED
|
@@ -1,101 +1,70 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
dtype: int64
|
| 8 |
-
- name: sat_dimacs
|
| 9 |
-
dtype: string
|
| 10 |
-
- name: unsat_dimacs
|
| 11 |
-
dtype: string
|
| 12 |
-
- name: num_variable
|
| 13 |
-
dtype: int64
|
| 14 |
-
- name: num_clause
|
| 15 |
-
dtype: int64
|
| 16 |
-
- name: solver_metadatas
|
| 17 |
-
struct:
|
| 18 |
-
- name: MCS
|
| 19 |
-
struct:
|
| 20 |
-
- name: conflicts
|
| 21 |
-
dtype: int64
|
| 22 |
-
- name: decisions
|
| 23 |
-
dtype: int64
|
| 24 |
-
- name: propagations
|
| 25 |
-
dtype: int64
|
| 26 |
-
- name: restarts
|
| 27 |
-
dtype: int64
|
| 28 |
-
- name: solvers
|
| 29 |
-
sequence: string
|
| 30 |
-
- name: MUS
|
| 31 |
-
struct:
|
| 32 |
-
- name: conflicts
|
| 33 |
-
dtype: int64
|
| 34 |
-
- name: decisions
|
| 35 |
-
dtype: int64
|
| 36 |
-
- name: propagations
|
| 37 |
-
dtype: int64
|
| 38 |
-
- name: restarts
|
| 39 |
-
dtype: int64
|
| 40 |
-
- name: solvers
|
| 41 |
-
sequence: string
|
| 42 |
-
- name: MaxSAT
|
| 43 |
-
struct:
|
| 44 |
-
- name: conflicts
|
| 45 |
-
dtype: int64
|
| 46 |
-
- name: decisions
|
| 47 |
-
dtype: int64
|
| 48 |
-
- name: propagations
|
| 49 |
-
dtype: int64
|
| 50 |
-
- name: restarts
|
| 51 |
-
dtype: int64
|
| 52 |
-
- name: solvers
|
| 53 |
-
sequence: string
|
| 54 |
-
- name: SATDP_SAT
|
| 55 |
-
struct:
|
| 56 |
-
- name: conflicts
|
| 57 |
-
dtype: int64
|
| 58 |
-
- name: decisions
|
| 59 |
-
dtype: int64
|
| 60 |
-
- name: propagations
|
| 61 |
-
dtype: int64
|
| 62 |
-
- name: restarts
|
| 63 |
-
dtype: int64
|
| 64 |
-
- name: solvers
|
| 65 |
-
sequence: string
|
| 66 |
-
- name: SATDP_UNSAT
|
| 67 |
-
struct:
|
| 68 |
-
- name: conflicts
|
| 69 |
-
dtype: int64
|
| 70 |
-
- name: decisions
|
| 71 |
-
dtype: int64
|
| 72 |
-
- name: propagations
|
| 73 |
-
dtype: int64
|
| 74 |
-
- name: restarts
|
| 75 |
-
dtype: int64
|
| 76 |
-
- name: solvers
|
| 77 |
-
sequence: string
|
| 78 |
-
- name: SATSP
|
| 79 |
-
struct:
|
| 80 |
-
- name: conflicts
|
| 81 |
-
dtype: int64
|
| 82 |
-
- name: decisions
|
| 83 |
-
dtype: int64
|
| 84 |
-
- name: propagations
|
| 85 |
-
dtype: int64
|
| 86 |
-
- name: restarts
|
| 87 |
-
dtype: int64
|
| 88 |
-
- name: solvers
|
| 89 |
-
sequence: string
|
| 90 |
-
splits:
|
| 91 |
-
- name: test
|
| 92 |
-
num_bytes: 156893
|
| 93 |
-
num_examples: 140
|
| 94 |
-
download_size: 78487
|
| 95 |
-
dataset_size: 156893
|
| 96 |
-
configs:
|
| 97 |
-
- config_name: default
|
| 98 |
-
data_files:
|
| 99 |
-
- split: test
|
| 100 |
-
path: data/test-*
|
| 101 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- question-answering
|
| 5 |
+
size_categories:
|
| 6 |
+
- n<1K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
+
# SATQuest Dataset
|
| 9 |
+
|
| 10 |
+
[](https://opensource.org/licenses/MIT)
|
| 11 |
+
[](https://github.com/sdpkjc/SATQuest)
|
| 12 |
+
[](https://pypi.org/project/satquest/)
|
| 13 |
+
|
| 14 |
+
**TL;DR.** Synthetic CNF benchmark for LLM reasoning: **140** matched SAT/UNSAT pairs with `n in [3, 16]` and fixed ratio `m=4n`. The dataset stores only CNF formulas and solver stats; use the [`SATQuest`](https://github.com/sdpkjc/SATQuest) Python library to render prompts/answers for SATDP, SATSP, MaxSAT, MCS, and MUS in four formats (math, DIMACS, story, dual story).
|
| 15 |
+
|
| 16 |
+
## Data fields
|
| 17 |
+
|
| 18 |
+
- `id`: unique identifier for each row.
|
| 19 |
+
- `num_literal`: total number of literals in the unsatisfiable formula.
|
| 20 |
+
- `sat_dimacs`: DIMACS representation of the satisfiable CNF.
|
| 21 |
+
- `unsat_dimacs`: DIMACS representation of the unsatisfiable CNF.
|
| 22 |
+
- `num_variable`: number of variables n, between 3 and 16.
|
| 23 |
+
- `num_clause`: number of clauses `m` in the CNF, with `m=4n`.
|
| 24 |
+
- `solver_metadatas`: dictionary of PySAT solver statistics (conflicts, decisions, propagations, restarts) for SATSP, MaxSAT, MCS, MUS, SATDP_SAT and SATDP_UNSAT tasks.
|
| 25 |
+
|
| 26 |
+
## Quick usage
|
| 27 |
+
|
| 28 |
+
Install the package and load a CNF instance:
|
| 29 |
+
|
| 30 |
+
```python
|
| 31 |
+
from datasets import load_dataset
|
| 32 |
+
from satquest import CNF, create_problem, create_question
|
| 33 |
+
|
| 34 |
+
item = load_dataset('sdpkjc/SATQuest', split='test')[0]
|
| 35 |
+
cnf = CNF(dimacs=item['sat_dimacs'])
|
| 36 |
+
|
| 37 |
+
problem = create_problem('SATSP', cnf) # or 'SATDP', 'MaxSAT', 'MCS', 'MUS'
|
| 38 |
+
question = create_question('math') # or 'dimacs', 'story', 'dualstory'
|
| 39 |
+
prompt = problem.accept(question)
|
| 40 |
+
answer = problem.solution # reference answer
|
| 41 |
+
reward = int(problem.check(answer)) # 1 if answer is correct, 0 otherwise
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Reproducing the dataset
|
| 45 |
+
|
| 46 |
+
To build an identical dataset from scratch, clone the repository and run the provided generation script:
|
| 47 |
+
|
| 48 |
+
```bash
|
| 49 |
+
pip install datasets numpy tyro
|
| 50 |
+
git clone https://github.com/sdpkjc/SATQuest.git
|
| 51 |
+
cd SATQuest
|
| 52 |
+
|
| 53 |
+
# produce the evaluation set (140 CNF pairs)
|
| 54 |
+
python gen_cnf_dataset.py --hf-entity {YOUR_HF_ENTITY} --seed 9527
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## Citation
|
| 58 |
+
|
| 59 |
+
Please cite the SATQuest paper if you use this dataset:
|
| 60 |
+
|
| 61 |
+
```bibtex
|
| 62 |
+
@misc{satquest2025,
|
| 63 |
+
author = {Yanxiao Zhao, Yaqian Li, Zihao Bo, Rinyoichi Takezoe, Haojia Hui, Mo Guang, Lei Ren, Xiaolin Qin, Kaiwen Long},
|
| 64 |
+
title = {SATQuest: A Verifier for Logical Reasoning Evaluation and Reinforcement Fine-Tuning of LLMs},
|
| 65 |
+
year = {2025},
|
| 66 |
+
publisher = {GitHub},
|
| 67 |
+
journal = {GitHub repository},
|
| 68 |
+
howpublished = {\url{https://github.com/sdpkjc/SATQuest}},
|
| 69 |
+
}
|
| 70 |
+
```
|