Skip to content

Commit 3d12814

Browse files
authored
Merge pull request #6855 from EnterpriseDB/release-2025-05-28a
Release 2025-05-28a
2 parents a12f43e + 6eae959 commit 3d12814

File tree

73 files changed

+338
-132
lines changed

Some content is hidden

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

73 files changed

+338
-132
lines changed

.github/workflows/tools-events.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Forward key events to the docs-tools repository
2+
on:
3+
pull_request:
4+
push:
5+
create:
6+
delete:
7+
release:
8+
jobs:
9+
dispatch-events:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Create event name
13+
run: |
14+
EVENT_PREFIX="docs-${GITHUB_REPOSITORY//\//-}"
15+
echo EVENT_PREFIX="${EVENT_PREFIX@L}" >> $GITHUB_ENV
16+
- name: Repository Dispatch
17+
uses: peter-evans/repository-dispatch@v3
18+
with:
19+
token: ${{ secrets.TOOLS_EVENT_SYNC_PAT }}
20+
repository: enterprisedb/docs-tools
21+
event-type: ${{ env.EVENT_PREFIX }}-${{ github.event_name }}
22+
client-payload: |
23+
{
24+
"ref": "${{ github.head_ref || github.ref }}",
25+
"ref_type": "${{ github.ref_type }}",
26+
"ref_name": "${{ github.ref_name }}",
27+
"repo": "${{ github.repository }}",
28+
"sha": "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}",
29+
"type": "${{ github.event_name }}",
30+
"push": {
31+
"before": "${{ github.event.before || '' }}",
32+
"after": "${{ github.event.after || '' }}",
33+
"created": "${{ github.event.created || false }}",
34+
"deleted": "${{ github.event.deleted || false }}"
35+
},
36+
"action": "${{ github.event.action }}",
37+
"number": "${{ github.event.number }}",
38+
"release": {
39+
"tag_name": "${{ github.event.release && github.event.release.tag_name || '' }}",
40+
"id": "${{ github.event.release && github.event.release.id || '' }}",
41+
"tag": "${{ github.event.release && github.event.release.tag_name || '' }}",
42+
"name": "${{ github.event.release && github.event.release.name || '' }}",
43+
"body": "${{ github.event.release && github.event.release.body || '' }}",
44+
"draft": "${{ github.event.release && github.event.release.draft || false }}"
45+
}
46+
}

advocacy_docs/edb-postgres-ai/ai-accelerator/installing/complete.mdx

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,37 @@ The AI Database extension provides a set of functions to run AI/ML models in the
1111

1212
```sql
1313
ebd=# CREATE EXTENSION aidb CASCADE;
14+
__OUTPUT__
1415
NOTICE: installing required extension "vector"
1516
CREATE EXTENSION
16-
edb=#
17+
```
18+
19+
#### Additional steps for EDB Postgres Distributed (PGD)
20+
A manual step is required to set up replication within the PGD cluster for the AIDB extension catalog tables:
21+
22+
```sql
23+
bdrdb=# SELECT aidb.bdr_setup();
24+
__OUTPUT__
25+
bdr_setup
26+
-----------
27+
28+
(1 row)
29+
```
30+
31+
You can confirm that the AIDB tables are part of the desired replication set using this SQL command:
32+
```sql
33+
bdrdb=# select * from bdr.tables where nspname='aidb';
34+
__OUTPUT__
35+
relid | nspname | relname | set_name | set_ops | rel_columns | row_filter | conflict_detection
36+
-------+---------+---------------------------------------+----------------+---------------------------------+-------------+------------+--------------------
37+
18281 | aidb | pipeline_runtime_state | p-2y7357q195-a | {INSERT,UPDATE,DELETE,TRUNCATE} | | | row_origin
38+
18354 | aidb | preparer_registry | p-2y7357q195-a | {INSERT,UPDATE,DELETE,TRUNCATE} | | | row_origin
39+
18363 | aidb | preparer_registry_source_table | p-2y7357q195-a | {INSERT,UPDATE,DELETE,TRUNCATE} | | | row_origin
40+
18375 | aidb | preparer_registry_source_volume | p-2y7357q195-a | {INSERT,UPDATE,DELETE,TRUNCATE} | | | row_origin
41+
18430 | aidb | knowledge_base_registry | p-2y7357q195-a | {INSERT,UPDATE,DELETE,TRUNCATE} | | | row_origin
42+
18440 | aidb | knowledge_base_registry_source_table | p-2y7357q195-a | {INSERT,UPDATE,DELETE,TRUNCATE} | | | row_origin
43+
18452 | aidb | knowledge_base_registry_source_volume | p-2y7357q195-a | {INSERT,UPDATE,DELETE,TRUNCATE} | | | row_origin
44+
(7 rows)
1745
```
1846

