This is a complete solution package for representing ConceptNet5, WordNet as TigerGraphs' and building a Dictionary application using the RASA platform.
Technical Blog
A detailed overview of the project is presented in the below technical article:
- https://medium.com/@sudha.vijayakumar_74093/a-common-sense-word-network-with-tigergraph-573745e4504d
Hands-On Video Tutorial
==COMING SOON==
Prerequisites: Before, getting started install the following,
- Python 3 => https://docs.python-guide.org/starting/install3/osx/
- Jupyter notebook/ MS Visual Studio Code => https://jupyter.org/install
- RASA => https://rasa.com/docs/rasa/installation/
- Create tgcloud solution => https://www.tigergraph.com/blog/taking-your-first-steps-in-learning-tigergraph-cloud/
- keep the solution url, username, password handy to plug-in to the backend APIs in RASA at Step-4.
Step-0: Clone the repository
Step-1: Data Gathering - ConceptNet5, WordNet
- Run 1_WordNet.ipynb
- Run 2_MergeWordNet-ConceptNet.ipynb
Step-2: Data Preprocessing - ConceptNet5, WordNet
- Run 3_Preprocess.ipynb
Step-3: Load ConceptNet5 As TigerGraph (for Wiki demo chatbot)
Unique Edge: WordNet
Step-4: Building Dictionary Bot with RASA + TigerGraph ConceptNet5
- cd WIKI_Chatbot
Terminal-1:
- $ rasa train
- $ rasa run -m models --enable-api --cors "*" --debug
Terminal-2:
- $ rasa run actions
Time to chat with TigerGraph.
- Unzip ChatBot_Widget folder.
- Hit open ChatBot_Widget/index.html to start interacting with the TG WIKI Bot!
NOTE: This help page will not go into the depth of RASA, TigerGraph functionalities. This help page will touch base and demo how ConceptNet5 can be loaded into TigerGraph and integrated with RASA to implement a dictionary bot.
NOTE: Step-1, 2 are same as above
There are 3 different variations of the language graphs. Run the corresponding jupyter notebook to generatee the desired language graphs.
- Run 4_LanguageModel_SingleEdge.ipynb
- Run 5_LanguageModel_WN_UniqueEdge.ipynb
- Run 6_LanguageModel_CN_UniqueEdge.ipynb
Open a new terminal and setup RASA using the below commands:
- $ python3 -m virtualenv -p python3 .
- $ source bin/activate
- $ pip install rasa
- $ rasa init
After the execution of the above command, you will be prompted to enter project directory and name as desired. In this case, project named 'WIKI_Chatbot' will be created in the current directory as shown below,
Now th chatbot project is created successfully, Ya, that's quite simple to create a chatbot now with RASA!Now, navigate to the project folder WIKI_Chatbot/data and modify the default nlu.yml and rules.yml files by adding intents, rules for our dictionary usecase as show below,
- pip install pyTigerGraph
Now, navigate to the project folder WIKI_Chatbot/actions and modify the actions.py file to include TigerGraph connection parameters and action definitions with the respective GSQL querying endpoints as show below,
- Update the solution name and credentials to your data. Refer: Create tgcloud solution => https://www.tigergraph.com/blog/taking-your-first-steps-in-learning-tigergraph-cloud/
Add the defined action method to the domain.yml as shown below,
With this step, we are done with the installation and configuration of the RASA chatbot.
Recreate the below queries in tgcloud.io => Check gsql folder in the repository
Steps to create: https://docs-legacy.tigergraph.com/v/2.3/dev/gsql-ref/querying/query-operations
- Create
- Install
- In this work, we are using an open-source javascript-based chatbot UI to interact with the RASA solution we implemented in Step-1.
- The RASA server endpoint is configured in the widget/static/js/components/Chat.js as shown below,
All right, we are one step close to seeing the working of the TigerGraph and RASA integration.
Run the below commands in separate terminals,
Terminal-1:
- $ rasa train
- $ rasa run -m models --enable-api --cors "*" --debug
Terminal-2:
- $ rasa run actions
- Unzip ChatBot_Widget folder.
- Hit open ChatBot_Widget/index.html to start interacting with the TG WIKI Bot!
Yes, we are DONE!
I hope this source is informative and helpful.
https://medium.com/analytics-vidhya/integrating-rasa-chatbot-with-django-web-framework-f6cb71c58467 https://github.com/JiteshGaikwad/Chatbot-Widget/















