Evaluating and Improving Graph to Text Generation with Large Language Models

Jie He, Yijun Yang, Wanqiu Long, Deyi Xiong, Victor Gutierrez-Basulto, Jeff Z. Pan

Converting structured data—like the "triplets" found in knowledge graphs—into fluent, accurate natural language is a cornerstone of making AI more reliable and interpretable. However, even the most advanced Large Language Models (LLMs) often stumble when the underlying graph becomes complex.

A new paper, "Evaluating and Improving Graph to Text Generation with Large Language Models," tackles this head-on. The authors investigate why LLMs fail at graph verbalization and introduce a novel dataset and training methodology to fix it.

TL;DR

The authors identify that LLMs struggle with "planning" and "grounding" when converting complex graphs to text. They introduce PlanGTG, a new dataset that teaches models to explicitly reorder graph triplets and attribute facts in the generated text, leading to significant gains in accuracy and a reduction in hallucinations.

What Problem Does This Paper Address?

Knowledge graphs store information in triplets: <subject, relation, object> (e.g., <Houston, is the largest city of, Texas>). Converting these into a coherent paragraph is known as graph-to-text generation.

While LLMs are impressive, they face two major hurdles here:

  1. Planning: As the number of triplets increases, models struggle to decide the best narrative order, often leading to disjointed or repetitive text.
  2. Hallucination: Models frequently "fill in the blanks" with information not present in the graph or misattribute relations between entities.

The authors found that simply "prompting" models (even with clever few-shot examples) only yields marginal improvements. The real bottleneck is the model's internal ability to plan the structure of the output.

Methods

The researchers proposed a two-pronged approach: improving how we select examples for prompting and creating a superior fine-tuning pipeline.

1. DDD Selection (Difficulty-Diversity Balanced)

For few-shot prompting, the authors found that picking the "most similar" examples isn't always best. They proposed DDD, a method that selects demonstrations that are moderately difficult (not too similar, not too different) and diverse (covering different clusters of graph structures).

2. The PlanGTG Pipeline

The core contribution is the PlanGTG (Planning for Graph-to-Text Generation) dataset. Unlike standard datasets that just pair a graph with a sentence, PlanGTG introduces two intermediate sub-tasks:

  • Reordering: The model must first output the triplets in the specific order they will appear in the final text.
  • Attribution: The model must insert markers (e.g., (1), (2)) into the generated text to cite exactly which triplet provided which piece of information.

This process is illustrated in the construction pipeline and training methodology:

Figure 1: (a) The flow chart of the construction for the PlanGTG dataset, the squared text refers to the output of GPTs and the circled text represents the result extracted automatically by rules. The newly added information by GPTs is marked in bold. (b) Our training pipeline: The training methodology consists of two phases: planning-guided generation and attribution generation. It enables LLMs to first generate triplets that follow a more natural language order and subsequently guide the generation of attributed answers.

Datasets

The study utilizes several benchmarks:

  • WebNLG17 & WebNLG20: Standard benchmarks for RDF-to-text generation.
  • DART: A large-scale, open-domain structured data-to-text dataset.
  • PlanGTG (New): A dataset of ~30,000 pairs featuring annotated attributions and reordered sequences, generated iteratively using GPT-3.5-turbo to ensure high connectivity and narrative flow.

Key Insights and Ideas

  • The Complexity Wall: LLM performance drops sharply as the number of triplets increases. Interestingly, models also struggle with "small diameter" graphs (where everything is closely connected), as they tend to hallucinate to make the dense information sound more natural.
  • Planning as Chain-of-Thought: By forcing the model to reorder triplets before writing the text, the authors essentially created a "Chain-of-Thought" for structural data. This explicit planning step significantly reduces the cognitive load on the model during the actual writing phase.
  • Attribution Mitigates Hallucination: Requiring the model to "cite its sources" (triplets) within the sentence makes it much harder for the model to sneak in outside information.
  • Curriculum Learning Matters: The authors found that "Baby-steps" training—starting with simple 1-triplet graphs and gradually increasing complexity—prevented the model from forgetting how to handle simple cases while learning complex ones.

Key Results

The results show that fine-tuning on PlanGTG allows smaller open-source models (like LLaMA2-7b) to punch well above their weight class.

  • Zero-Shot Performance: On the WebNLG17 benchmark, the PlanGTG-tuned LLaMA2-7b achieved a BLEU score of 28.76, compared to just 17.32 for the untuned version.
  • Hallucination Reduction: Human evaluations (shown in the table below) revealed that PlanGTG-tuned models had significantly fewer hallucinated entities and relations compared to models trained on other popular datasets like TEKGEN or EventNarrative.
Human Evaluation Comparison
  • Generalization: Models fine-tuned on PlanGTG showed much better "out-of-domain" performance on unseen datasets compared to those fine-tuned on traditional datasets.

Limitations and Future Work

While the results are promising, the authors acknowledge several constraints:

  • Model Scale: Due to hardware limits, they did not test the largest models (e.g., LLaMA2-70b), which might show different behaviors.
  • Parameter Efficiency: They used LoRA (Low-Rank Adaptation) for fine-tuning; full-parameter fine-tuning might yield even higher (or different) performance.
  • Sub-task Depth: While reordering and attribution were successful, the authors suggest that even more granular sub-tasks could be explored to further enhance transparency.

By shifting the focus from "better prompts" to "better planning tasks," this work provides a clear roadmap for making LLMs more reliable partners in navigating the complex world of structured data.

Summary updated

BibTeX
@inproceedings{he2025evaluating,
  author = {Jie He and Yijun Yang and Wanqiu Long and Deyi Xiong and Victor Gutierrez-Basulto and Jeff Z. Pan},
  title = {{Evaluating and Improving Graph to Text Generation with Large Language Models}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-long.513},
}
Figure