Skip to main content
This section will cover the Python code to connect to HelixDB and create nodes and edges, create embeddings for the professors, search by embeddings, and filtering.

Step 1: Setting up the environment

Step 2: Imports and Setup for HelixDB

Here we start creating all the nodes that we will link a professors to.
You can also make a query in queries.hx to get the ID of the research area if you have the name, but we will store it in Python for simplicity.

Sample Data

Create Professor Node

Create Department Node

Create University Node

Create Research Area Nodes

Step 5: Create Embeddings for the professor

Create Research Area Embedding

Step 6: Lets answer some of the questions we asked in the beginning

  1. “What professors does X research area?”
  1. “What professors are working in X University?”
  1. “What professors are working in X Department?”
  1. “What professors are working in the X University and are working in X department?”
  1. “Find me professors doing X research area”
  1. “I want to find professors working in computer vision, in X university”