Vector Database
Robi AI uses a vector database to store documentation embeddings, which it uses as a knowledge base when answering questions about UAC. You must set up the vector database before installing the AI Service.
Robi AI supports PGVector, a PostgreSQL extension for vector similarity search.
Prerequisites
Before setting up PGVector, ensure the following are in place:
- PostgreSQL 17 installed and running
- PGVector extension installed on the PostgreSQL server
- A database created for the AI Service
- A database user with permissions to create extensions, tables, and insert data
- Network connectivity to the PostgreSQL server from both the machine running the SQL import and the machine that will run the AI Service
Installing PGVector
Follow the PGVector installation guide to install the PGVector extension into your PostgreSQL instance.
The AI Service connects to the vector database using the following defaults:
Setting | Value |
|---|---|
Table name |
|
Index name |
|
Distance Type |
|
Dimensions |
|
Schema |
|
Do not change any of these values. The pre-computed documentation embeddings (below) rely on these settings.
Importing Documentation Embeddings
Once PGVector is installed, import the pre-computed documentation embeddings provided by Stonebranch.
The import will drop and recreate the vector_store table. Any existing data in the table will be lost.
-
Download the provided SQL dump file,
ai-{release}-{build}-vector_db_dump.sql. -
Run the following command to import the embeddings into your database:
- Linux
- Windows
psql -h <HOST> -U <USER> -d <DATABASE> -f ai-{release}-{build}-vector_db_dump.sql"C:\Program Files\PostgreSQL\17\bin\psql.exe" -h <HOST> -U <USER> -d <DATABASE> -f ai-{release}-{build}-vector_db_dump.sqlReplace
<HOST>,<USER>, and<DATABASE>with the appropriate values for your environment (for example,localhost,postgres, andai_db).