Skip to content

Latest commit

 

History

History
88 lines (46 loc) · 6.62 KB

step-by-step-guide.md

File metadata and controls

88 lines (46 loc) · 6.62 KB

Step-by-Step Guide to run this workshop

Part 1: Create and load a Neo4j Instance

Step 1. Go to Neo4j Aura website and click on "Start Free" Button

Screenshot 2023-11-21 at 3 21 07 PM

Step 2. Create an account - login with an email address or Continue with Google and accept terms & conditions

Screenshot 2023-11-21 at 3 22 44 PM

Step 3. Click on "New Instance" and then "Create Free Instance" to create a lifetime free instance which allows you to have 200K Nodes and 400K Relationships

Screenshot 2023-11-21 at 3 24 23 PM

Screenshot 2023-11-21 at 3 24 35 PM

Step 4. Download the password file and keep it safe as you would be needing it later to connect to the database. Wait until your instance is created and then click on "Query" button to open the Neo4j Workspace

Screenshot 2023-11-21 at 3 26 39 PM

Screenshot 2023-11-21 at 3 28 23 PM

Step 5. Next enter the password mentioned in the text password file you downloaded in previous step (Step 4) and click on "Connect" button to connect to the Neo4j Database

Screenshot 2023-11-21 at 3 29 43 PM

Step 6. Copy the contents of movies-db-setup.cypher file in this repo (Cypher code) and paste in the first prompt of the Neo4j Database and click on the "Play" button to load the database with Movies dataset.

Screenshot 2023-11-21 at 3 33 36 PM

Screenshot 2023-11-21 at 3 32 38 PM

Step 7. Once the cypher code is successfully executed, the Neo4j database will be loaded with Movies dataset containing 171 Nodes (Persona and Movies) and 253 Relationships (ACTED_IN, DIRECTED, FOLLOWS, PRODUCED, REVIEWED, WROTE).

Screenshot 2023-11-21 at 3 36 55 PM

Step 8. You can additionally type following Cypher code "MATCH (n) RETURN n" to view the entire visualization of loaded dataset in Neo4j

Screenshot 2023-11-21 at 3 49 10 PM



Part 2: Create Google AI Studio (earlier Google MakerSuite) account, train & test prompt in Google AI Studio and get Google Gemini API-Key

Step 1. Go to Google AI Studio website, click on "Go to MakerSuite" and login via your Gmail account (if you are using business email-id and your administrator has not enabled early-access to applications, then switch to your personal account for this workshop to generate API Key in later steps)

Screenshot 2023-11-21 at 4 06 00 PM

Step 2. On the Google AI Studio homepage, click on "Create" under Text Prompt on the homepage

Screenshot 2023-11-21 at 3 53 26 PM

Step 3. Copy the contents of sample prompt to generate Neo4j Cypher Code available in Neo4j_Cypher_Query_Generator_Prompt.txt file in the repo, paste in the Google AI Studio and click "Run" button.

Screenshot 2023-11-21 at 4 54 17 PM

Screenshot 2023-11-21 at 4 55 28 PM

Step 4. Google MakerSuite has now trained a model based on sample prompts. You can test the model by clicking on curly brackets ({}) next to "Insert", enter the test input as "Who is the director for the movie V for Vendetta" and click "Run" to generate cypher code based on the test input

Screenshot 2023-11-21 at 4 57 17 PM

Step 5. Click on "Get Code" and then click "Copy Code" to copy the generated prompt to be called from the PaLM API in our python notebook later on in Part #3. As next step, click on "Create your API Key". Make sure to save your prompt before leaving the window

Screenshot 2023-11-21 at 5 07 54 PM

Screenshot 2023-11-21 at 5 08 00 PM

Step 6. On the "API Keys" page click on "Create API key in new project" to generate the API key and then click on "Copy" to copy the key to embedded in the code later in Part #3

Screenshot 2023-11-21 at 5 16 19 PM

Screenshot 2023-11-21 at 5 17 09 PM



Part 3: Build things together in Python with Google Colab

Step 1: Open Python Notebook available in this repo in Google Colab and click on "Open in Colab" button

Screenshot 2023-11-21 at 8 58 51 PM

Step 2: Follow the instructions mentioned for each cell in the python notebook

Screenshot 2023-11-21 at 9 08 27 PM