FQRS: Farmer Query Redressal System Using Open-Source Framework †

: The Farmer query redressal system (FQRS) is an application designed as a chatbot. The FQRS is developed with the help of machine learning and deep learning techniques. The FQRS interacts with the farmers and this system can understand and respond totext or speech. The FQRS is developed using the nlu-based open-source framework called Rasa. The Rasa framework uses building blocks such as the nlu and nlu core. The Rasa nlu and Rasa core are the building blocks for the development of a conversational chatbot. The FQRSwill use natural language processing and mimic conversations with the customers or users in a manner identical to a human being. The FQRS is implemented in Rasa 3.0. In this paper, to address farmer-related query, a chatbot has been created and the results show that the Rasa framework is more versatile than other chatbot developments platforms for creating chatbots. The results show that farmers’queries can be effectively addressed with the proper training of the model.


Introduction
A chatbot is a conversational artificial intelligence assistant. Chatbot make use of neural networks to enhance the effectiveness replying to a user query. All natural language processing happens by understanding every word and character and interpreting the semantic meaning of the sentence. Chatbot make use of natural language processing by breaking paragraphs into sentences, sentences into words, and words into characters. A farmers' query is provided using natural language; hence, a robust natural language processing technique is required to create a robust redressal system. The open-source framework Rasa has two major components: the Rasa nlu and Rasa core. These two are responsible for understanding and identifying the farmer's intent and entities from their query. For the purpose of understanding the semantics of the farmers' queries, stemming, tokenization, and lemmatization techniques are applied. A machine learningbased predictive chatbot can give the proper guidance for a user's query [1] or it can provide a proper response for a user's query. There are two different broad classifications of chatbot: rule-based chatbots and machine learning-based chatbots. Machine learning chatbot learn from experience and provides more accurate results.

Related Work
Natural language processing (NLP) plays a vital role in chatbot development. An Nlu.yml file in Rasa is responsible for the classification of the intent and entities. A limited technical knowledge is enough to create a robust chatbot [2]. The Rasa framework has major two components that act similar to a black box: the Rasa nlu and Rasa core [3]. There are two different board classifications of chatbot, the rule-based chatbot and the machine learning-based conversational chatbot. Machine learning chatbots learn from experience and give more accurate results [3]. Non-technical users can also create a more effective chatbot by understanding the basic syntax of the Rasa framework. Rasa has two main components: the Rasanlu and Rasa core. The Rasa nlu helps to understand the user's intent and entities [4]. Necessary decisions can be made in the Rasa core. Different chatbot development frameworks have been compared and it was concluded that machine learningbased chatbot provide more accurate results [5]. The Rasa communication procedure is outlined in Figure 1. The Rasa stack is used in Rasa communication [6]. Chatbots can be used for various social network platforms [7] to solve the user's queries. A very well-known chatbot is deployed in social networks to answer the users' queries in one of the Spanish football leagues [8].

Related Work
Natural language processing (NLP) plays a vital role in chatbot development. An Nlu.yml file in Rasa is responsible for the classification of the intent and entities. A limited technical knowledge is enough to create a robust chatbot [2]. The Rasa framework has major two components that act similar to a black box: the Rasa nlu and Rasa core [3]. There are two different board classifications of chatbot, the rule-based chatbot and the machine learning-based conversational chatbot. Machine learning chatbots learn from experience and give more accurate results [3]. Non-technical users can also create a more effective chatbot by understanding the basic syntax of the Rasa framework. Rasa has two main components: the Rasanlu and Rasa core. The Rasa nlu helps to understand the user's intent and entities [4]. Necessary decisions can be made in the Rasa core. Different chatbot development frameworks have been compared and it was concluded that machine learning-based chatbot provide more accurate results [5]. The Rasa communication procedure is outlined in Figure 1. The Rasa stack is used in Rasa communication [6]. Chatbots can be used for various social network platforms [7] to solve the user's queries. A very well-known chatbot is deployed in social networks to answer the users' queries in one of the Spanish football leagues [8]. Conversational AI helps the developer to develop more efficient chatbots by understanding the intent and entities of the user's query. The sentiment of the user query can be identified with the help of machine learning and deep learning techniques [9][10][11]. The neural network model uses the Tensorflow technique for efficient accuracy [12]. Tensorflow uses dataflow graphs and operates well in heterogeneous environments at a large scale. Scikit learning can be used for entity extractors and intent classifiers [13].

