Movie recommendation using RASA, TigerGraph

Overview

Demo run:

The below video will highlight the runtime of this setup and some sample real-time conversations using the power of RASA + TigerGraph,

IMAGE ALT TEXT HERE

Steps to run this solution:

Step-0:

Step-1: (Scroll down for detailed setup instructions)

  • cd Movie_Chatbot

Terminal-1:

  • $ rasa train
  • $ rasa run -m models --enable-api --cors "*" --debug

Terminal-2:

  • $ rasa run actions

Step-2: (Scroll down for detailed setup instructions)

  • Run tgcloud solution

Project Overview: Movie recommendations using RASA + TigerGraph

Conversational recommendation systems (CRS) using knowledge graphs is a hot topic as they intend to return the best real-time recommendations to users through a multi-turn interactive conversation. CRS allows users to provide their feedback during the conversation, unlike the traditional recommendation systems. CRS can combine the knowledge of the predefined user profile with the current user requirements to output custom yet most relevant recommendations or suggestions. This work will implement a chatbot using the open-source chatbot development framework - RASA and the most powerful, super-fast, and leading cloud graph database - TigerGraph.

NOTE: This help page will not go into the depth of RASA, TigerGraph functionalities. This help page will touch base and demo how TigerGraph can be integrated with RASA.

Technological Stack

Here is the high-level outline of the technological stack used in this demo project,

Putting things to work

Step-1: (RASA) Implement language models, user intents and backend actions

Beginner tutorial: This is a very good spot to learn about setting up a basic chatbot using RASA and understanding the core framework constructs.

Step-1a: Install RASA

Open a new terminal and setup RASA using the below commands:

  • $ python3 -m virtualenv -p python3 .
  • $ source bin/activate
  • $ pip install rasa

Step-1b: Create new RASA project

  • $ rasa init

After the execution of the above command, a new RASA 'Movie_Chatbot' project will be created in the current directory as shown below,

Below is a kick-off conversation with the newly created chatbot,

Ya, that's quite simple to create a chatbot now with RASA!

Step-1c: Define intents, stories, action triggers

Now, navigate to the project folder Movie_Chatbot/data and modify the default nlu.yml and rules.yml files by adding intents, rules for our movie recommendation business usecase as show below,

Step-1d: Install the TigerGraph python library using pip with the below command,

  • pip install pyTigerGraph

Step-1e: Define action endpoints

Now, navigate to the project folder Movie_Chatbot/actions and modify the actions.py file to include TigerGraph connection parameters and action definitions with the respective movie recommendation CSQL query as show below,

Add the defined action method to the domain.yml as shown below,

Here, 'RecommendMovies' is the name of the CSQL query in the tgcloud database which will discuss in detail in the next section.

With this step, we are done with the installation and configuration of the RASA chatbot.

Step-2: (TigerGraph) Setup TigerGraph database and querying APIs

Beginner tutorial: This is a very good spot to learn about setting up a tigergraph database on the cloud and implementing CSQL queries,

Step-2a: Setup tgcloud database

  • Go to, http://tgcloud.io/ and create a new account.

  • Activate the account.

  • Go to, "My Solutions" and click "Create Solution"

  • Select the starter kit as shown below then click Next twice.

  • Provide a solution name, password tags, and subdomain as needed, and then click 'Next'

  • Enter Submit and close your eyes for the magic!

And Yes!, the TigerGraph Movie recommendation Graph database is created. Buckle up a few more things to do!

  • Go to, GraphStudio and 'Load Data' by selecting the *.csv files and hit the 'play' button as shown below.

  • Once the data is loaded, data statistics should display a green 'FINISHED' message as shown below.

  • Go to, 'Write Queries' and implement the CSQL queries here as shown below,

  • Save the CSQL query and publish it using the 'up arrow' button.

  • Lets, test the query by running with a sample input as shown below,

All Set! The TigerGraph Database is up and running. Are we done? Almost! There is one more thing to do!

Step-2b: Configure secret token

  • Let's set up the secret key access to the cloud TigerGraph API as it is very crucial to ensure a secure way of providing access to the data.

  • Go to, Admin Dashboard->Users->Management and define a secret key as shown below,

  • NOTE: Please remember to copy the key to be used in the RASA connection configuration (Movie_ChatBot/actions/actions.py)

Step-3: (Web UI) Setting up a web ui for the RASA chatbot

  • 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/Chat.js as shown below,

All right, we are one step close to seeing the working of the TigerGraph and RASA integration.

Step-4: (RASA+TigerGraph) Start RASA and run Actions

Run the below commands in separate terminals,

Terminal-1:

  • $ rasa train
  • $ rasa run -m models --enable-api --cors "*" --debug

Terminal-2:

  • $ rasa run actions

Step-5: (ChatBot UI) Open Chatbot User interface

Hit open widget/index.html to start interacting with the TigerBot movie recommendation engine!

Yes, we are DONE!

I hope this source is informative and helpful.

References:

