[Paper Review] Few-Shot Natural Language Generation by Rewriting Templates
This paper proposes a few-shot natural language generation method that uses template rewriting to scale efficiently to large numbers of slots in virtual assistants. It combines simple templates with a fine-tuned pre-trained language model to generate coherent, natural utterances, achieving superior performance with significantly fewer training examples than baseline methods.
Virtual assistants such as Google Assistant, Alexa and Siri enable users to interact with a large number of services and APIs on the web using natural language. The response generation module converts the actions generated by a policy module into a natural language utterance. Traditionally, template based approaches have been used for response generation in virtual assistants. However, such approaches are not feasible for commercial assistants, which need to support a large number of services. Defining templates for a large number of slot combinations for each of the services supported by large scale assistants becomes tedious. In this work, we propose a template rewriting method for Natural Language Generation (NLG), where the number of templates scales only linearly with the number of slots. A set of simple templates is used to convert actions into utterances, which are concatenated to give a semantically correct, but possibly incoherent and ungrammatical utterance. A pre-trained language model is subsequently employed to rewrite it into coherent, natural sounding text. Through automatic metrics and human evaluation, we show that our method improves over strong baselines, while being much more sample efficient.
Motivation & Objective
- To address the scalability challenge of template-based natural language generation in large-scale virtual assistants supporting thousands of services.
- To reduce the manual effort of defining templates for every slot combination across numerous services.
- To enable few-shot learning for NLG by leveraging pre-trained language models to rewrite incoherent template outputs into fluent, natural utterances.
- To improve sample efficiency while maintaining high fluency and semantic correctness in generated responses.
Proposed method
- A set of simple, reusable templates is constructed for each action, with slots filled directly to form a raw, semantically correct but potentially incoherent utterance.
- The raw utterance is passed to a pre-trained language model fine-tuned on dialogue data to rewrite it into a fluent, natural-sounding response.
- The method scales linearly with the number of slots, avoiding the exponential template growth seen in traditional approaches.
- The rewriting process preserves the intent and slot information while improving grammaticality and coherence.
- Fine-tuning is performed using few-shot examples, enabling rapid adaptation to new services or slot combinations.
Experimental results
Research questions
- RQ1Can a template-based NLG system scale efficiently to large numbers of slot combinations without exponential template growth?
- RQ2Can a pre-trained language model effectively rewrite raw template outputs into fluent, natural utterances with minimal supervision?
- RQ3How does the few-shot performance of this method compare to strong baselines in terms of fluency and semantic accuracy?
- RQ4To what extent does the method reduce the need for extensive human-authored templates in commercial virtual assistants?
Key findings
- The proposed method achieves higher fluency and grammaticality scores than strong baselines on automatic and human evaluation metrics.
- The model demonstrates strong few-shot generalization, requiring significantly fewer training examples than baseline methods.
- The approach scales linearly with the number of slots, making it feasible for large-scale virtual assistants with diverse service integrations.
- Human evaluation confirms that the rewritten utterances are perceived as more natural and coherent than those from template-only or baseline neural methods.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.