1947
#### Setting up background workers

advocacy_docs/edb-postgres-ai/ai-accelerator/knowledge_base/performance_tuning.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ INSERT INTO test_data_10k (id, msg) SELECT generate_series(1, 10000) AS id, 'hel
3636
The optimal batch size may be very different for different models. Measure and tune the batch size for each different model you want to use.
3737
```sql
3838
SELECT aidb.create_table_knowledge_base(
39-
name => 'perf_test_b',
39+
name => 'perf_test',
4040
model_name => 'dummy', -- use the model you want to optimize for
4141
source_table => 'test_data_10k',
4242
source_data_column => 'msg',

advocacy_docs/edb-postgres-ai/ai-accelerator/knowledge_base/usage.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ A view is available that lists all the knowledge_bases. [aidb.knowledge_bases](.
157157
```sql
158158
SELECT * FROM aidb.knowledge_bases;
159159
__OUTPUT__
160-
id | name | vector_table_name | vector_table_key_column | vector_table_vector_column | model_name | topk | distance_operator | options | source_table_name | source_table_data_column | source_table_data_column_type | source_table_key_column | source_volume_name
161-
----+---------------------+----------------------------+-------------------------+----------------------------+--------------+------+-------------------+---------+-------------------+--------------------------+-------------------------------+-------------------------+--------------------
160+
id | name | vector_table_name | vector_table_key_column | vector_table_vector_column | model_name | topk | distance_operator | options | source_table_name | source_table_data_column | source_table_data_column_type | source_table_key_column | source_volume_name
161+
----+--------------------------+---------------------------------+-------------------------+----------------------------+--------------+------+-------------------+---------+-------------------+--------------------------+-------------------------------+-------------------------+--------------------
162162
2 | test_knowledge_base | test_knowledge_base_vector | id | embeddings | simple_model | 5 | InnerProduct | {} | test_source_table | content | Text | id |
163163
5 | test_knowledge_base_cosa | test_knowledge_base_cosa_vector | id | embeddings | simple_model | 1 | L2 | {} | test_source_table | content | Text | id |
164164
3 | test_knowledge_base_cos | test_knowledge_base_cos_vector | id | embeddings | simple_model | 5 | Cosine | {} | test_source_table | content | Text | id |
@@ -170,8 +170,8 @@ We recommend that you select only the columns you're interested in:
170170
```sql
171171
SELECT name, source_table_name FROM aidb.knowledge_bases;
172172
__OUTPUT__
173-
name | source_table_name
174-
---------------------+-------------------
173+
name | source_table_name
174+
--------------------------+-------------------
175175
test_knowledge_base | test_source_table
176176
test_knowledge_base_cos | test_source_table
177177
test_knowledge_base_cosa | test_source_table

advocacy_docs/edb-postgres-ai/ai-accelerator/preparers/examples/chained_preparers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SELECT aidb.create_table_preparer(
2525
destination_table => 'chunked_data__1321',
2626
destination_data_column => 'chunk',
2727
destination_key_column => 'id',
28-
options => '{"desired_length": 1, "max_length": 1000}'::JSONB -- Configuration for the ChunkText operation
28+
options => '{"desired_length": 1000}'::JSONB -- Configuration for the ChunkText operation
2929
);
3030
```
3131