Owner
Sudha Vijayakumar
Graduate student | Aspiring Software Engineer - Applied Data Science AI/ML/DL
Sudha Vijayakumar
Create HTML profiling reports from pandas DataFrame objects

Pandas Profiling Documentation | Slack | Stack Overflow Generates profile reports from a pandas DataFrame. The pandas df.describe() function is great

10k Jan 01, 2023
China and India Population and GDP Visualization

China and India Population and GDP Visualization Historical Population Comparison between India and China This graph shows the population data of Indi

Nicolas De Mello 10 Oct 27, 2021
A simple python tool for explore your object detection dataset

A simple tool for explore your object detection dataset. The goal of this library is to provide simple and intuitive visualizations from your dataset and automatically find the best parameters for ge

GRADIANT - Centro Tecnolóxico de Telecomunicacións de Galicia 142 Dec 25, 2022
:art: Diagram as Code for prototyping cloud system architectures

Diagrams Diagram as Code. Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture d

MinJae Kwon 27.5k Dec 30, 2022
kyle's vision of how datadog's python client should look

kyle's datadog python vision/proposal not for production use See examples/comprehensive.py for a mostly working example of the proposed API. 📈 🐶 ❤️

Kyle Verhoog 2 Nov 21, 2021
paintable GitHub contribute table

githeart paintable github contribute table how to use: Functions key color select 1,2,3,4,5 clear c drawing mode mode on turn off e print paint matrix

Bahadır Araz 27 Nov 24, 2022
Comparing USD and GBP Exchange Rates

Currency Data Visualization Comparing USD and GBP Exchange Rates This is a bar graph comparing GBP and USD exchange rates. I chose blue for the UK bec

5 Oct 28, 2021
Visualize and compare datasets, target values and associations, with one line of code.

In-depth EDA (target analysis, comparison, feature analysis, correlation) in two lines of code! Sweetviz is an open-source Python library that generat

Francois Bertrand 2.3k Jan 05, 2023
LinkedIn connections analyzer

LinkedIn Connections Analyzer 🔗 https://linkedin-analzyer.herokuapp.com Hey hey 👋 , welcome to my LinkedIn connections analyzer. I recently found ou

Okkar Min 5 Sep 13, 2022
Profile and test to gain insights into the performance of your beautiful Python code

Profile and test to gain insights into the performance of your beautiful Python code View Demo - Report Bug - Request Feature QuickPotato in a nutshel

Joey Hendricks 138 Dec 06, 2022
YOPO is an interactive dashboard which generates various standard plots.

YOPO is an interactive dashboard which generates various standard plots.you can create various graphs and charts with a click of a button. This tool uses Dash and Flask in backend.

ADARSH C 38 Dec 20, 2022
An application that allows you to design and test your own stock trading algorithms in an attempt to beat the market.

StockBot is a Python application for designing and testing your own daily stock trading algorithms. Installation Use the

Ryan Cullen 280 Dec 19, 2022
Python library that makes it easy for data scientists to create charts.

Chartify Chartify is a Python library that makes it easy for data scientists to create charts. Why use Chartify? Consistent input data format: Spend l

Spotify 3.2k Jan 04, 2023
University of Missouri - Kansas City: CS451R: Capstone

CS451RC University of Missouri - Kansas City: CS451R: Capstone Installation cd git clone https://github.com/ala2q6/CS451RC.git cd CS451RC pip3 instal

Alex Arbuckle 1 Nov 17, 2021
Plot toolbox based on Matplotlib, simple and elegant.

Elegant-Plot Plot toolbox based on Matplotlib, simple and elegant. 绘制效果 绘制过程 数据准备 每种图标类型的目录下有data.csv文件,依据样例数据填入自己的数据。

3 Jul 15, 2022
Getting started with Python, Dash and Plot.ly for the Data Dashboards team

data_dashboards Getting started with Python, Dash and Plot.ly for the Data Dashboards team Getting started MacOS users: # Install the pyenv version ma

Department for Levelling Up, Housing and Communities 1 Nov 08, 2021
A minimalistic wrapper around PyOpenGL to save development time

glpy glpy is pyOpenGl wrapper which lets you work with pyOpenGl easily.It is not meant to be a replacement for pyOpenGl but runs on top of pyOpenGl to

Abhinav 9 Apr 02, 2022
High performance, editable, stylable datagrids in jupyter and jupyterlab

An ipywidgets wrapper of regular-table for Jupyter. Examples Two Billion Rows Notebook Click Events Notebook Edit Events Notebook Styling Notebook Pan

J.P. Morgan Chase 75 Dec 15, 2022
Python ts2vg package provides high-performance algorithm implementations to build visibility graphs from time series data.

ts2vg: Time series to visibility graphs The Python ts2vg package provides high-performance algorithm implementations to build visibility graphs from t

Carlos Bergillos 26 Dec 17, 2022
Python module for drawing and rendering beautiful atoms and molecules using Blender.

Batoms is a Python package for editing and rendering atoms and molecules objects using blender. A Python interface that allows for automating workflows.

Xing Wang 1 Jul 06, 2022