What is natural language generation?
The AI Glossary
In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.
Natural language generation, or NLG, is the production of human-language text by software. The starting point might be a set of numbers, a document, a conversation or a request. A weather summary, a translated paragraph and a draft reply are all examples.
Generation does not always require a large language model. A simple system can fill a template: “Your appointment is on [date] at [time].” More flexible systems learn patterns from examples and produce new wording. The choice depends on how much variation the task needs and how tightly the output must be controlled.
Summarization illustrates an important distinction. Extractive summarization selects material from the source, such as existing sentences. Abstractive summarization rewrites or combines ideas in new language. Rewriting can make a passage clearer, but also creates opportunities to introduce a claim that the source does not support. Selecting exact sentences is not automatically safe either: removing context can change their apparent meaning.
The test of a generated passage depends on its purpose. A fictional story can invent details. A patient letter cannot invent an appointment date. A research summary should distinguish what the authors observed from what they proposed. Fluency, factual accuracy, completeness and suitability for the reader are separate qualities.
A useful application therefore starts with the information that must be preserved. It might require dates and numerical results to be copied from verified fields, prevent unsupported additions, and show the source behind a summary. These controls can reduce errors, but the complete output still needs evaluation.
In health care, consider instructions after a visit. A note written for another clinician may be accurate yet unsuitable for a patient. Generating a plain-language version requires preserving the agreed plan, explaining unfamiliar terms and making the next action clear. Readability scores can identify complicated wording, but they do not show that a person understands what to do. Testing with intended readers answers a different and essential question.
Sources: Hugging Face — Summarization; Ji and colleagues — Survey of Hallucination in Natural Language Generation (2023)
To learn more, take a look at the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.
AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.
For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.
Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy
Lead with AI in Health Care
The AI Pragmatist is a monthly newsletter from ALA faculty, with new explainers & essays from the Advanced Learning Academy