Natural language generation (NLG) is the process of turning structured data, an internal model state, or some other non-linguistic input into readable text or speech. Where natural language understanding is concerned with interpreting what language means, NLG sits on the output side: deciding what to say and how to phrase it so a human reader finds it clear and natural.
NLG shows up in places that don't always look like classic "AI writing": automated weather reports and financial summaries generated from raw data tables are NLG, as are the responses a chatbot composes in reply to a user's question. In large language models specifically, NLG happens token by token, with the model repeatedly predicting the most probable next piece of text based on everything generated so far, which is why the coherence of a long response depends heavily on the quality of everything that came before it in the same output.
