Skip to content

Commit 02ce1c2

Browse files
authored
Merge pull request #5889 from EnterpriseDB/release-2024-07-30a
Release 2024-07-30a
2 parents 0e9d94c + e7bc3cf commit 02ce1c2

File tree

120 files changed

+5668
-1076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+5668
-1076
lines changed

.github/workflows/check-links.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: check links on PR
2+
on:
3+
pull_request:
4+
types: [opened, synchronize]
5+
jobs:
6+
check-links:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repo
10+
uses: actions/checkout@v4
11+
with:
12+
lfs: true
13+
ref: ${{ github.event.pull_request.head.sha }}
14+
15+
- name: setup node
16+
uses: actions/setup-node@v4
17+
18+
- name: install dependencies
19+
run: npm --prefix ./tools/automation/actions/link-check ci
20+
21+
- name: check links
22+
uses: ./tools/automation/actions/link-check

.vscode/launch.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch update links to renames",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/tools/user/reorg/links/update-links-to-renames.js"
15+
},
16+
{
17+
"type": "node",
18+
"request": "launch",
19+
"name": "Launch link-check",
20+
"skipFiles": [
21+
"<node_internals>/**"
22+
],
23+
"program": "${workspaceFolder}/tools/automation/actions/link-check/index.js"
24+
}
25+
]
26+
}

