StackMap
Subscribe
Explore / GraphGen
InternScience

GraphGen

KG-guided synthetic SFT data: builds a knowledge graph from source text, finds the LLM's knowledge gaps via calibration error, and generates targeted long-tail QA pairs. ACL-published.

1,159 85 Python Apache-2.0updated 2 months ago
View on GitHubDispute this mapping →
Curator's take

The interesting bit isn't "synthetic QA" — it's targeting: GraphGen measures the student model's expected calibration error to find what it *doesn't* know, then samples multi-hop KG neighborhoods to generate exactly those long-tail QA pairs. Use it when domain-adapting a model and naive synthetic data keeps rehearsing what the model already knows. Output feeds straight into LLaMA-Factory or xtuner. NOT a general data-prep system — it makes QA-style SFT/pretrain data from documents, nothing else; for cleaning, filtering and pipeline plumbing you still want an operator system like DataFlow.

Mapped by ShipWithAI editors · links verified
README.md

stars forks open issues issue resolution documentation pypi wechat arXiv Hugging Face

Hugging Face Model Scope

GraphGen: Enhancing Supervised Fine-Tuning for LLMs with Knowledge-Driven Synthetic Data Generation

English | 中文

📚 Table of Contents

📝 What is GraphGen?

GraphGen is a framework for synthetic data generation guided by knowledge graphs. Please check the paper and best practice.

It begins by constructing a fine-grained knowledge graph from the source text,then identifies knowledge gaps in LLMs using the expected calibration error metric, prioritizing the generation of QA pairs that target high-value, long-tail knowledge. Furthermore, GraphGen incorporates multi-hop neighborhood sampling to capture complex relational information and employs style-controlled generation to diversify the resulting QA data.

After data generation, you can use LLaMA-Factory and xtuner to finetune your LLMs.

📌 Latest Updates

  • 🎉 2026.04.13: The paper based on GraphGen, Knowledge-to-Verification: Exploring RLVR for LLMs in Knowledge-Intensive Domains, has been accepted to the ACL 2026 Main Conference! Congratulations! [arXiv][Code]
  • 2026.02.04: We support HuggingFace Datasets as input data source for data generation now.
  • 2026.01.15: LLM benchmark synthesis now supports single/multiple-choice & fill-in-the-blank & true-or-false—ideal for education 🌟🌟
History
  • 2025.12.26: Knowledge graph evaluation metrics about accuracy (entity/relation), consistency (conflict detection), structural robustness (noise, connectivity, degree distribution)
  • 2025.12.16: Added rocksdb for key-value storage backend and kuzudb for g

Continue your stack

What teams reach for next — and why each earns a place beside GraphGen. Ranked by curator confidence.