Natural Language Processing · TEE · papers

Q6c · NLU and NLG working together

2024-12-03 · final · recovered AI paper

Previous examination · complete worked answers

Question. Explain how NLU and NLG work together for meaningful human–machine communication. [5 marks]

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.”
FeatureNLUNLG
DirectionLanguage → interpretationData/representation → language
Main concernMeaning, intent, ambiguityContent choice, organization, fluent wording
ExampleFind destination in a requestWrite the booking confirmation
Common failureWrong destination or senseUnclear, 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.