Faithful and Controllable Dialogue Response Generation with Dataflow Transduction and Constrained Decoding
This repository contains code and instructions for reproducing the experiments in the paper The Whole Truth and Nothing But the Truth: Faithful and Controllable Dialogue Response Generation with Dataflow Transduction and Constrained Decoding (Findings of ACL 2023). [paper] [video]
There are two key components in our framework: dataflow transduction and constrained decoding, implemented by the dataflow2text package and the clamp package, respectively.
- These two packages currently use two different Python versions.
The
dataflow2text
package relies on the structural pattern matching feature introduced in Python 3.10, whereas theclamp
package heavily relies on PyTorch and 🤗 Transformers. - The clamp package is a simplified version of the code for Semantic Parsing with Constrained LM.
To reproduce the SMCalFlow2Text results reported in the paper, please refer to the worksheets folder. You will need to create two python virtual environments.
conda env create --file=dataflow2text/environment.yml --name=dataflow2text_py310
conda env create --file=clamp/environment.yml --name=clamp_py37
More details coming soon!
If you use any source code or data included in this repo, please cite our paper.
@article{SMCalflow2Text2023,
title={The Whole Truth and Nothing But the Truth: Faithful and Controllable Dialogue Response Generation with Dataflow Transduction and Constrained Decoding},
author={Hao Fang and
Anusha Balakrishnan and
Harsh Jhamtani and
John Bufe and
Jean Crawford and
Jayant Krishnamurthy and
Adam Pauls and
Jason Eisner and
Jacob Andreas and
Dan Klein},
booktitle = {Findings of the Association for Computational Linguistics: ACL 2023},
year={2023},
}