---
# System prepended metadata

title: Requirements

---

# Requirements
#### Requirement 1: Queries Recommendation
Queries recommendation function similar to Google Search.
#### Requirement 2: Conversational-Driven Development
The bot should be able to learn from collected conversations done and incrementally improve its ability to give correct response without human intervention.
#### Requirement 3: Chatbot's Communication Enhancement
Chatbot should be able to "communicate" using audio format.

---

### Choices of Frameworks/Service

In my research, I investigated some of the famous frameworks for building Chatbot or NLP Pipelines in order to handle mentioned requirements

#### Google Dialogflow

- Basically just API calls to Google Cloud Services for handling natural langague processing task
- Pricing on Messages or API calls
- Only provide text support for 

#### Microsoft Bot Framework/ Bot Service

- The Bot Framework allows a code-base approach for creating stories and hanling user intents/ entities provided by the Bot Service (LUIS)
- Provide supporting methods for handling complex actions rather then simple text responses, managing bot states, adaptive response generations (just rule-based), etc.
- Only the downstream tasks is supported while the NLP tasks are provided as LUIS services with pricing
- Don't support Vietnamese

**NOTE: The problem with NLP services is that they don't allow custom pipeline, which will be a problem for scaling or adding functions to Chatbot and the problem is even greater for low-resource language or domain-specific tasks**
#### Rasa
- Free
- Open-source: customizable source code to better
- Provide SDK for handling complex response: auto-form filling, calls to other back-end codebase
- The development process can either be code-based or via user interface
- Conversational-Driven Development is supported via Rasa core (transformer-based dialogue systems) with supported machine learning-based policies (TEDPolicies)
- In-house knowledge-base and knowledge-base query
- Customizable pipline: adding custom NLP components won't be a problem

---

### Breaking down the Requirements
#### Queries Recommendation

- Target: Google-like query recommendation
- Current work arround: 
    - Use out-of-scope intent to indentify unseen questions
    - Get all the pre-defined questions in the database.
    

#### Conversational-Driven Development
- Support by Rasa through Machine Learning-base policy, **[TED Policy](https://arxiv.org/pdf/1910.00486.pdf)**
- How TED Policies works ?
    - Input: 
        - Context information
        - User provided information (extracted intents and entities)
        - Previously prediced actions
    - Output: Possibiblites of possible actions

- Further study into the subject can be done in this paper: 

#### Chatbot's Communication Enhancement: ASR and TTS
- Rasa allows customizable pipeline components, therefore it is possible to add ASR and TTS endpoint components to the NLP pipeline
- ASR
    - Transform audio input into text
    - Further analysis will be done on text:
        - Sentiment Analysis
        - Topic Modelling
- TTS
    - Speech Synthesis
    - Generate Audio from Text

### Task Estimation

Underconstruciton

---

