- Overview
- About the project
- Techstacks used
- Structure
- Commits to add data for rasa
- Commits to fetch and process information from Mifos
- Miscellaneous commits
- Contribute
- Run the code
- Demo
- Future Improvements
- Appreciation
- Conclusion
- About me
Mifos-chatbot is a application that aims to serve as a virtual assistant to users and help them interact with Mifos platform directly and provide information about their accounts. Initially, I was assigned to improve the existing chatbot but we found that the previous code was outdated and was incomplete so we decided to build the whole application from scratch.
- Spring boot
- Rasa framework
The complete project is a springboot application that consists of 2 modules
- Server - The server module serves as a medium between the Rasa and the Mifos application. It is responsible for
- Fetching user queries(eg: what's the loan status?)
- sending queries to Rasa through HTTP API http://localhost:5005/webhooks/rest/webhook
- Fetching information about the query from the above API's response
- Finding the intent for the query via above response(eg: intent = loan_status)
- Calling appropriate Mifos API on the basis on the intent
- Traversing the response from Mifos API to get the desired information and sending it back to the user
- NLP - This module consists of all configurations related to Rasa and the data required to train Rasa.
- data for disbursement amount
- data for disbursement date
- data for maturity date
- data for next due date
- data for approved principal amount
- data for interest rate
- data for last payment date
- data for next due principal amount
- data for day since arrear
- data for loan approved date
- data for first repayment date
- data for client activation date
- data for loan status
- disbursement date
- maturity date
- next due date
- approved principal amount
- interest rate
- payment amount
- last payment date
- next due principal amount
- day since arrear
- loan approved date
- first repayment date
- client activation date
- loan status
- Add intent and examples to nlu.yaml file. Example
- Add story for your intent in stories.yaml file Example
- Add the intent and the utter response in domain.yaml file Example
- Train the model using > rasa train
- Enable http api
- Run springboot application
- Train Rasa to create a model.
rasa train --config path\to\config.yml --data path\to\nlu.yml path\to\stories.yml --domain path\to\domain.yml --endpoints path\to\endpoints.yml
- Once the model has been created in \model directory, we need to start Rasa server so that HTTP APIs can be used.
rasa run --enable-api
- Once Rasa server is up and running, start the springboot application.
- Open swagger on localhost:8081/swagger-ui/#/controller
- Provide a query like what's my loan status
Demo.mp4
- When the project was started by previous contributers, Mifos was using self service APIs(the client facing APIs) but now they have discontinued it. As this chatbot is a client application we need to come up with a way to use the admin APIs such that they work like client APIs. One proposed solution was to have sign up option in the chatbot which maintains it's own database. Once we have authenticated that the client is genuine, we can fetch the client's information from Mifos database and use it.
- The application currently uses Rasa to classify intents. We can use natural language processing techniques to better understand and process user queries. This would also help us become more flexible with the questions that users can ask and the way the bot responds to them.
I would like to thank my mentors Jeremy Engelbrecht and Param Mirani for their guidance. We faced several obstacles during this project which often took days to get resolved but they were very patient and always made sure to help me whenever needed. I would also like to thank everyone in the Mifos organization as they all made sure that I always get support when asked. Special thanks to Mr Ed cable for reviewing my proposal and providing guidance.
It was a great learning experience. I plan to continue contributing to this project to incorporate natural language processing techniques to make it more robust and user-friendly.