# InternScience/GraphGen

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

Repository: https://github.com/InternScience/GraphGen
Canonical: https://ross.abutalabs.com/products/graphgen
Homepage: https://chenzihong.gitbook.io/graphgen-cookbook/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: ai4science, data-generation, llm-training, sft-data, pretrain, qa, qwen, sft, knowledge-graph, llm, xtuner, data-synthesis, llama-factory, pretraining, question-answering, graphgen
Last push: 2026-08-17T03:57:29+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 18, longevity 43
- inputs: {"age_days": 602, "days_push": 16, "days_rel": 337, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1212, forks 97 (observed 2026-08-28T04:04:00.330734+00:00)

## What it is
GraphGen is a Python framework for knowledge-graph-guided synthetic data generation for LLM training. It builds fine-grained knowledge graphs from source text, identifies knowledge gaps via expected calibration error, and generates targeted QA pairs for supervised fine-tuning.

## Use cases
- generate synthetic sft training data for llms
- build qa pairs from documents using knowledge graphs
- create fine-tuning datasets for domain-specific knowledge
- synthesize long-tail knowledge data for model training
- generate evaluation datasets for llm benchmarks
- extract knowledge graphs from text corpora

## When to choose
- you need synthetic instruction or QA data to fine-tune an LLM
- domain-specific or long-tail knowledge is scarce in your training corpus
- you want calibration-aware prioritization of what data to generate
- you plan to train with LLaMA-Factory or xtuner

## When to avoid
- you need general-purpose data labeling or annotation tools
- you lack access to an LLM to drive the generation pipeline
- you want simple paraphrase-style augmentation without knowledge graph overhead

## Facets
- artifact type: framework
- maturity: active
- function: data-generation, rag, llm-training, nlp, machine-learning
- domain: large-language-models, machine-learning
- platform: python, cli, cross-platform
- tags: synthetic-data, knowledge-graph, sft, qa-pairs, fine-tuning, data-synthesis, llm, data-engineering, natural-language-processing

## Member repositories
- InternScience/GraphGen (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:00.330734+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:17:58.364313+00:00, confidence not recorded.
  - readme: https://github.com/InternScience/GraphGen (fetched 2026-08-28T04:04:00.330734+00:00, sha f42b19d94647)
  - homepage: https://chenzihong.gitbook.io/graphgen-cookbook/ (fetched 2026-08-29T12:25:53.022313+00:00, sha 1ee4fd530386)
- Data as of 2026-08-30T08:39:29.467469+00:00.
