Skip to content

kaustubhdhole/natural-dont-know

Repository files navigation

Natural Don't Know: Saying No is An Art

Contains code for the following paper:

Saying No is An Art: Contextualized Fallback Responses for Unanswerable Dialogue Queries Ashish Shrivastava, Kaustubh D. Dhole, Abhinav Bhatt, Sharvani Raghunath, 2021

This repository contains code for calling the Natural Don't Know Response Service using a HuggingFace model as well as a front-end interface.

Alt text

Using the model directly for inference

You can use our model deployed at HuggingFace directly.

OR

Call the service locally

pip3 install -r requirements.txt
from ndk_generator import NdkGenerator
ndkGenerator = NdkGenerator()
question = "What is the effect of demonetization of 500 and 1000 rupees notes?"
ndkResponse = ndkGenerator.random_paraphrase(question)

OR

Deploying a stand-alone web service

In order to install this project, run the following:

sh install.sh

This will install the front-end as well as server side dependencies.

In order to start running the project and see it in action, run the below script:

sh run.sh

This would start the development server

http://127.0.0.1:5000/

Alt text

The front-end code has been taken from James Gung's VerbNet Parser repository.

Citations

@inproceedings{shrivastava-etal-2021-saying,
    title = "{S}aying {N}o is {A}n {A}rt: {C}ontextualized {F}allback {R}esponses for {U}nanswerable {D}ialogue {Q}ueries",
    author = "Shrivastava, Ashish  and
      Dhole, Kaustubh  and
      Bhatt, Abhinav  and
      Raghunath, Sharvani",
    booktitle = "Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers)",
    month = aug,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.acl-short.13",
    doi = "10.18653/v1/2021.acl-short.13",
    pages = "87--92",
    abstract = "Despite end-to-end neural systems making significant progress in the last decade for task-oriented as well as chit-chat based dialogue systems, most dialogue systems rely on hybrid approaches which use a combination of rule-based, retrieval and generative approaches for generating a set of ranked responses. Such dialogue systems need to rely on a fallback mechanism to respond to out-of-domain or novel user queries which are not answerable within the scope of the dialogue system. While, dialogue systems today rely on static and unnatural responses like {``}I don{'}t know the answer to that question{''} or {``}I{'}m not sure about that{''}, we design a neural approach which generates responses which are contextually aware with the user query as well as say no to the user. Such customized responses provide paraphrasing ability and contextualization as well as improve the interaction with the user and reduce dialogue monotonicity. Our simple approach makes use of rules over dependency parses and a text-to-text transformer fine-tuned on synthetic data of question-response pairs generating highly relevant, grammatical as well as diverse questions. We perform automatic and manual evaluations to demonstrate the efficacy of the system.",
}

About

Code for the paper: Saying No is An Art: Contextualized Fallback Responses for Unanswerable Dialogue Queries

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages