Natural language generation
What Is Natural Language Generation?
Natural language generation, commonly abbreviated NLG, is the area of natural language processing concerned with producing readable text or intelligible speech from non-linguistic input such as structured records, database rows, sensor streams, or an internal representation of meaning. It is the mirror image of natural language understanding: understanding maps text onto structured meaning, while generation maps structured meaning onto text. Output has to satisfy two conditions at once. It must be faithful to the input data, and it must be fluent enough that a reader accepts it as ordinary prose rather than as a filled-in template.
Work on the problem began in computational linguistics during the 1970s and 1980s with programs that wrote weather bulletins, stock summaries, and explanations for expert systems. Those systems drew on linguistic theories of discourse structure and rhetorical organization. A widely cited survey of natural language generation by Albert Gatt and Emiel Krahmer organizes the field around a set of core tasks, the architectures that arrange those tasks, and the long-standing difficulty of evaluating generated text.
The Generation Pipeline
Classical NLG systems decompose the problem into ordered stages. Content determination selects which facts from the input deserve mention at all. Document planning arranges the selected facts into a rhetorical order, deciding what becomes a topic sentence and what becomes supporting detail. Microplanning covers lexical choice, aggregation of related propositions into single sentences, and referring expression generation, the task of deciding whether an entity should appear as a proper name, a definite description, or a pronoun. Surface realization applies grammar and morphology to produce well-formed sentences, handling agreement, tense, and punctuation. Reusable realizers such as SimpleNLG separated that last stage from the rest, which let developers concentrate on the planning steps that encode domain knowledge.
Neural and End-to-End Generation
Encoder-decoder neural networks collapsed the pipeline into a single learned mapping from input to output tokens. Attention mechanisms, and later the self-attention architecture introduced in the paper Attention Is All You Need, let a decoder condition each generated word on any part of the input, which improved long-range coherence. Large pretrained transformer language models extended the approach further: the same model that generates a summary can generate a dialogue turn or a code comment, conditioned only on a prompt. The gain in fluency came with a characteristic failure mode. Neural generators produce grammatical sentences that contradict or invent facts, a problem usually called hallucination. Controlled generation, constrained decoding, and retrieval grounding are the main responses, each restricting the decoder so that assertions trace back to source material.
Evaluation
Automatic metrics borrowed from machine translation and summarization, including BLEU, ROUGE, and METEOR, compare a generated string against one or more human references. They are cheap and reproducible, but they correlate weakly with human judgments of quality, especially when many valid outputs exist for the same input. Shared tasks give the field common ground: the E2E NLG Challenge evaluated dozens of end-to-end systems on restaurant descriptions generated from meaning representations, and reported how the automatic scores diverged from human ratings. Practical evaluation therefore combines automatic scores with human assessment of fluency, adequacy, and factual faithfulness, and increasingly with task-specific checks that verify each claim against the input record.
Applications
Natural language generation has applications across a range of fields, including:
- Automated journalism, particularly for sports results, election returns, and earnings coverage
- Clinical documentation and patient-facing summaries of medical records
- Financial and regulatory reporting generated from structured filings
- Conversational assistants, chatbots, and spoken dialogue systems
- Business intelligence tools that narrate charts and dashboards
- Accessibility technology, including image captioning and screen reader description