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.

As a DSM user, you can create the database directly in the VMware Data Services Manager console, or, as a DevOps engineer or developer, you can use a self-service catalog in VMware Aria Automation.

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 in VMware Data Services Manager and Connecting to a Database in VMware Data Services Manager.
    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

As a data scientist or a DevOps engineer, you can use a self-service catalog item in Automation Service Broker to deploy a pgvector PostgreSQL database managed by VMware Data Services Manager.

Once deployed, the database instance can be used for other deployments, including by other members of your team, so multiple deep learning VMs can share a single vector database.

Procedure

  1. On the Catalog page in Automation Service Broker, locate the DSM Database card and click Request.
  2. Select a project.
  3. Enter a name for your deployment.
  4. Enter a name for your database.
  5. Configure the database.
    Setting Sample value
    VM class small

    The class selection defines the amount of vCPU and memory resources that are allocated to the database.

    Storage policy pacific-storage-policy
    Disk size 256 Gi
    For more information on database settings, see Creating Databases.
  6. Click Submit.
  7. 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.