If you plan to use Retrieval-Augmented Generation (RAG) with VMware Private AI Foundation with NVIDIA, set up a PostgreSQL database with pgvector by using VMware Data Services Manager.

You can create the database manually or create a self-service catalog in VMware Aria Automation that can be used by DevOps engineers and developers.

Prerequisites

Procedure

  1. Deploy a PostgreSQL database in the VI workload domain and get the connection string for the database.
    You can use one of the following workflows. If you are a data scientist, you can directly deploy a database from VMware Aria Automation. Otherwise, you request a database deployment from your DSM Administrator or DSM User.
    Deployment Workflow Required User Role Description
    Deploy and get the connection string of a PostgreSQL database from VMware Aria Automation Data scientist or DevOps engineer See Deploy a Vector Database by Using a Self-Service Catalog Item in VMware Aria Automation.
    Deploy and get the connection string of a PostgreSQL database from the VMware Data Services Manager Console. DSM Administrator or DSM User, or a cloud administrator assigned one of these roles See Creating Databases and Connecting to a Database.
    Deploy and get the connection string of a PostgreSQL database by using the kubectl command DSM Administrator or DSM User, or a DevOps engineer assigned one of these roles See Enabling Self-Service Consumption of VMware Data Services Manager.
    The connection string of the deployed database has the following format.
    postgres://pgvector_db_admin:encoded_pgvector_db_admin_password@pgvector_db_ip_address:5432/pgvector_db_name
  2. Activate the pgvector extension on the database by using the psql command line utility.
    1. Connect to the database.
      psql -h pgvector_db_ip_address -p 5432 -d pgvector_db_name -U pgvector_db_admin -W
    2. Activate the pgvector extension.
      pgvector_db_name=# CREATE EXTENSION vector;

What to do next

Integrate the database in your RAG workload. See Deploy a Deep Learning VM with a RAG Workload and Deploy a RAG Workload on a TKG Cluster.

Deploy a Vector Database by Using a Self-Service Catalog Item in VMware Aria Automation

In VMware Private AI Foundation with NVIDIA, as data scientist or a DevOps engineer, you can deploy a vector database from VMware Aria Automation by using a self-service catalog item in Automation Service Broker.

Procedure

  1. Log in to VMware Aria Automation and, in Automation Service Broker, locate the catalog item for database deployment according to the information from your cloud administrator.
    By default, the catalog item is called DSM DBaaS.
  2. In the catalog item card, click Request and enter the details for the new PostgreSQL database.
    For more information on the settings for the database, see Creating Databases.
  3. Get the connection string of the deployed database.
    1. In Automation Service Broker, click Deployments > Deployments .
    2. Select the deployment entry for the database.
    3. On the Topology tab, select the cloud template for the database deployment and from the Actions menu for the template, select Get Connection String.

Results

For more information on provisioning and performing operations on databases in VMware Data Services Manager from VMware Aria Automation, see the readme.md file in the AriaAutomation_DataServicesManager bundle .