The system knows:
▶️ Action: inform
▶️ Flight: booked
▶️ Destination: Paris
▶️ Date: Dec 20
▶️ Confirmation: AB123
That's not what we say to a user.
This is where NLG (Natural Language Generation) comes in.
NLG
It transforms structured data into natural speech:
Example:
🤖 "Great news! Your flight to Paris on December 20th is confirmed. Your confirmation number is AB123. Have a wonderful trip!"
The NLG Pipeline:
1️⃣ Content Planning
🔹"What information to convey?"
🔹Select facts, order them, prioritize.
2️⃣ Sentence Planning
🔹"How to structure it?"
🔹One sentence or multiple?
🔹Combine facts?
3️⃣ Surface Realization
🔹"What exact words to use?" .
🔹Grammar, vocabulary, tone, fluency.
The evolution:
🔹Templates → slot-filling.
🔹Statistical → n-grams, HMMs.
🔹Neural → Seq2Seq, Transformers.
🔹LLMs → GPT, Claude (SOTA) .
Below are recommendations based on use case:
🔹Need predictability → Templates.
🔹Need natural variety → LLM.
🔹Need both → Hybrid (LLM + guardrails).
The difference between a robotic assistant and a delightful one? NLG.