Course contentsShow
← Machine Learning and Deep Learning
Lesson 1321 of 3,53829. Core NLP TasksFree lesson

Data-to-Text Generation

Learn how models convert structured data like tables or knowledge graphs into natural language descriptions and reports.

Data-to-Text Generation

What You'll Learn

You'll learn how neural models transform structured data—like database tables, spreadsheets, or knowledge graphs—into fluent, human-readable text descriptions.

The Core Concept

Imagine you have a sports statistics table showing player names, points scored, and game dates. A human could write: "LeBron James scored 35 points in last night's game against the Lakers." Data-to-Text Generation teaches models to do exactly that—convert structured, machine-readable information into natural language narratives.

Unlike typical text generation where the model continues from text input, here the input is structured data: rows and columns, JSON objects, knowledge graph triples (subject-predicate-object), or SQL query results. The model must understand this structure, extract relevant information, and compose coherent sentences that accurately reflect the data.

How It Works

The process typically involves:

  1. Encoding the Structure: The model receives structured input (e.g., a table linearized as tokens or graph representations)
  2. Understanding Relationships: It identifies what's important—which fields relate to each other, what's worth mentioning
  3. Generating Text: Using decoder architectures (like those you've learned in summarization and translation), it produces fluent descriptions

Common applications include:

  • Weather reports from meteorological data
  • Financial summaries from earnings tables
  • Product descriptions from specification databases
  • Sports recaps from game statistics

The challenge lies in faithfulness—ensuring the generated text accurately reflects the source data without hallucinating facts—and fluency—making it read naturally rather than like a robotic list.

Key Differences from Other Generation Tasks

While abstractive summarization transforms text-to-text, data-to-text must bridge the gap between formal structure and natural language, requiring models to "verbalize" numbers, dates, and relational information meaningfully.

Key Takeaway: Data-to-Text Generation converts structured data formats into natural language descriptions, enabling automated report writing and making databases accessible through human-readable narratives.