Skip to content

Instantly share code, notes, and snippets.

@meghnabajoria
Last active August 28, 2023 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meghnabajoria/fd1ead0534ab8b470950fa85d3c6965c to your computer and use it in GitHub Desktop.
Save meghnabajoria/fd1ead0534ab8b470950fa85d3c6965c to your computer and use it in GitHub Desktop.

Meghna Bajoria's Google Summer of Code 2023 Final report

gsoc-mifos another copy

Organisation: Mifos Initiative

Project Name: Mifos/Fineract Chatbot & Adapter 2.0

Mentors: Jeremy Engelbrecht, Param Mirani

Index

  1. Overview
  2. About the project
  3. Techstacks used
  4. Structure
  5. Commits to add data for rasa
  6. Commits to fetch and process information from Mifos
  7. Miscellaneous commits
  8. Contribute
  9. Run the code
  10. Demo
  11. Future Improvements
  12. Appreciation
  13. Conclusion
  14. About me

Overview

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.

About the project

Techstacks used

  1. Spring boot
  2. Rasa framework

Structure

The complete project is a springboot application that consists of 2 modules

  1. 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
  1. NLP - This module consists of all configurations related to Rasa and the data required to train Rasa.

Commits to add data for rasa

Commits to fetch and process information from Mifos

Miscellaneous commits

Contribute

  1. Add intent and examples to nlu.yaml file. Example
  2. Add story for your intent in stories.yaml file Example
  3. Add the intent and the utter response in domain.yaml file Example
  4. Train the model using > rasa train
  5. Enable http api
  6. Run springboot application

Run the code

  1. 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

  1. 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

  1. Once Rasa server is up and running, start the springboot application.
  2. Open swagger on localhost:8081/swagger-ui/#/controller
  3. Provide a query like what's my loan status

Demo

image

image

image

Demo.mp4

Future Improvements

  1. 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.
  2. 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.

Appreciation

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.

Conclusion

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.

About me

For any queries contact me at meghnabajoria8@gmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment