# Q1d · NLU versus NLG and applications

Subject: Natural Language Processing

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/nlp/#tee/papers/legacy-r25/q1d

Canonical: https://deep-learning-study-room.vercel.app/read/nlp/tee/papers/legacy-r25--q1d/

Previous examination · complete worked answers

**Question. Compare Natural Language Understanding and Natural Language Generation. List real-world NLP applications that use these concepts.** [individual allocation not printed; Q1 totals 20]

### Answer

**Natural language understanding (NLU)** maps language into an interpretation useful for a task: intents, entities, semantic relations or another meaning representation. **Natural language generation (NLG)** produces human-language output from data, a representation or another source.

“Book a ticket to Pune tomorrow.”

→

NLU: intent=book; destination=Pune; date=tomorrow

→

Application: search available journeys

→

NLG: “Here are the available journeys to Pune.”

| Feature | NLU | NLG |
| --- | --- | --- |
| Direction | Language → interpretation | Data/representation → language |
| Main concern | Meaning, intent, ambiguity | Content choice, organization, fluent wording |
| Example | Find destination in a request | Write the booking confirmation |
| Common failure | Wrong destination or sense | Unclear, unsupported or ungrammatical output |

### NLG stages in a classical pipeline

1. **Content determination:** choose facts to communicate.
2. **Data interpretation:** identify relationships or trends.
3. **Document planning:** organize facts in a useful order.
4. **Sentence aggregation:** combine related facts without repetition.
5. **Lexical and grammatical realization:** choose words and construct grammatical sentences.
6. **Presentation:** format the generated message for its audience.

For a weather report, facts {city=Pune, temperature=28°C, rain=yes} can become “Pune will have rain with a temperature of 28°C.” NLU would instead extract facts or intent from an incoming language message.

NLU = language se meaning andar. NLG = data se language bahar.

A question-answering assistant interprets intent/entities through NLU and composes an answer through NLG. Translation interprets source meaning and generates a target-language sequence. A customer-support system classifies requests and generates a contextual reply.
