- Introduced by
- Reiter & Dale (classical pipeline, 2000); Gatt & Krahmer (modern survey, 2018)
- Year
- 1970s (rule-based origins); 2000s (probabilistic); 2017+ (neural/transformer era)
- Type
- NLP generative task — structured data to natural language
What does it do?
Natural Language Generation (NLG) is the branch of natural language processing that automatically produces fluent, human-readable text from structured data, knowledge graphs, or semantic representations.
Formalised in the classical pipeline by Reiter and Dale (2000) and surveyed comprehensively by Gatt and Krahmer (2018), NLG powers applications ranging from automated financial reporting and weather bulletins to data storytelling and conversational agents.
The intuition behind the method
A database row or a chart communicates facts, but a human reader often needs a sentence or a paragraph — not a table. Natural Language Generation bridges that gap by taking structured input and deciding what to say, how to organise it, and how to express it in grammatical prose. Think of it as the reverse of information extraction: instead of pulling facts out of text, NLG writes text from facts. Modern neural approaches let a model learn this conversion end-to-end from examples, while classical rule-based pipelines give fine-grained control over each step.
History
Rule-based NLG systems were developed from the 1970s onward, producing text from structured representations through hand-crafted grammars. Reiter and Dale (2000) formalised the classical pipeline of content determination, discourse planning, sentence aggregation, lexicalisation, referring-expression generation, and surface realisation. Probabilistic approaches followed in the 2000s, and neural approaches from 2017 onward have increasingly displaced rule-based realisers; Gatt and Krahmer (2018) survey this transition and the evaluation methods used to assess it.
When to use it
Choose NLG when you have structured data or a knowledge representation and need readable text produced at scale, for example personalised reports for many records or narration of dashboard data. The input structure must be well defined, since both classical and neural approaches rely on known fields and relations. Plan evaluation before deployment: BLEU and BERTScore need reference texts, and without them human raters must check fluency and correctness. Neural approaches need substantially larger paired training corpora than template-based systems. Choose a template-based system instead when outputs must be strictly factually correct, training data is scarce, or phrasing must be fully controlled, as in regulatory documents. Do not use NLG when the input is already unstructured text; that is a summarisation or paraphrasing task.
Limitations and considerations
- Neural models can hallucinate: they generate fluent text that contradicts the source data, and fluency gives no guarantee of factual consistency.
- Classical systems need carefully engineered templates or grammars for each domain, while neural systems need large paired corpora; each approach trades one cost for the other.
- BLEU and similar overlap metrics correlate imperfectly with human judgements of fluency and correctness, and human evaluation is costly to run at scale.
- Surface realisation rules and morphological complexity vary across languages, so multilingual generation requires separate grammatical resources or training data for each language.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Turns large volumes of structured records into readable narrative, which is the main case for scaling reports or descriptions beyond what manual writing allows.
- Classical pipeline systems separate content selection, planning and realisation, so each decision can be inspected and changed independently.
- Neural approaches learn input-to-text mappings from paired examples, avoiding hand-written grammar rules for each sentence construction.
- Because the input is structured fields, a pipeline can be adapted to a new domain by changing content-selection rules and vocabulary, although this still requires domain effort.
Applications
- Automated financial reporting — narrating earnings figures, balance sheets, and portfolio summaries.
- Weather forecast text generation from numerical weather prediction model output.
- Clinical report generation from structured patient data or medical imaging findings.
- Data storytelling — turning dashboard metrics into executive narrative summaries.
- Dialogue system response generation from database query results.
How it works
How it works
The system decides which facts from the input data are relevant and worth communicating. In a classical pipeline this is a rule-driven filtering step; in a neural model the attention mechanism implicitly learns which input tokens to focus on. The output is a selected subset of the structured information that will appear in the final text.
The selected content is ordered and grouped into a coherent discourse structure, for example placing a summary sentence before supporting details. In the classical formulation this corresponds to discourse planning; the intermediate microplanning choices (sentence aggregation, lexicalisation, referring-expression generation) are folded into the next step here, a simplification of the six-stage scheme. Neural sequence-to-sequence models handle ordering implicitly through the decoder.
The planned content is converted into grammatical sentences, using the lexical and referring choices made during microplanning. A rule-based realiser applies morphological and syntactic rules to fill templates or grammars. A neural realiser, such as a transformer decoder, generates tokens auto-regressively and learns these regularities from data rather than from explicit grammar rules.
Generated text is measured against reference text using automatic metrics such as BLEU and BERTScore and, where possible, by human judges rating fluency, correctness, and relevance. Because fluent text can still contradict its source, factual consistency is checked separately: where the input is structured, the claims in the generated text are extracted and each is compared with the corresponding input field. The share of claims that the input does not support is reported alongside the automatic and human scores.
Common pitfalls
- Skipping factual consistency checks: a fluent sentence that misstates a value in the data is worse than no sentence, so outputs should be checked against the source fields.
- Relying on BLEU alone: BLEU counts n-gram overlap with reference texts, so a hallucinated sentence that reuses reference wording can score well; complement it with BERTScore and human review.
- Applying a model trained on one domain to another without re-evaluation: domain shift can degrade fluency and factual accuracy, and the drop may not be visible from fluency alone.
- Publishing neural output without editorial review: grammatical sentences can still mislead in context, for example by omitting a qualifier that is present in the source data.
Frequently asked questions
What is the difference between NLG and text summarisation?
Text summarisation takes existing text as input and produces a shorter text. NLG takes structured data — tables, databases, knowledge graphs — as input and produces text from scratch. The two overlap when the source is a structured representation of a document, but the canonical distinction is input type: unstructured text versus structured data.
How is the quality of generated text measured?
Automatic metrics such as BLEU (n-gram overlap with reference texts) and BERTScore (contextual embedding similarity) are standard, but both correlate imperfectly with human judgements. For consequential applications, human evaluation of fluency, correctness, and relevance is recommended alongside automatic metrics.
When should I use a template-based system rather than a neural model?
Template-based systems are preferable when outputs must be strictly factually correct, when training data is scarce, or when full control over phrasing is required (e.g., regulatory documents). Neural models excel when large paired datasets are available and some variation in phrasing is acceptable.
What is hallucination in NLG and how can I detect it?
Hallucination occurs when a model generates text that is fluent but factually inconsistent with the source data. Detection approaches include comparing generated claims against the structured input using information-extraction tools, computing factual consistency scores, and human review. It is a known risk of neural models, particularly those trained without explicit faithfulness constraints.
Related methods
Sources
Gatt, A. & Krahmer, E. (2018). Survey of the State of the Art in Natural Language Generation: Core Tasks, Applications and Evaluation. Journal of Artificial Intelligence Research, 61, 65-170.
Open publication referenceReiter, E. & Dale, R. (2000). Building Natural Language Generation Systems. Cambridge University Press.
ISBN: 9780521620369