Skip to content

Commit

Permalink
Update faq_dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthenian8 committed Nov 27, 2023
1 parent c9a9299 commit 99e3461
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
15 changes: 13 additions & 2 deletions docs/source/examples/customer_service_bot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Customer service bot built using `DFF`.
This bot is designed to answer any type of user questions in a limited business domain (book shop).
Uses a Telegram interface.

You can read more about deploying the project in its README file.

Project structure
~~~~~~~~~~~~~~~~~

Expand All @@ -22,7 +24,7 @@ into services and modules.

* In the main service directory, we make a separate package for all DFF-related abstractions.
There, we put the script into a separate module, also creating modules for
`processing, condition, and response functions <#>`__.
`processing, condition, and response functions <../user_guides/basic_conceptions#>`__.

* The rest of the project-related Python code is factored out into other packages.

Expand Down Expand Up @@ -53,4 +55,13 @@ into services and modules.
├── dockerfile
├── requirements.txt
├── server.py
└── test_server.py
└── test_server.py
Models
~~~~~~

Two differently designed models are used to power the customer service bot: an intent classifier and a generative model.
The classifier is being deployed as a separate service while ChatGPT is being interacted with via API.

* [DeepPavlov Intent Catcher](https://docs.deeppavlov.ai/en/0.14.1/features/models/intent_catcher.html) is used for intent retrieval.
* [ChatGPT](https://openai.com/pricing#language-models) is used for context based question answering.
12 changes: 11 additions & 1 deletion docs/source/examples/faq_bot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ FAQ Bot
FAQ bot for Arch Linux users built using `DFF`.
Can be run with Telegram or with a web interface.

You can read more about deploying the project in its README file.

Project structure
~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -43,4 +45,12 @@ Project structure
├── requirements.txt
├── run.py # the web app imports the DFF pipeline from dialog_graph
└── test.py # End-to-end testing happy path is defined here
Models
~~~~~~~

The project makes use of the `clips/mfaq <https://huggingface.co/clips/mfaq>`__ model that powers the bot's ability to understand queries in multiple languages.
A number of techniques is employed to make the usage more efficient.

* The project's Dockerfile illustrates caching a model using SentenceTransformer in a Docker container.
The model is constructed during image build, so that the weights that the Huggingface library fetches from the web are downloaded in advance. At runtime, the fetched weights will be quickly read from the disk.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"What is Arch Linux?": "See the <a href=\"https://wiki.archlinux.org/title/Arch_Linux\" title=\"Arch Linux\">Arch Linux</a> article.\n",
"Why would I not want to use Arch?": "You may not want to use Arch, if:\n\n you do not have the ability/time/desire for a 'do-it-yourself' GNU/Linux distribution.\n you require support for an architecture other than x86_64.\n you take a strong stance on using a distribution which only provides free software as defined by GNU.\n you believe an operating system should configure itself, run out of the box, and include a complete default set of software and desktop environment on the installation media.\n you do not want a rolling release GNU/Linux distribution.\n you are happy with your current OS.",
"Why would I want to use Arch?": "Because <a href=\"https://wiki.archlinux.org/title/Arch_is_the_best\" title=\"Arch is the best\">Arch is the best</a>.\n",
"What architectures does Arch support?": "Arch only supports the <a href=\"https://en.wikipedia.org/wiki/x86_64\" class=\"extiw\" title=\"wikipedia:x86 64\">x86_64</a> (sometimes called amd64) architecture. Support for i686 was dropped in November 2017 <a rel=\"nofollow\" class=\"external autonumber\" href=\"https://archlinux.org/news/the-end-of-i686-support/\">[1]</a>. \nThere are <i>unofficial</i> ports for the i686 architecture <a rel=\"nofollow\" class=\"external autonumber\" href=\"https://archlinux32.org/\">[2]</a> and <a href=\"https://en.wikipedia.org/wiki/ARM_architecture\" class=\"extiw\" title=\"wikipedia:ARM architecture\">ARM</a> CPUs <a rel=\"nofollow\" class=\"external autonumber\" href=\"https://archlinuxarm.org/\">[3]</a>, each with their own community channels.\n"
"What is Deeppavlov?": "Deeppavlov is an open-source stack of technologies in Conversational AI that facilitate the development of the complex dialog systems.\n Find more info at the official <a href=\"https://deeppavlov.ai/about-us\" class=\"extiw\" title=\"deeppavlov\">website</a>.",
"What can the Deeppavlov library do?": "Deeppavlov is designed for natural language understanding and handles various NLP tasks, like intent recognition or named entity detection.\n A powerful demonstration app is available <a href=\"https://demo.deeppavlov.ai/#/examples/text_intent\" class=\"extiw\" title=\"deeppavlov demo\">here</a>.\n",
"Why would I want to use Deeppavlov?": "Deeppavlov is the technology behind some of the award-winning solutions for the Amazon Alexa chat bot competition.\n It's employed by the <a href=\"http://dream.deeppavlov.ai/\" class=\"extiw\" title=\"Dream\">Dream architecture</a>.",
"How do I learn more about Deeppavlov?": "<a href=\"https://docs.deeppavlov.ai/en/master/\" class=\"extiw\" title=\"deeppavlov docs\">Here</a>, you can find the documentation to the latest version of the Deeppavlov library,\n including installation and usage instructions.\n"
}

0 comments on commit 99e3461

Please sign in to comment.