Methods
The latest version of Rasa is Rasa 3.0. Rasa 3.0 has a slight advantage compared to Rasa 2.0. Rasa Open Source 3.0 separated the model architecture from the framework architecture, which enables us to run arbitrary model architectures. It also comes with several enhancements focused on improving the developer's experience when building conversational AI assistants with Rasa. The revamped computational backend enables us to experiment with architectures, reduce maintenance costs, and enables a collaborative development at scale. The Rasa architecture is shown in Figure 2. In this architecture, a farmer'squery is provided as an input and the interpreter understands the message using natural language processing. The interpreter understands the intent and entities from the farmers' queries. Once the intent and entities are identified they will pass to the tracker, Conversational AI helps the developer to develop more efficient chatbots by understanding the intent and entities of the user's query. The sentiment of the user query can be identified with the help of machine learning and deep learning techniques [9][10][11]. The neural network model uses the Tensorflow technique for efficient accuracy [12]. Tensorflow uses dataflow graphs and operates well in heterogeneous environments at a large scale. Scikit learning can be used for entity extractors and intent classifiers [13].

Methods
The latest version of Rasa is Rasa 3.0. Rasa 3.0 has a slight advantage compared to Rasa 2.0. Rasa Open Source 3.0 separated the model architecture from the framework architecture, which enables us to run arbitrary model architectures. It also comes with several enhancements focused on improving the developer's experience when building conversational AI assistants with Rasa. The revamped computational backend enables us to experiment with architectures, reduce maintenance costs, and enables a collaborative development at scale. The Rasa architecture is shown in Figure 2. In this architecture, a farmer'squery is provided as an input and the interpreter understands the message using natural language processing. The interpreter understands the intent and entities from the farmers' queries. Once the intent and entities are identified they will pass to the tracker, which tracks the farmer's query to provide a suitable response. A policy identifies the suitable action for the farmer's query and the action renders the suitable message to the query.
which tracks the farmer's query to provide a suitable response. A policy identifies th suitable action for the farmer's query and the action renders the suitable message to th query. The Rasa framework has various files such as nlu.yml, domain.yml, stories.yml, ac tion.py, etc., and nlu.ymldeals with the intent and entities. Nlu.yml helps in intent clas sification. stories.ymlenables the flow of a potential interaction with the chatbot. Domai file in the Rasa is considered as a universe of Rasa framework which helps to utter th reply to the farmers' queries. Action.py file helps in customizing the chatbot's response and further customization is possible through python code.

Results and Discussion
A bot created using Rasa can yield better results. The developer can customize th output of the bot according to the desired specifications. In this paper, the chatbot i prepared to address the queries related to farmers and the corresponding files are ou lined in this section. The Nlu.yml sample data contains intent followed by examples a shown below. The Rasa framework has various files such as nlu.yml, domain.yml, stories.yml, action.py, etc., and nlu.ymldeals with the intent and entities. Nlu.yml helps in intent classification. stories.ymlenables the flow of a potential interaction with the chatbot. Domain file in the Rasa is considered as a universe of Rasa framework which helps to utter the reply to the farmers' queries. Action.py file helps in customizing the chatbot's response, and further customization is possible through python code.

Results and Discussion
A bot created using Rasa can yield better results. The developer can customize the output of the bot according to the desired specifications. In this paper, the chatbot is prepared to address the queries related to farmers and the corresponding files are outlined in this section. The Nlu.yml sample data contains intent followed by examples as shown below. In Rasa, a chatbot has been designed in such a way that it can effectively utter the message according to the user's query. Agriculturally based farmer-friendly chatbots can be created using different platforms such as Google dialog flow, the Rasa framework, Chatterbot, Recurrent neural network, etc. The Recurrent Neural Network's (RNN) and Rasa nlu's performances are compared in Table 1. RASA NLU's accuracy is 0.95 percent whereas RNN's accuracy is 90 percent. Rasa is an open source framework for chatbot development designed by customizing python code in the action.py file, whereas dialogflow has a web interface and is a closed source product. The recurrent neural network can also be used for text mining and chatbot development, but the results show that the accuracy is greater for Rasa whereas the integrity of the entity is greater in the recurrent neural network.

Conclusions
In this paper, to address the farmer-related queries a chatbot has been created and the results show that the Rasa framework is more versatile for creating chatbots compared to other chatbot development platforms. The results show that farmers' queries can be effectively addressed with the model's proper training. RASA is an nlu-based machine learning chatbot and developers can develop the chatbot by writing customized python code in an action.py file. Hence, this research asserts that Rasa is a better platform for developing chatbots in a more versatile manner. This paper focuses on the chatbot development using the Rasa open-source framework. Conversation AI-based chatbots mimic the conversations with the customers similar to human beings. The building blocks of the Rasa framework are the Rasa nlu and Rasa core. The results conclude that the Rasa platform can be used for creating a robust chatbot.
Author Contributions: P.G.J. and P.K.H.R. conceived the idea to study the farmers query redressal system. The implementation of the chatbot carried out jointly by P.G.J., P.K.H.R. and G.P.M.S. in Rasa framework. P.G.J. wrote the manuscript in consultation with P.K.H.R., G.P.M.S., A.K.J. and P.S. All authors have read and agreed to the published version of the manuscript.