GraSP: A Unified Graph-Based Framework for Scalable Generation, Quality Tagging, and Management of Synthetic Data for SFT and DPO

Bidyapati Pradhan, Surajit Dasgupta, Amit Kumar Saha, Omkar Anustoop, Vipul Mittal, Gopal Sarda · 2025

Read GraSP: A Unified Graph-Based Framework for Scalable Generation, Quality Tagging, and Management of Synthetic Data for SFT and DPO by Bidyapati Pradhan, Surajit Dasgupta, Amit Kumar Saha, Omkar Anustoop, Vipul Mittal, Gopal Sarda (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-15432.txt.

Introduction

Bidyapati Pradhan and co-authors present SyGra, a graph-based system for making fake training data, in work from 2025. Large language models need vast, clean data for fine-tuning and for learning from ranked answers. Hand-made data is slow and costly to build at scale, so teams turn to data made by models.

SyGra runs a modular pipeline that models complex dialogue flows with little hand work. A two-stage tagging step mixes fixed rules with model grading to score and filter samples. Output fits a flexible schema for both training styles. The authors frame the system as a way to cut prep time in model training.

Catalog record

CREATORBidyapati Pradhan, Surajit Dasgupta, Amit Kumar Saha, Omkar Anustoop, Vipul Mittal, Gopal Sarda
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE25 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2508-15432

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

GraSP: A Unified Graph-Based Framework for Scalable Generation, Quality Tagging, and Management of Synthetic Data for SFT and DPO Bidyapati Pradhan, Surajit Dasgupta, Amit Kumar Saha, Omkar Anustoop, Vipul Mittal, Gopal Sarda Abstract The advancement of large language models (LLMs) is critically dependent on the availability of high-quality datasets for Supervised Fine-Tuning (SFT), alignment tasks like Direct Preference Optimization (DPO), etc. In this work, we present a comprehensive synthetic data generation framework that facilitates scalable, configurable, and high-fidelity generation of synthetic data tailored for these training paradigms. Our approach employs a modular and configuration-based pipeline capable of modeling complex dialogue flows with minimal manual intervention. This framework uses a dual-stage quality tagging mechanism, combining heuristic rules and LLM-based evaluations, to automatically filter and score data extracted from OASST-formatted conversations, ensuring the curation of high-quality dialogue samples. The resulting datasets are structured under a flexible schema supporting both SFT and DPO use cases, enabling seamless integration into diverse training workflows. Together, these innovations offer a robust solution for generating and managing synthetic conversational data at scale, significantly reducing the overhead of data preparation in LLM training pipelines. Keywords: Synthetic Data, LLM, DPO, SFT, Graph Pipeline, LangGraph, OASST, Data Generation Framework, Quality Tagging 1 Introduction The rapid progress of large language models (LLMs) and multimodal AI systems has heightened the demand for large-scale, high-quality training and evaluation datasets Brown et al. 2020 ; Touvron et al. 2023 ; OpenAI 2023 . Yet, the cost, bias, and limited availability of annotated real-world data present major barriers Yu et al. 2024 . This is especially true in areas like instruction tuning, tool-use supervision, multi-agent interactions, and safety evaluation, where fine-grained control over structure, diversity, and task complexity is essential Ouyang et al. 2022 ; Schick et al. 2023 . Synthetic data , generated via LLMs and automated pipelines, offers greater flexibility and control than traditional datasets. Achieving this at scale, however, poses significant challenges: designing complex, branching workflows that mirror task hierarchies; orchestrating diverse model backends, APIs, and tool calls; enforcing validation and schema compliance across large, heterogeneous outputs; and enabling resumability, sharding, and streaming for scalable, fault-tolerant execution. Reusable, modular flows are also vital for maintainable pipelines. For teams building domain-specific assistants—such as AI copilots, ticket triaging agents, or safety evaluators—these challenges lead to higher manual effort and slower iteration. A framework is needed that automates high-quality data generation, supports structured outputs and multimodal inputs, and streamlines augmentation—ultimately accelerating the development of custom LLMs for enterprise and research applications. To address this, we introduce GraSP, a general-purpose framework for scalable synthetic data generation. GraSP combines low-code, YAML-based configuration with modular, graph-driven orchestration to support complex workflows with branching, looping, and conditionals. It enables the reuse of graphs as subgraphs, ensures reliable execution through integrated validation and checkpointing, and natively supports multimodal inputs and agent based data generation. Additionally, GraSP offers unified dataset I/O across HuggingFace and local formats, supports quality tagging, and produces outputs compatible with OASST-style formatting for seamless downstream use. 2 Related Work Table 1 : Comparison of GraSP with popular frameworks across key capabilities. Category Feature GraSP Distilabel SDG Curator Synthetic Data Kit Execution & Authoring Async Execution ✓ ✓ ✓ ✓ ✓ Low-Code Authoring ✓ ✗ ✓ ✗ ✓ UI-Based Flow Config \triangle ✗ ✓ ✓ ✗ Workflow Orchestration Configuration-driven Complex Flow ✓ ✓ * ✓ * Reusable Subgraphs ✓ ✗ ✗ ✗ ✗ Evaluation & Integration Quality Tagging ✓ ✓ * * ✓ HuggingFace Integration ✓ ✓ ✓ ✓ ✓ Agent/Tool Support ✓ ✓ ✗ ✗ ✗ Multimodality Multimodal Input ✓ * ✗ * * Multimodal Output ✗ ✗ ✗ ✗ ✗ • ✓: Supported ✗ : Not Supported \triangle : Work in Progress *: Partial Support Recent years have seen rapid progress in the development of synthetic data generation frameworks and instruction-tuning toolkits, with each system making distinct trade-offs across orchestration, extensibility, code abstraction, and multimodal support. Table 1 summarizes core capabilities across representative frameworks like Distilabel 1 1 1 https://distilabel.argilla.io/latest/ , SDG 2 2 2 https://github.com/argilla-io/synthetic-data-generator , Curator 3 3 3 https://github.com/bespokelabsai/curator , and Synthetic Data Kit 4 4 4 https://github.com/meta-llama/synthetic-data-kit . • Existing data generation frameworks address only subsets of the end-to-end data generation pipeline, leaving gaps in orchestration, extensibility, and multimodal support. • Most tools support some combination of asynchronous execution, low-code authoring, configuration-driven flows, and HuggingFace integration, but often lack reusable subgraphs, seamless UI-based workflow design, comprehensive agent/tool support, and integrated quality tagging. • UI-based flow configuration is present in some tools (e.g., Curator), but these typically lack robust agent capabilities, multimodal I/O, or subgraphs. In summary, while existing frameworks each offer valuable features for synthetic data generation, they typically address isolated aspects of the broader workflow. GraSP stands out by providing a unified, extensible approach that brings together the critical capabilities needed for modern, complex, and multimodal data generation pipelines. 3 GraSP Framework GraSP is a modular and extensible system designed for large-scale, programmable data generation. It supports configurable orchestration through a graph abstraction that enables reusable, auditable, and resumable workflows. The framework is designed for both research and production pipelines, with pluggable model backends and modular task authoring support. Figure 1 : High-level GraSP architecture. 3.1 System Architecture GraSP is guided by three principles— Scalability (streaming data sources, resumable jobs, JSONL/Parquet/HF outputs), Modularity (YAML-defined DAG workflows with conditional logic), and Reusability (versioned, reusable graphs, nodes, and validators). Figure 1 shows its core components: 1. Data I/O : Unified loader/sink for HuggingFace or local CSV, JSON(L), and Parquet in batch or streaming modes. 2. Graph Construction : YAML-defined DAG of nodes (LLM calls, transformations) with conditional edges and pre/post hooks, compiled via LangGraph. 3. Execution Engine : Asynchronous runtime coordinating local Python steps and remote inference (HTTP, OpenAI, Mistral) across VLLM, TGI, OLLAMA and Azure backends, with built-in retries and failure tracing. 4. Structured Output & Resumability : Generates OASST-compatible Köpf et al. 2023 records and tracks progress metadata for fault-tolerant, restartable runs. 3.2 Pipeline Components GraSP pipelines are defined declaratively in YAML, promoting low-code, reproducible workflow construction. Each pipeline consists of three configuration blocks: Data Configuration ( data_config ). Specifies input and output sources, format handling (CSV, JSONL, Parquet), streaming options, and inline preprocessing (e.g., renaming, filtering, combining). Supports both data-backed and data-less generation scenarios. Graph Configuration ( graph_config ). Defines a DAG of computational nodes, including LLM calls, lambdas, agents, or subgraphs. Supports conditional branching, step-wise pre/post-processing, and is compiled to a LangGraph-compatible representation. Output Configuration ( output_config ). Controls how graph states are serialized into structured output. Users can declaratively map, transform, or customize output using Python hooks to match target schemas like OASST. Schema Validation. Ensures output integrity via type and rule-based validation. Schemas can be defined in YAML or Python (e.g., Pydantic), with invalid records automatically skipped and logged. Refer to Appendix A for detailed configuration options and schema definitions. 3.3 Key Features GraSP brings together robust design abstractions and practical scalability for real-world use cases. Specifically, our contributions include: 1. Low-Code, Modular Graph Configuration: GraSP combines a YAML-based interface with LangGraph-style agents and a custom DAG engine, enabling concise, extensible definitions of complex workflows with branching, looping, and conditionals. B ⬇ data_config : source : type

Read the complete text