Tech ONTAP Blogs

How to deploy and manage RAG knowledge base using FSx for ONTAP with BlueXP workload factory GenAI

robertbell
NetApp
262 Views

BlueXP™ workload factory for AWS (workload factory) is here to help orchestrate and automate workloads for your Amazon FSx for NetApp ONTAP (FSx for ONTAP) data. With many different capabilities, workload factory GenAI is used to bring enterprise data into generative artificial intelligence (GenAI) architectures. Together with Amazon Bedrock, workload factory can easily set up retrieval-augmented generation (RAG) pipelines.

This post will guide you on how to set up and operate workload factory GenAI to create a knowledge base, connect it to your data sources on FSx for ONTAP, and make it accessible to your RAG-based AI applications.

 

The following steps walk you through the process in its centralized user flow:

Step 1: Log in to workload factory    

Step 2: Open workload factory GenAI   

Step 3: Create your first knowledge base  

Step 4: Configure your knowledge base  

Step 5: Add an FSx for ONTAP data source  

Step 6: Embed your data into the vector database  

Step 7: Publish the knowledge base  

 

Workload factory GenAI Walkthrough

Step 1: Log in to workload factory

First, go to the workload factory home page. Log in with an existing workload factory account or sign up to create a new one.

1 - sign in.png

 

Step 2: Open workload factory GenAI

Workload factory is used to deploy and manage a variety of different workloads. Workload factory GenAI is located in the AI section of the workload factory home page. To learn more about this process, read our post Maximizing the value of GenAI with Amazon Bedrock and Amazon FSx for NetApp ONTAP.

Go to the navigation menu on the left and select the GenAI icon (the chip shape). 

Another way to do this is to select “Deploy & manage” from the options in the AI section of the workload factory homepage.

 

2 - Homepage.png

 

In the next screen you can read the Introduction and then click “Get started.”

 

Step 3: Create your first knowledge base

Workload factory GenAI will start you off by asking to create a knowledge base for the RAG function.

A knowledge base consists of one or more data sources on FSx for ONTAP or on-premises NetApp® ONTAP®. The data within the knowledge base is an embedding representation of your source data, automatically stored under the hood in a vector database. This data can then be used to augment prompts from the GenAI application. 

To get started, click the “Next” button.

3 - Deploy GenAI Infrastructure.png

 

Step 4: Configure your knowledge base

In the next screen you’ll be asked to define the details of your knowledge base.

Make sure to follow your organization’s best practices on styling conventions and AI governance as you complete this section.

4 - Configure knowledge base.png

Click on each of the sections to configure the knowledge base. Here’s a look at each of them.

1. First, you’re prompted to give your knowledge base a name. 

5 - Configure knowledge base name.png

2. Next, add a Description of the knowledge base. 

6 - Configure knowledge base description.png

3. Now, define the embedding model the knowledge base will rely on.

7 - Configure knowledge base embedding model.png

4. Next, add a Chat model.

8 - Configure knowledge base chat model.png

5. And finally, you’ll find a slider that allows you to turn on conversation starters. There are two options for this: Automatic mode, which will generate four conversation starters once your data is scanned, or Manual mode, which will allow you to define your own.

9 - Configure knowledge base conversation starters mode.png

Once you have all the correct information about the knowledge base entered, click the “Create Knowledge base” button.

 

Step 5: Add an FSx for ONTAP data source

Workload factory GenAI lets you add FSx for ONTAP volumes as data sources for your RAG’s knowledge base.

1. You’ll now be in the “Add data source” screen, where you’ll be prompted to select one or more file systems from a list of available FSx for ONTAP file systems. (Note: If you haven’t set up an FSx for INTAP file system before, here are the instructions.)

Select the file system(s) that you want the GenAI application to access, and click “Next.” 

10 - Add data source.png

2. In the next screen, select one or more volumes where your private data is stored.

11 - Select data source volumes.png

3. For SMB volume(s), you need to enter your user credentials, domain name, and ActiveDirectory IP address

When you’re done, click the “Apply” button.

12 - Configure SMB volume Active Directory.png

4. In the next screen, you’ll be asked to select a data source. 

You can either choose to embed the entire volume or specific folders in the selected volume(s).

13 - Entire volume or specific volumes.png

5. If you choose the option for specific folders, you’ll be presented with a list of all the folders that reside in the volume. 

Select each of the folders you want to use for the RAG pipeline.

14 - Selecting specific folders.png

6. Next, you can define the parameters for the embedding model that will be used to create embedding vectors for your data sources. Here, you can choose how data is being chunked and stored in the vector database.

15 - Configure chunking.png

7. SMB volumes data source will also have the option to enable “Permission aware.” This setting will restrict answers to use only sources the user can access.

16 - Permission aware.png

8. Once your data source is added, you will now see it is listed for the corresponding knowledge base under the workload factory GenAI screen.

16 - Knowledge bases dashboard.png

9. From here, you can view and manage this knowledge base and any others that you create. 

Find the knowledge base you want to manage in the list and click the three-dot menu icon to its right. Then select the “Manage Knowledge base” option from the drop down menu.

17 - Manage knowledge bases button.png

10. This opens a screen where you can view the details of the knowledge base and add more data sources.

18 - Manage knowledge bases screen.png

Step 6: Embed your data into the vector database

Now we’ll show how to kickstart the automatic embedding process that transforms the data sources of your knowledge base into embedding vectors and stores them in the vector database. 

1. Go back to the workload factory GenAI screen, find the knowledge base you want to embed from the list, and click on its three-dot menu icon. 

2. Select “Scan now” from the drop-down menu to embed your data.

19 - Scan now button.png

Note that the first scan will be a full system scan, while consecutive scans will only look at differences in data source from previous scans such as deleted or modified data.

 

Step 7: Publish the knowledge base

Publishing the knowledge base activates a unique API endpoint so that your GenAI applications can access the knowledge base data.

1. Go back to the list of knowledge bases in the workload factory GenAI screen. 

2. Find the knowledge base you want to publish and select the “Manage Knowledge bases” option from its drop-down menu.

3. Now go to the Actions menu to the upper right of the screen and select “Publish” from the options.

20 - Publish knowledge base.png

Your knowledge base has now been published for your GenAI apps to find.

 

Conclusion

Workload factory GenAI is a quick and easy way to get a Knowledge base up and running with your organization’s private data on FSx for ONTAP for GenAI applications.

There’s a lot more workload factory can do for you to check out. To learn more, visit the BlueXP workload factory for AWS homepage or get started now.

 

This post was co-authored by Eric Yuen, Sr. Partner Solutions Architect for Storage, AWS

Public