advocacy_docs/edb-postgres-ai/ai-accelerator/preparers/examples/chunk_text.mdx

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,6 @@ __OUTPUT__
6060
(9 rows)
6161
```
6262

63-
```sql
64-
-- Semantic chunking to split into the largest continuous semantic chunk that fits in the max_length
65-
SELECT * FROM aidb.chunk_text('This sentence should be its own chunk. This too.', '{"desired_length": 1, "max_length": 1000}');
66-
67-
__OUTPUT__
68-
part_id | chunk
69-
---------+----------------------------------------
70-
0 | This sentence should be its own chunk.
71-
1 | This too.
72-
(2 rows)
73-
```
74-
7563
## Preparer with table data source
7664

7765
```sql
@@ -83,7 +71,7 @@ CREATE TABLE source_table__1628
8371
);
8472
INSERT INTO source_table__1628
8573
VALUES (1, 'This is a significantly longer text example that might require splitting into smaller chunks. The purpose of this function is to partition text data into segments of a specified maximum length, for example, this sentence 145 is characters. This enables processing or storage of data in manageable parts.'),
86-
(2, 'This sentence should be its own chunk. This too.');
74+
(2, 'This is sentence number one. This is sentence number one.');
8775

8876
SELECT aidb.create_table_preparer(
8977
name => 'preparer__1628',
@@ -94,20 +82,19 @@ SELECT aidb.create_table_preparer(
9482
destination_data_column => 'chunks',
9583
source_key_column => 'id',
9684
destination_key_column => 'id',
97-
options => '{"desired_length": 1, "max_length": 1000}'::JSONB -- Configuration for the ChunkText operation
85+
options => '{"desired_length": 120}'::JSONB -- Configuration for the ChunkText operation
9886
);
9987

10088
SELECT aidb.bulk_data_preparation('preparer__1628');
10189

10290
SELECT * FROM chunked_data__1628;
10391

10492
__OUTPUT__
105-
id | part_id | unique_id | chunks
106-
----+---------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------
93+
id | part_id | unique_id | chunks
94+
----+---------+-----------+-----------------------------------------------------------------------------------------------------------------------
10795
1 | 0 | 1.part.0 | This is a significantly longer text example that might require splitting into smaller chunks.
108-
1 | 1 | 1.part.1 | The purpose of this function is to partition text data into segments of a specified maximum length, for example, this sentence 145 is characters.
109-
1 | 2 | 1.part.2 | This enables processing or storage of data in manageable parts.
110-
2 | 0 | 2.part.0 | This sentence should be its own chunk.
111-
2 | 1 | 2.part.1 | This too.
112-
(5 rows)
96+
1 | 1 | 1.part.1 | The purpose of this function is to partition text data into segments of a specified maximum length, for example, this
97+
1 | 2 | 1.part.2 | sentence 145 is characters. This enables processing or storage of data in manageable parts.
98+
2 | 0 | 2.part.0 | This is sentence number one. This is sentence number one.
99+
(4 rows)
113100
```

advocacy_docs/edb-postgres-ai/ai-accelerator/preparers/examples/chunk_text_auto_processing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SELECT aidb.create_table_preparer(
2929
destination_data_column => 'chunk',
3030
source_key_column => 'id',
3131
destination_key_column => 'id',
32-
options => '{"desired_length": 1, "max_length": 1000}'::JSONB -- Configuration for the ChunkText operation
32+
options => '{"desired_length": 1000}'::JSONB -- Configuration for the ChunkText operation
3333
);
3434

3535
SELECT aidb.set_auto_preparer('preparer__1628', 'Live');

advocacy_docs/edb-postgres-ai/ai-accelerator/preparers/primitives.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ All data preparation operations can be customized with different options. The AP
1414

1515
## Chunk text
1616

17-
Call `aidb.chunk_text()` to break text into smaller chunks.
17+
Call `aidb.chunk_text()` to intelligently split long text into smaller, semantically coherent chunks, ideal for processing or storage within LLM context limits.
1818

1919
```sql
2020
SELECT * FROM aidb.chunk_text(
@@ -31,8 +31,18 @@ __OUTPUT__
3131
(3 rows)
3232
```
3333

34-
- The `desired_length` size is the target size for the chunk. In most cases, this value also serves as the maximum size of the chunk. It's possible for a chunk to be returned that's less than the `desired` value, as adding the next piece of text may have made it larger than the `desired` capacity.
35-
- The `max_length` size is the maximum possible chunk size that can be generated. Setting this to a value larger than `desired` means that the chunk should be as close to `desired` as possible but can be larger if it means staying at a larger semantic level.
34+
### Options
35+
36+
- `desired_length` (required): The target chunk size, in characters. This is the size the splitter will try to reach when forming each chunk, while preserving semantic structure. If `max_length` is not provided, `desired_length` also acts as the hard upper limit for the chunk size.
37+
- `max_length` (optional): The upper bound for chunk size, in characters. If specified, the function will try to generate chunks close to `desired_length` but may extend up to `max_length` to preserve larger semantic units (like full sentences or paragraphs). Chunks will only exceed `desired_length` when it's necessary to avoid cutting across meaningful boundaries.
38+
- Specifying `desired_length = max_length` results in fixed-size chunks (e.g., when filling a context window exactly for embeddings).
39+
- Use a larger `max_length` if you want to stay within a soft limit but allow some flexibility to preserve higher semantic units, common in RAG, summarization, or Q&A applications.
40+
41+
### Algorithm Summary
42+
43+
- Text is split using a hierarchy of semantic boundaries: characters, graphemes, words, sentences, and increasingly long newline sequences (e.g., paragraphs).
44+
- The splitter attempts to form the largest semantically valid chunk that fits within the specified size range.
45+
- Chunks may be returned that are shorter than `desired_length` if adding the next semantic unit would exceed max_length.
3646

3747
!!! Tip
3848
This operation transforms the shape of the data, automatically unnesting collections by introducing a `part_id` column. See the [unnesting concept](./concepts#unnesting) for more detail.

advocacy_docs/edb-postgres-ai/ai-accelerator/preparers/volume_destination.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ SELECT aidb.create_volume_preparer(
6868
operation => 'ChunkText',
6969
source_volume_name => 'text_files_volume',
7070
destination_table => 'chunk_output_volume',
71-
options => '{"desired_length": 1, "max_length": 100}'::JSONB
71+
options => '{"desired_length": 1000}'::JSONB
7272
);
7373

7474
SELECT aidb.bulk_data_preparation('chunking_example_volumes');

advocacy_docs/edb-postgres-ai/ai-accelerator/reference/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ navigation:
2121
* [aidb.create_model](models#aidbcreate_model)
2222
* [aidb.get_model](models#aidbget_model)
2323
* [aidb.delete_model](models#aidbdelete_model)
24-
* [aidb.get_hcp_models](models#aidbget_hcp_models)
24+
* [aidb.list_hcp_models](models#aidblist_hcp_models)
2525
* [aidb.create_hcp_model](models#aidbcreate_hcp_model)
26+
* [aidb.sync_hcp_models](models#aidbsync_hcp_models)
2627
* [aidb.encode_text](models#aidbencode_text)
2728
* [aidb.encode_text_batch](models#aidbencode_text_batch)
2829
* [aidb.decode_text](models#aidbdecode_text)

advocacy_docs/edb-postgres-ai/ai-accelerator/reference/models.mdx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ __OUTPUT__
161161
| `delete_model` | jsonb | The name, provider, and options of the deleted model |
162162

163163

164-
### `aidb.get_hcp_models`
164+
### `aidb.list_hcp_models`
165165

166166
Gets models running on the hybrid control plane.
167167

@@ -194,6 +194,19 @@ Creates a new model in the system by referencing a running instance in the HCP
194194
| `name` | text | | User-defined name of the model |
195195
| `hcp_model_name` | text | | Name of the model instance running on HCP |
196196

197+
### `aidb.sync_hcp_models`
198+
199+
Creates models in the HCP and sets `is_hcp_model=true`; deletes models with that setting if not found in the HCP.
200+
201+
#### Returns
202+
203+
| Column | Type | Description |
204+
| -------- | ---- | ------------------------------------------------------------------------------- |
205+
| `status` | text | Synchronization status; either `deleted`, `unchanged`, `created`, or `skipped`. |
206+
| `model` | text | The name the synchronized HCP model. |
207+
208+
209+
197210
### `aidb.encode_text`
198211

199212
Encodes text using a model, generating a vector representation of a given text input.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: AI Accelerator - Pipelines 4.1.1 release notes
3+
navTitle: Version 4.1.1
4+
originalFilePath: advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/src/rel_notes_4.1.1.yml
5+
editTarget: originalFilePath
6+
---
7+
8+
Released: 28 May 2025
9+
10+
This is a minor release that includes bug fixes.
11+
Note: this release depends on the new PGFS version 2.0.2. If you're using PGFS together with AIDB, please update PGFS as well.
12+
13+
## Highlights
14+
15+
- Bug fixes and UX enhancements.
16+
17+
## Enhancements
18+
19+
<table class="table w-100"><thead><tr><th>Description</th><th width="10%">Addresses</th></tr></thead><tbody>
20+
<tr><td><details><summary>Change the tracking of &quot;run IDs&quot; for volume knowledge bases from a PG sequence to a PG table column</summary><hr/><p>Knowledge bases with volume source need to assign an incrementing ID to each listing done on the source.
21+
This is necessary to detect when a listing is complete and recognize which previously seen objects were not encountered any more.
22+
In this release the method for tracking run IDs is changed to a table column since the Postgres sequence used before did not
23+
work on Postgres Distributed (PGD) clusters.</p>
24+
</details></td><td></td></tr>
25+
<tr><td><details><summary>Support AIDB volumes in arbitrary Postgres schemas</summary><hr/><p>Volumes for AIDB can be created in arbitrary schemas in Postgres either by exlicitly passing a schema to the create function, or by
26+
setting a &quot;current schema&quot; via the search path. When using volumes in AIDB pipelines, the volume reference needs to be stored.
27+
AIDB will now store and explicitly use a schema when later executing a pipeline. Previously, the search path was used to find volumes.</p>
28+
</details></td><td></td></tr>
29+
<tr><td><details><summary>Background worker dispatcher is no longer persistent</summary><hr/><p>When background workers are enabled for AIDB, a root-worker will start a database dispatcher for each database within the Postgres instance.
30+
This database dispatcher checks if AIDB is installed in the DB and if any pipelines need to be run in the background.
31+
The database dispatcher is now no longer a permanent process by default. When a database does not use AIDB, the database dispatcher
32+
exits and will be re-started to check for AIDB every 2 minutes.
33+
This avoids holding a permanent connection to the DB that would block e.g. &quot;drop table&quot; commands.
34+
If AIDB is installed in the DB, then the database dispatcher worker will keep running. Users can drop the extension in order to release the connection.</p>
35+
</details></td><td></td></tr>
36+
</tbody></table>
37+
38+

advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ navTitle: Release notes
44
description: Release notes for EDB Postgres AI - AI Accelerator
55
indexCards: none
66
navigation:
7+
- ai-accelerator_4.1.1_rel_notes
78
- ai-accelerator_4.1.0_rel_notes
89
- ai-accelerator_4.0.1_rel_notes
910
- ai-accelerator_4.0.0_rel_notes
@@ -23,6 +24,7 @@ The EDB Postgres AI - AI Accelerator describes the latest version of AI Accelera
2324

2425
| AI Accelerator version | Release Date |
2526
|---|---|
27+
| [4.1.1](./ai-accelerator_4.1.1_rel_notes) | 28 May 2025 |
2628
| [4.1.0](./ai-accelerator_4.1.0_rel_notes) | 19 May 2025 |
2729
| [4.0.1](./ai-accelerator_4.0.1_rel_notes) | 09 May 2025 |
2830
| [4.0.0](./ai-accelerator_4.0.0_rel_notes) | 05 May 2025 |

0 commit comments

Comments
 (0)