Code for the Paper Task-Oriented Dialogue with In-Context learning.
Results are stored in line-counts.json
and the test-results
dir.
To render a table of results, pip install prettytable
, and run:
make show-results
You can also see the test conversations in the e2e_tests
dir.
You need a Rasa Pro license to run the code. You can get the free Rasa Pro Developer Edition here.
Install poetry, and then run
make install
Set the env var RASA_PRO_LICENSE=<your rasa pro license key>
If you want to run version_1, you'll need to set the env var OPENAI_API_KEY=<your openai api key>
.
Alternatively, you can edit version_1/config.yml
to use a different LLM. Follow the instructions here.
Some of the tests require duckling to pass.
To set this up, run a duckling server, and set the url in version_1/actions/check_restaurant_availability.py
To train and test a specific version (e.g. 1, 2, or 3), run:
make train-version version=1
and
make test-version version=1
version_1
CALM implementation. Business logic implemented. Referred to as "ours" in the arxiv paper.
version_2
Intent-based version, constrained to the CALM code budget. Not used in the paper, as it's too weak of a baseline.
version_3
Intent-based version with larger code budget, referred to as 'baseline' in the arxiv paper. Note that version 3 is a superset of the implementation of version_2 and many files are symbolic links to the version_2 implementation.