Abstract
The scarcity and high cost of high-quality question-answering (QA) datasets hinder supervised fine-tuning (SFT) for domain-specific large language models (LLMs). To address this, we introduce D-SCoRE, a training-free pipeline that utilizes LLMs and prompt engineering to produce diverse, high-quality QA datasets from arbitrary textual sources. D-SCoRE integrates Document-centric processing, Segmentation, CoT Reasoning, and structured Export to generate QA-COT datasets tailored for domain-aware SFT. Multi-dimensional control mechanisms, such as semantic role transformation, question type balancing, and counterfactual materials, enhance diversity and relevance, overcoming limitations of existing QA generation. LLMs fine-tuned on D-SCoRE-generated QA datasets, and human-annotated QA datasets (SQuAD, Covid-QA) are evaluated on SQuADShifts and Covid-QA test sets, with D-SCoRE outperforming across most domains. D-SCoRE generates six QA-CoT pairs with four-option counterfactual materials per 100-200-word text in 90 seconds using an 8B LLM on consumer-grade hardware. Its simplicity and scalability enable efficient QA generation and high-performance fine-tuning across domains.
Introduction
Supervised fine-tuning (SFT) is essential for adapting Large Language Models (LLMs) to specific domains. However, the primary bottleneck remains the availability of high-quality data. Manual annotation of question-answering (QA) pairs is expensive, slow, and often results in "extractive" datasets that lack deep reasoning. Existing synthetic methods often fail to provide the logical complexity required for advanced reasoning tasks.
D-SCoRE (Document-Centric Segmentation and CoT Reasoning with Structured Export) is a training-free framework designed to transform raw text into high-octane reasoning data. By generating synthetic QA pairs enriched with Chain-of-Thought (CoT) traces, D-SCoRE enables models to match or exceed the performance of those trained on gold-standard human-annotated benchmarks.
The D-SCoRE Pipeline
The D-SCoRE architecture consists of a three-stage core pipeline designed to ensure data diversity, logical depth, and factual grounding.
- QA Generation with CoT Reasoning: Documents are segmented, and an LLM is prompted to generate a balanced mix of explicit questions (fact retrieval) and implicit questions (inference/synthesis). Implicit questions are accompanied by step-by-step logical paths, or "CoT traces."
- QA Quality Control: To mitigate hallucinations, a "Critic" model performs fidelity checks. This heterogeneous approach—using a different model for validation than for generation—is critical to maintaining high data quality.
- Counterfactual Material Generation: The pipeline generates plausible but incorrect "distractor" options for each QA pair. This transforms the data into multiple-choice challenges that improve model robustness against nuanced semantic deviations.
Experimental Setup
The researchers evaluated D-SCoRE using the raw text from the SQuAD (Stanford Question Answering Dataset) training set to generate synthetic pairs. To test generalization, they utilized SQuADShifts, which includes domain-specific subsets from Amazon, the New York Times (NYT), New Wiki, and Reddit. These datasets represent out-of-distribution tasks that challenge a model's ability to reason across different contexts.
Results and Analysis
The evaluation demonstrated that models fine-tuned on D-SCoRE-generated data consistently outperformed those trained on human-annotated "SQuAD Gold" baselines, often using significantly fewer training examples.
A key finding is the impact of "Implicit QA Ratios." Performance improved monotonically as the proportion of reasoning-heavy implicit questions increased. Configurations with 80% to 120% implicit questions delivered the best results across all tested domains. This suggests that learning the process of reasoning through CoT traces enhances the model's overall textual understanding, even for simpler extractive tasks.
Furthermore, the heterogeneous pipeline proved essential. Smaller models, such as the 4B variant, saw dramatic gains (up to 32.02% in F1 score) when the quality control stage was handled by a distinct, high-quality model.
Conclusion
D-SCoRE provides a scalable and efficient solution for generating high-quality SFT data. By prioritizing reasoning-rich implicit questions and implementing rigorous quality control, the framework allows models to achieve superior cross-domain generalization. With a throughput of over 1,100 QA pairs per GPU-hour on consumer-grade hardware, D-SCoRE democratizes high-performance domain adaptation for researchers and developers alike.
Summary updated