Quick Start Guide

To get started, we will describe how to build a basic pipeline using the VectorShift platform. In doing so, we will discuss a few different parts of the platform!

We will discuss how to build a pipeline that answers questions about a given website. In summary:

  1. Part 1: Navigating to our pipeline builder

  2. Part 2: Building a pipeline that is able to analyze a website

  3. Part 3: Deploying the pipeline

Part 1: Navigating to our pipeline builder

After logging into VectorShift, you will be able to open our pipeline builder by selecting "New" >> "Create Pipeline" within the "Pipelines" tab. See image below:

Within the pipeline builder,

  • You will be use the "nodes" under the various tabs at the top of the page to build a pipeline (a workflow).

  • On the top right, you can click "Run" to run the pipeline within the pipeline builder to iterate on pipeline architecture.

  • After making an edit to a pipeline (e.g., using a node) a "Save pipeline" button will appear on the top right. View saved pipelines in the "Pipelines" tab.

Part 2: Building a pipeline that is able to analyze a website

At a high level, we need the following functionality:

  1. Step 1: A way to input the URL of the website you want to analyze and embed the contents into a vector database. A vector database allows for semantic based queries that returns the most relevant pieces of information. The information can then be subsequently used by an LLM to answer questions.

  2. Step 2: A way for the 1) vector database to return relevant context based on the user query and 2) for the pipeline to receive a query from the user.

  3. Step 3: A large language model instructed to be an analyst that answers questions based on relevant context from the vector database.

Step 1: A way to input the URL of the website into the pipeline and embed it into a Vector database

We need to feed the contents of a URL into a Vector database and allow for relevant information to be queried from the Vector database.

  1. In the “General” tab, use a text node and copy in the URL link you want to analyze. In this case, we are using Vectorshift.ai.

  2. We connect the text node to a URL loader which reads data from a URL and transforms the data into a format that can be loaded into a vector database.

  3. We connect the URL loader into a Vector Query node (the "documents" edge) which stores the contents of website in a temporary Vector database (a database that allows for semantic / meaning-based search).

Step 2: A way for Vector Query node to return relevant information and a way for the pipeline to allow inputs from the user

  1. In the "General" tab, we drag out an input node. This gives the functionality for a user to ask a question / enter queries. We need to connect it both to the Vector Query node and to the LLM. This is because:

    1. Connecting the input node to the Vector Query node and the output of the Vector Query node to the prompt edge of the LLM allows the user question to query the Vector Database to retrieve relevant information, which is then outputted into the prompt (the LLM uses this context to be able to answer the user question).

    2. We use the "Prompt" field within the LLM node (here, we are using OpenAI's GPT 3.5 Turbo - discussed later) to write the prompt. Within a field, every time you use double curly braces {{}}, the text within the double braces will automatically appear on the left-hand side of the node (an "edge"); the associated data connected to the named nodes will “replace” the curly brackets when the pipeline runs. Here, we use two curly braces. One for the user question ({{user_question}}), which we label as "User Question" and is connected to the input node, and another for Context ({{Context}}), which we label as "Context" which is connected to the output of the Vector Query node.

      1. Labeling simply means we call out "User Question" or "Context" right above the variable.

      2. You may also use a text node as a prompt. To do this, you can place the same contents of what is in the prompt field in a text node and connect the output of the text node to the "Prompt" handle of a LLM node.

Step 3: Using a LLM that is instructed to be an analyst that responds based on the prompt

  1. In the LLMs tab, you will find your LLM options. In the case we are using OpenAI's GPT 3.5-Turbo.

  2. We have already completed the "Prompt" field from above. Now, we need to complete the "Systems" field which tells the LLM how to behave. In this case we write: "You are an analyst that answers User Question based on Context". Note, we use the same labels, "User Question" and "Context" which match the labels we used in the prompt.

  3. Finally, we use an output node (from the "home" tab) and connect it to the "response" edge of the Open AI LLM node.

Finally, save the pipeline by clicking "Save" on the top right of the pipeline builder. Here you can name and add a short description. The pipeline will now appear in your "Pipelines" tab.

Part 3: Deploying

There are four ways to deploy this pipeline. You can:

  1. Run within pipeline builder

  2. Run as a form

  3. Generate an API call

  4. Use this pipeline as the "backend" for a chatbot

Run within pipeline builder

Click " run pipeline" in the top right of the pipeline builder. In this case, you can directly ask a question in the "input_1" input box and click "run" to run the pipeline.

You can change the naming of the input variables through the input node.

Run as a form

On the "Pipelines" Tab, click "Run" on the pipeline. This will show a pop up that will allow you to run the pipeline.

Generate an API Call

Click on the three dots of the right hand side of a pipeline and click "Generate API Call". You can find your API key under "Settings" (by clicking on your profile on the top right).

Use the pipeline as the "Backend" for a chatbot

In the "Chatbots" tab, click "+Add" and follow the instructions to create a chatbot.

Click "Run" on the chatbot to run or you can generate a website or API call for your chatbot.

Last updated