diff --git a/tutorials/Getting_Started.ipynb b/tutorials/Getting_Started.ipynb old mode 100755 new mode 100644 index 195a3fea0b4a2dc1baceed6b184489e37770badf..032fbee2a75721b8449e137cdf7ea082842ef704 --- a/tutorials/Getting_Started.ipynb +++ b/tutorials/Getting_Started.ipynb @@ -340,84 +340,6 @@ "execution_count": 0, "outputs": [] }, - { - "cell_type": "markdown", - "metadata": { - "id": "4BuCZavJKZNx", - "colab_type": "text" - }, - "source": [ - "`BiSession` allows two agents chat in dialog act level or natural language level, once the input and output are consistent. Example configurations: \n", - "\n", - "| user input ==> | user NLU | user DST | user Policy | user NLG | ==> sys input ==> | sys NLU | sys DST | sys Policy | sys NLG | \n", - "| ---------------- | ------- | ------- | ---------- | -------- | ---------------- | ------- | ------- | ---------- | -------- | \n", - "| Dialog act | None | Rule | Rule | None | Dialog act | None | None | Rule | None | \n", - "| Natural language | Bert | Rule | Rule | None | Dialog act | None | None | Rule | Template | \n", - "| Dialog act | None | Rule | Rule | Template | Natural language | MILU | None | Rule | None | \n", - "| Natural language | Bert | Rule | Rule | Template | Natural language | MILU | None | Rule | Template | \n", - "\n", - "We have tried the last configuration before. Let's try the second configuration." - ] - }, - { - "cell_type": "code", - "metadata": { - "id": "vmdmODqt9goh", - "colab_type": "code", - "colab": {} - }, - "source": [ - "user_agent = PipelineAgent(user_nlu, user_dst, user_policy, None, name='user')\n", - "sys_agent = PipelineAgent(None, sys_dst, sys_policy, sys_nlg, name='sys')\n", - "evaluator = MultiWozEvaluator()\n", - "sess = BiSession(sys_agent=sys_agent, user_agent=user_agent, kb_query=None, evaluator=evaluator)" - ], - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "id": "3o1B_hzzLjlm", - "colab_type": "code", - "colab": {} - }, - "source": [ - "set_seed(20200131)\n", - "\n", - "sys_response = ''\n", - "sess.init_session()\n", - "print('init goal:')\n", - "pprint(sess.evaluator.goal)\n", - "print('-'*50)\n", - "for i in range(20):\n", - " sys_response, user_response, session_over, reward = sess.next_turn(sys_response)\n", - " print('user:', user_response)\n", - " print('sys:', sys_response)\n", - " print()\n", - " if session_over is True:\n", - " break\n", - "print('task success:', sess.evaluator.task_success())\n", - "print('book rate:', sess.evaluator.book_rate())\n", - "print('inform precision/recall/f1:', sess.evaluator.inform_F1())\n", - "print('-'*50)\n", - "print('final goal:')\n", - "pprint(sess.evaluator.goal)\n", - "print('='*100)" - ], - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "LuE75fmULknS", - "colab_type": "text" - }, - "source": [ - "After removing user NLG and system NLU, the conversation is more efficient." - ] - }, { "cell_type": "markdown", "metadata": {