Skip to content
Back to AI Glossary
AI Definition

NLG (Natural Language Generation)

"NLG is the writing step of an agent: turning a decision and structured data, such as a slot time, into a clear reply in the customer's language and tone."

In short

What is an NLG (Natural Language Generation)?

NLG is the writing step of an agent: turning a decision and structured data, such as a slot time, into a clear reply in the customer's language and tone. Related product: Chat Agents.

Reviewed by , Co-Founder · Last reviewed

Deep Dive

Natural language generation is the last step before a customer sees or hears anything. The agent has understood the request, looked up the facts and decided what to do; NLG turns that into the sentence on screen or, through text-to-speech, the sentence on the call. It is where tone lives, where length is decided and where a correct decision can still produce a bad experience.

How it works. The inputs are the decision (answer, ask, confirm, decline, transfer), the data that supports it (retrieved passages, a tool result such as three open slots, the customer's name), and the style rules in the system prompt (brevity, formality, language, what never to promise). The language model composes the reply from these. On chat, the output is text, possibly with a link or a quick-reply button. On voice, the output is text shaped for speech: shorter sentences, numbers written the way they should be read, no bullet points. Earlier NLG systems filled templates ('Your appointment is on {date} at {time}'); templates still have a place for legally fixed wording, and good agents mix the two.

Why it matters for trust and credits. Customers judge the whole agent by its sentences. A reply that is correct but three paragraphs long gets skimmed and misread; a reply that is correct but stiff reads as a bot and pushes people to ask for a human. On chat plans metered per reply, verbosity also costs money, because a bloated answer that prompts a follow-up question is two credits instead of one. On voice, every unnecessary sentence is seconds of the caller's time and, where minutes are billed, of yours.

Example. A restaurant's voice agent has confirmed a table. The tool returns: party 4, Friday, 19:30, patio, name Priya. A template would read, 'Your reservation for four on Friday at seven thirty p.m. on the patio under Priya is confirmed.' The generated version, with the prompt's rule to keep confirmations under two sentences and read times naturally, says: 'You're all set, Priya: Friday at seven thirty, patio, table for four. We'll text you a confirmation.' On WhatsApp the same decision becomes a two-line message with the date spelled out and a link to modify the booking.

NLG vs TTS. NLG decides the words; text-to-speech decides the voice. A clumsy sentence read by an excellent voice is still clumsy, and a good sentence is wasted on a robotic one. Voice-shaped generation (short clauses, spelled-out numbers, pauses marked with punctuation) is what makes TTS sound natural, so when a voice agent sounds off, check the text it was given before changing the voice model.

Common pitfalls.

  • Generic warmth ('I completely understand how frustrating that must be') before the answer, which reads as evasion.
  • Reading the retrieved passage aloud verbatim, including headings and legal boilerplate.
  • Replies that change tone between turns because the style rules are vague.
  • Numbers, times and addresses generated in a format TTS reads wrong (a phone number as a single large integer).

Botcadence chat agents generate replies in 50+ languages from one primary training language, and voice agents target sub-second responses with natural barge-in; see chat agents and tone of voice.

See NLG (Natural Language Generation) in a Botcadence agent

Start on the Free plan and configure an agent that uses NLG (Natural Language Generation) on your own website chat or WhatsApp number. No card needed.

Get Started Free

Website chat live in about 5 minutes

Common Questions

NLG (Natural Language Generation) FAQs

State a limit in the style rules ('two sentences for confirmations, four for explanations') and give one or two example replies at the target length. Test on real questions; models drift longer when the retrieved passages are long, so trim passages as well.

On platforms with multilingual generation, the agent detects the customer's language and replies in it from the same documents. Review a sample per language for formality and terminology, because a correct translation can still use the wrong register for your customers.

Templated. Fixed disclosures, consent language and anything a lawyer approved should be inserted verbatim, with generation used for the surrounding conversation. Most platforms let you mark certain messages as fixed text.

Generation produced a format the speech engine reads literally, such as '2024-05-14' or a phone number without separators. Instruct the agent to write dates and numbers as they should be spoken, and test every number-bearing reply by ear.

Ask AI about this page