advocacy_docs/community/contributing/styleguide.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,11 @@ Information about managing authentication is also available in the [Postgres co
389389

390390
If you're referring to a guide on Docs 2.0, the label is the name of the guide and in italics. For example:
391391

392-
For information about modifying the `pg_hba.conf` file, see the [_PEM Administrator's Guide_](https://www.enterprisedb.com/docs/pem/latest/pem_admin/).
392+
For information about modifying the `pg_hba.conf` file, see the [_PEM Administrator's Guide_](/pem/latest/).
393393

394394
Link capitalization can be either title or sentence case:
395395

396-
* **Use title case** and _italics_ when referring to the linked doc by name. For example. “For information about modifying the `pg_hba.conf` file, see the [_PEM Administrator's Guide_](https://www.enterprisedb.com/docs/pem/latest/pem_admin/).”).
396+
* **Use title case** and _italics_ when referring to the linked doc by name. For example. “For information about modifying the `pg_hba.conf` file, see the [_PEM Administrator's Guide_](/pem/latest/).”).
397397

398398
* **Use sentence case** when linking in the middle of a sentence. For example, “\[\] follow the identifier rules when creating \[\]“).
399399

advocacy_docs/edb-postgres-ai/ai-ml/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: EDB Postgres AI - AI/ML
33
navTitle: AI/ML
44
indexCards: simple
55
iconName: BrainCircuit
6-
description: How to make use of EDB Postgres AI for AI/ML workloads and using the pgai extension.
6+
description: How to make use of EDB Postgres AI for AI/ML workloads and using the aidb extension.
77
navigation:
88
- overview
99
- install-tech-preview
@@ -12,11 +12,11 @@ navigation:
1212

1313
EDB Postgres® AI Database is designed to solve all AI data management needs, including storing, searching, and retrieving of AI data. This up-levels Postgres to a database that manages and serves all types of data modalities directly and combines it with its battle-proof strengths as an established Enterprise system of record that manages high-value business data.
1414

15-
In this tech preview, you can use the pgai extension to build a simple retrieval augmented generation (RAG) application in Postgres.
15+
In this tech preview, you can use the aidb extension to build a simple retrieval augmented generation (RAG) application in Postgres.
1616

17-
An [overview](overview) of the pgai extension gives you a high-level understanding of the major functionality available to date.
17+
An [overview](overview) of the aidb extension gives you a high-level understanding of the major functionality available to date.
1818

19-
To get started, you will need to [install the pgai tech preview](install-tech-preview) and then you can start [using the pgai tech preview](using-tech-preview) to build your RAG application.
19+
To get started, you will need to [install the aidb tech preview](install-tech-preview) and then you can start [using the aidb tech preview](using-tech-preview) to build your RAG application.
2020

2121

2222

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
---
2-
title: EDB Postgres AI AI/ML - Installing the pgai tech preview
2+
title: EDB Postgres AI AI/ML - Installing the aidb tech preview
33
navTitle: Installing
4-
description: How to install the EDB Postgres AI AI/ML pgai tech preview and run the container image.
4+
description: How to install the EDB Postgres AI AI/ML aidb tech preview and run the container image.
55
prevNext: true
66
---
77

8-
The preview release of pgai is distributed as a self-contained Docker container that runs PostgreSQL and includes all of the pgai dependencies.
8+
The preview release of aidb is distributed as a self-contained Docker container that runs PostgreSQL and includes all of the aidb dependencies.
99

1010
## Configuring and running the container image
1111

1212
If you haven't already, sign up for an EDB account and log in to the EDB container registry.
1313

14-
Log in to Docker with the username tech-preview and your EDB Repo 2.0 subscription token as your password:
14+
Log in to Docker with the username tech-preview and your EDB Repos 2.0 subscription token as your password:
1515

1616
```shell
1717
docker login docker.enterprisedb.com -u tech-preview -p <your_EDB_repo_token>
1818
__OUTPUT__
1919
Login Succeeded
2020
```
2121

22-
Download the pgai container image:
22+
Download the aidb container image:
2323

2424
```shell
25-
docker pull docker.enterprisedb.com/tech-preview/pgai
25+
docker pull docker.enterprisedb.com/tech-preview/aidb
2626
__OUTPUT__
2727
...
28-
Status: Downloaded newer image for docker.enterprisedb.com/tech-preview/pgai:latest
29-
docker.enterprisedb.com/tech-preview/pgai:latest
28+
Status: Downloaded newer image for docker.enterprisedb.com/tech-preview/aidb:latest
29+
docker.enterprisedb.com/tech-preview/aidb:latest
3030
```
3131

32-
Specify a password to use for Postgres in the environment variable PGPASSWORD. The tech preview container will set up Postgres with this password and use it to connect to it. In bash or zsh set it as follows:
32+
Specify a password to use for Postgres in the environment variable PGPASSWORD. The tech preview container set up Postgres with this password and use it to connect to it. In bash or zsh set it as follows:
3333

3434
```shell
3535
export PGPASSWORD=<your_password>
3636
```
3737

38-
You can use the pgai extension with encoder LLMs in Open AI or with open encoder LLMs from HuggingFace. If you want to use Open AI you also must provide your API key for that in the OPENAI_API_KEY environment variable:
38+
You can use the aidb extension with encoder LLMs in Open AI or with open encoder LLMs from HuggingFace. If you want to use Open AI you also must provide your API key for that in the OPENAI_API_KEY environment variable:
3939

4040
```shell
4141
export OPENAI_API_KEY=<your_openai_key>
4242
```
4343

44-
You can use the pgai extension with AI data stored in Postgres tables or on S3 compatible object storage. To work with object storage you need to specify the ACCESS_KEY and SECRET_KEY environment variables:.
44+
You can use the aidb extension with AI data stored in Postgres tables or on S3 compatible object storage. To work with object storage you need to specify the ACCESS_KEY and SECRET_KEY environment variables:
4545

4646
```shell
4747
export ACCESS_KEY=<your_access_key>
4848
export SECRET_KEY=<your_secret_key>
4949
```
5050

51-
Start the pgai tech preview container with the following command. It makes the tech preview PostgreSQL database available on local port 15432:
51+
Start the aidb tech preview container with the following command. It makes the tech preview PostgreSQL database available on local port 15432:
5252

5353
```shell
54-
docker run -d --name pgai \
54+
docker run -d --name aidb \
5555
-e ACCESS_KEY=$ACCESS_KEY \
5656
-e SECRET_KEY=$SECRET_KEY \
5757
-e OPENAI_API_KEY=$OPENAI_API_KEY \
5858
-e POSTGRES_PASSWORD=$PGPASSWORD \
5959
-e PGDATA=/var/lib/postgresql/data/pgdata \
6060
-p 15432:5432 \
61-
docker.enterprisedb.com/tech-preview/pgai:latest
61+
docker.enterprisedb.com/tech-preview/aidb:latest
6262
```
6363

6464

@@ -70,7 +70,7 @@ If you haven't yet, install the Postgres command-line tools. If you're on a Mac,
7070
brew install libpq
7171
```
7272

73-
Connect to the tech preview PostgreSQL running in the container. Note that this relies on $PGPASSWORD being set - if you're using a different terminal for this part, make sure you re-export the password:
73+
Connect to the tech preview PostgreSQL running in the container. Note that this relies on setting the PGPASSWORD environment variable - if you're using a different terminal for this part, make sure you re-export the password:
7474

7575
```shell
7676
psql -h localhost -p 15432 -U postgres postgres
@@ -82,10 +82,10 @@ postgres=#
8282
```
8383

8484

85-
Install the pgai extension:
85+
Install the aidb extension:
8686

8787
```sql
88-
create extension pgai cascade;
88+
create extension aidb cascade;
8989
__OUTPUT__
9090
NOTICE: installing required extension "plpython3u"
9191
NOTICE: installing required extension "vector"
@@ -99,9 +99,9 @@ __OUTPUT__
9999
List of installed extensions
100100
Name | Version | Schema | Description
101101
------------+---------+------------+------------------------------------------------------
102-
pgai | 0.0.1 | public | An extension to do the AIs
102+
aidb | 0.0.2 | public | An extension to do the AIs
103103
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
104104
plpython3u | 1.0 | pg_catalog | PL/Python3U untrusted procedural language
105-
vector | 0.6.0 | public | vector data type and ivfflat and hnsw access methods
105+
vector | 0.7.2 | public | vector data type and ivfflat and hnsw access methods
106106
(4 rows)
107107
```

advocacy_docs/edb-postgres-ai/ai-ml/overview.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
---
22
title: EDB Postgres AI AI/ML - Overview
33
navTitle: Overview
4-
description: Where to start with EDB Postgres AI AI/ML and the pgai tech preview.
4+
description: Where to start with EDB Postgres AI AI/ML and the aidb tech preview.
55
prevNext: True
66
---
77

8-
At the heart of EDB Postgres® AI is the EDB Postgres AI database (pgai). This builds on Postgres's flexibility and extends its capability to include storing the vector data of embeddings.
8+
At the heart of EDB Postgres® AI is the EDB Postgres AI database (aidb). This builds on Postgres's flexibility and extends its capability to include storing the vector data of embeddings.
99

10-
The pgai extension is currently available as a tech preview. It will be continuously extended with new functions. This overview presents the functionality available to date.
10+
The aidb extension is currently available as a tech preview. It will be continuously extended with new functions. This overview presents the functionality available to date.
1111

12-
![PGAI Overview](images/pgai-overview-withbackground.png)
12+
![AIDB Overview](images/aidb-overview-withbackground.png)
1313

14-
pgai introduces the concept of a “retriever” that you can create for a given type and location of AI data. Currently pgai supports unstructured plain text documents as well as a set of image formats. This data can either reside in regular columns of a Postgres table or it can reside in an S3 compatible object storage bucket.
14+
aidb introduces the concept of a “retriever” that you can create for a given type and location of AI data. Currently aidb supports unstructured plain text documents as well as a set of image formats. This data can either reside in regular columns of a Postgres table or it can reside in an S3 compatible object storage bucket.
1515

16-
A retriever encapsulates all processing that is needed to make the AI data in the provided source location searchable and retrievable through similarity. The application just needs to create a retriever via the `pgai.create_retriever()` function. When `auto_embedding=TRUE` is specified the pgai extension will automatically generate embeddings for all the data in the source location.
16+
A retriever encapsulates all processing that is needed to make the AI data in the provided source location searchable and retrievable through similarity. The application just needs to create a retriever via the `aidb.create_retriever()` function. When `auto_embedding=TRUE` is specified the aidb extension will automatically generate embeddings for all the data in the source location.
1717

18-
Otherwise it will be up to the application to request a bulk generation of embeddings using `pgai.refresh_retriever()`.
18+
Otherwise it will be up to the application to request a bulk generation of embeddings using `aidb.refresh_retriever()`.
1919

20-
Auto embedding is currently supported for AI data stored in Postgres tables and it automates the embedding updates using Postgres triggers. You can also combine the two options by using pgai.refresh_retriever() to embed all previously existing data and also setting `auto_embedding=TRUE` to generate embeddings for all new and changed data from now on.
20+
Auto embedding is currently supported for AI data stored in Postgres tables and it automates the embedding updates using Postgres triggers. You can also combine the two options by using aidb.refresh_retriever() to embed all previously existing data and also setting `auto_embedding=TRUE` to generate embeddings for all new and changed data from now on.
2121

22-
All embedding generation, storage, indexing and management is handled by the pgai extension internally. The application just has to specify the encoder LLM that the retriever should be using for this specific data and use case.
22+
All embedding generation, storage, indexing, and management is handled by the aidb extension internally. The application just has to specify the encoder LLM that the retriever should be using for this specific data and use case.
2323

24-
Once a retriever is created and all embeddings are up to date, the application can just use pgai.retrieve() to run a similarity search and retrieval by providing a query input. When the retriever is created for text data, the query input is also a text term. For image retrievers the query input is an image. The pgai retriever makes sure to use the same encoder LLM for the query input, conducts a similarity search and finally returns the ranked list of similar data from the source location.
24+
Once a retriever is created and all embeddings are up to date, the application can just use aidb.retrieve() to run a similarity search and retrieval by providing a query input. When the retriever is created for text data, the query input is also a text term. For image retrievers the query input is an image. The aidb retriever makes sure to use the same encoder LLM for the query input, conducts a similarity search and finally returns the ranked list of similar data from the source location.
2525

26-
pgai currently supports a broad list of open encoder LLMs from HuggingFace as well as a set of OpenAI encoders. Consult the list of supported encoder LLMs in the pgai.encoders meta table. HuggingFace LLMs are running locally on the Postgres node, while OpenAI encoders involve a call out to the OpenAI cloud service.
26+
aidb currently supports a broad list of open encoder LLMs from HuggingFace as well as a set of OpenAI encoders. Consult the list of supported encoder LLMs in the aidb.encoders meta table. HuggingFace LLMs are running locally on the Postgres node, while OpenAI encoders involve a call out to the OpenAI cloud service.
2727

2828

2929

advocacy_docs/edb-postgres-ai/ai-ml/using-tech-preview/additional_functions.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: Additional functions and standalone embedding in pgai
2+
title: Additional functions and standalone embedding in aidb
33
navTitle: Additional functions
4-
description: Other pgai extension functions and how to generate embeddings for images and text.
4+
description: Other aidb extension functions and how to generate embeddings for images and text.
55
---
66

77
## Standalone embedding
88

9-
Use the `generate_single_image_embedding` function to get embeddings for the given image. Currently, `model_provider` can only be `openai` or `huggingface`. You can check the list of valid embedding models and model providers from the Encoders Supported PGAI section.
9+
Use the `generate_single_image_embedding` function to get embeddings for the given image. Currently, `model_provider` can only be `openai` or `huggingface`. You can check the list of valid embedding models and model providers from the Encoders Supported AIDB section.
1010

1111
```sql
12-
SELECT pgai.generate_single_image_embedding(
12+
SELECT aidb.generate_single_image_embedding(
1313
'clip-vit-base-patch32', -- embedding model name
1414
'openai', -- model provider
1515
'https://s3.us-south.cloud-object-storage.appdomain.cloud', -- S3 endpoint
@@ -26,7 +26,7 @@ __OUTPUT__
2626
Use the `generate_text_embedding` function to get embeddings for the given image. Currently, the `model_provider` can only be `openai` or `huggingface`.
2727

2828
```sql
29-
SELECT pgai.generate_text_embedding(
29+
SELECT aidb.generate_text_embedding(
3030
'text-embedding-3-small', -- embedding model name
3131
'openai', -- model provider
3232
0, -- dimensions, setting 0 will replace with the default value in encoder's table
@@ -41,10 +41,10 @@ __OUTPUT__
4141

4242
## Supported encoders
4343

44-
You can check the list of valid embedding models and model providers from pgai.encoders table
44+
You can check the list of valid embedding models and model providers from aidb.encoders table
4545

4646
```sql
47-
SELECT provider, count(*) encoder_model_count FROM pgai.encoders group by (provider);
47+
SELECT provider, count(*) encoder_model_count FROM aidb.encoders group by (provider);
4848
__OUTPUT__
4949
provider | encoder_model_count
5050
-------------+---------------------
@@ -55,11 +55,11 @@ __OUTPUT__
5555

5656
## Available functions
5757

58-
You can find the complete list of currently available functions of the pgai extension by selecting from `information_schema.routines` any `routine_name` belonging to the pgai routine schema:
58+
You can find the complete list of currently available functions of the aidb extension by selecting from `information_schema.routines` any `routine_name` belonging to the aidb routine schema:
5959

6060

6161
```
62-
SELECT routine_name from information_schema.routines WHERE routine_schema='pgai';
62+
SELECT routine_name from information_schema.routines WHERE routine_schema='aidb';
6363
__OUTPUT__
6464
routine_name
6565
---------------------------------
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
---
2-
title: EDB Postgres AI AI/ML - Using the pgai tech preview
2+
title: EDB Postgres AI AI/ML - Using the aidb tech preview
33
navTitle: Using
44
description: Using the EDB Postgres AI AI/ML tech preview to build a simple retrieval augmented generation (RAG) application in Postgres.
55
navigation:
66
- working-with-ai-data-in-postgres
77
- working-with-ai-data-in-s3
8-
- standard-encoders
8+
- additional_functions
99
---
1010

11-
This section shows how you can use your [newly installed pgai tech preview](install-tech-preview) to retrieve and generate AI data in Postgres.
11+
This section shows how you can use your [newly installed aidb tech preview](../install-tech-preview) to retrieve and generate AI data in Postgres.
12+
13+
* [Working with AI data in Postgres](working-with-ai-data-in-postgres) details how to use the aidb extension to work with AI data stored in Postgres tables.
14+
15+
* [Working with AI data in S3](working-with-ai-data-in-S3) covers how to use the aidb extension to work with AI data stored in S3 compatible object storage.
16+
17+
* [Additional functions](additional_functions) notes other aidb extension functions and how to generate standalone embeddings for images and text.
18+
1219

13-
* [Working with AI data in Postgres](working-with-ai-data-in-postgres) details how to use the pgai extension to work with AI data stored in Postgres tables.
14-
* [Working with AI data in S3](working-with-ai-data-in-s3) covers how to use the pgai extension to work with AI data stored in S3 compatible object storage.
15-
* [Standard encoders](standard-encoders) goes through the standard encoder LLMs that are supported by the pgai extension.
1620

0 commit comments

Comments
 (0)