Skip to content

Commit 67694d1

Browse files
committed
Document update for v1.0.1
1 parent cdff1c5 commit 67694d1

6 files changed

Lines changed: 155 additions & 87 deletions

File tree

‎CHANGELOG.rst‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@ All notable changes to this project will be documented in this file.
66
The format is based on the `Keep a Changelog <https://keepachangelog.com/en/1.1.0/>`__,
77
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`__.
88

9-
1.0.0 - 2026-07-15
9+
1.0.1 - 2026-08-10
10+
------------------
11+
12+
Changed
13+
~~~~~~~
14+
15+
- Updated the README quickstart and sample snippets to match the published
16+
Python SDK quickstart, including requirements, BYOV ingestion, HNSW indexes,
17+
and query-time tuning.
18+
19+
1.0.0 - 2026-08-07
1020
------------------
1121

1222
Added
@@ -46,9 +56,3 @@ Added
4656

4757
- Limited Availability release.
4858
- Support for vector table management, indexing, search, and inference operations in Oracle AI Database (26ai+).
49-
50-
51-
Compatibility
52-
----------
53-
Requires - Oracle AI Database 23.26.3 and later with ORDS 26.2.2 and later
54-
Supported languages: Python 3.10+

‎Makefile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ DOC_ZIP_PREFIX = $(SDK_NAME)-api-ref
2424

2525
# Optional flag to enable report generation. Use 'gmake <target> REPORT=1'
2626
REPORT ?=
27-
INTEGRATION_TEST_WORKERS ?= 8
28-
DEBUG ?= 0
27+
INTEGRATION_TEST_WORKERS ?= 10
28+
DEBUG ?= 1
2929
INTEGRATION_TEST_PARALLEL_FILES ?=
3030
# Kept for callers that select a subset of files. Those files are added to
3131
# the same bounded xdist pool; a second pool oversubscribes the VecDB service.
3232
INTEGRATION_TEST_SERIAL_FILES ?=
3333
CI_PROJECT_DIR ?= .
34-
WORKER_SCHEDULE ?= worksteal
34+
WORKER_SCHEDULE ?= loadfile
3535
REPORT_DIR = $(CI_PROJECT_DIR)/reports
3636
LINT_REPORT_DIR = $(REPORT_DIR)/lint
3737
TYPE_CHECK_REPORT_DIR = $(REPORT_DIR)/type_check

‎README.md‎

Lines changed: 88 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88

99
## 🚀 About
1010

11-
Oracle VecDB Python SDK is the Python client for the Oracle AI Database (26ai+). It covers both Autonomous AI Vector Database deployments and customer-managed Oracle AI Database instances where ORDS is enabled, offering simple APIs for vector table management, indexing, search, and inference operations.
11+
Oracle VecDB Python SDK provides a Python-native interface for building vector search and AI applications with Oracle AI Database 23.26.3 and later. It supports both Autonomous AI Vector Database deployments and customer-managed Oracle AI Database instances exposed through ORDS 26.2.2 or later.
1212

13+
The SDK provides straightforward APIs for creating and managing vector tables and indexes, executing vector similarity searches, and invoking inference operations—allowing developers to integrate Oracle AI Database vector capabilities into Python applications with minimal setup and boilerplate.
1314

1415
## ✨ Highlights
1516

@@ -18,17 +19,32 @@ Oracle VecDB Python SDK is the Python client for the Oracle AI Database (26ai+).
1819
- 🧠 Run embeddings & inference flows via Oracle AI Database models
1920
- 🔄 Integrate vector search, filtering, and RAG-style pipelines quickly
2021

21-
2222
## 📦 Installation
2323

2424
```bash
25-
pip install oracle-vecdb
25+
python -m pip install --upgrade oracle-vecdb
2626
```
2727

28-
**Requires:** Python 3.10+
28+
## 🚀 Quickstart
2929

30+
See the [Oracle VecDB documentation](https://docs.oracle.com/en/cloud/paas/autonomous-vector-database/vcapi/quickstart.html)
31+
for installation, pre-requisites, and the complete API reference.
3032

31-
## 🚀 Quickstart
33+
This quickstart connects to Oracle VecDB, creates a table with integrated
34+
embeddings, loads sample records, and runs a filtered similarity search.
35+
Most SDK methods return typed response models. Import stable SDK response types
36+
from `oracle_vecdb.data_types`, and use `.model_dump()` or `.to_dict()` when
37+
you need a plain dictionary representation.
38+
39+
### 1. Configure the client
40+
41+
VecDB `rest_url` has this form but it might change based on the setup:
42+
43+
```text
44+
https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/
45+
```
46+
47+
**Note:** Ensure TLS is enabled and that the endpoint is reachable from your environment.
3248

3349
```python
3450
from oracle_vecdb import OracleVecDB, Configuration
@@ -41,7 +57,17 @@ config = Configuration(
4157
)
4258

4359
vecdb = OracleVecDB(config)
60+
```
61+
62+
For all constructor parameters and object attributes, see the
63+
[Oracle VecDB documentation](https://docs.oracle.com/en/cloud/paas/autonomous-vector-database/vcapi/configuration.html).
64+
65+
### 2. Create an integrated embedding vector table
4466

67+
Create a table that generates embeddings from text stored in metadata. The
68+
configured model must already be available in Oracle AI Database.
69+
70+
```python
4571
vecdb.create_vector_table(
4672
name="demo",
4773
table_params={"auto_generate_id": True},
@@ -50,7 +76,15 @@ vecdb.create_vector_table(
5076
"embed_metadata_jsonpath": "content", # JSON field in metadata to extract text from for embedding
5177
},
5278
)
79+
```
80+
81+
### 3. Load integrated embedding records
5382

83+
When an integrated embedding vector table is configured, provide text in the
84+
metadata field selected by `embed_metadata_jsonpath`. The database generates
85+
the vector during the upsert.
86+
87+
```python
5488
vecdb.upsert_vectors(
5589
table_name="demo",
5690
vectors=[
@@ -70,7 +104,14 @@ vecdb.upsert_vectors(
70104
},
71105
],
72106
)
107+
```
73108

109+
### 4. Run a text query with filtering
110+
111+
A text query uses the table's configured embedding model to generate the query
112+
vector.
113+
114+
```python
74115
results = vecdb.query(
75116
table_name="demo",
76117
query_by={"text": "family drama"}, # uses integrated embeddings for the query text
@@ -88,47 +129,20 @@ for index in range(len(results)):
88129

89130
#### Bring your own vectors
90131

132+
For precomputed embeddings, omit `embed_params` when creating the vector table
133+
and provide `dense_vector` values in each record.
134+
91135
```python
92-
vecdb.create_vector_table(name="demo")
93-
# Large inline datasets >32MB are automatically split into bounded requests.
94-
# Batching preserves order but does not deduplicate IDs or guarantee avoidance
95-
# of service rate limits.
96-
response = vecdb.upsert_vectors(
97-
table_name="demo",
136+
vecdb.create_vector_table(name="demo_byov")
137+
vecdb.upsert_vectors(
138+
table_name="demo_byov",
98139
vectors=[
99140
{"id": "1", "dense_vector": [0.1, 0.1], "metadata": {"genre": "comedy"}},
100141
{"id": "2", "dense_vector": [0.2, 0.2], "metadata": {"genre": "drama"}},
101142
],
102143
)
103-
print(response.upserted_count)
104-
```
105-
106-
For huge dataset, prefer asynchronous bulk loading from object
107-
storage instead of sending a large inline JSON request. This avoids keeping
108-
the complete dataset in the request body and is better suited to production
109-
ingestion workloads:
110-
111-
```python
112-
load_job = vecdb.load_vectors(
113-
table_name="demo",
114-
url="https://objectstorage.<region>.oraclecloud.com/<namespace>/<bucket>/vectors.csv",
115-
params={"credential": "<oci-credential-name>"},
116-
)
117-
118-
status = vecdb.describe_vector_load_job(load_job.job_name)
119-
print(status.state)
120-
```
121-
122-
The CSV should contain `id`, `dense_vector`, and `metadata` columns. Use an
123-
OCI credential configured for the database when the object is not publicly
124-
readable. Do not place signed URLs or credentials directly in application
125-
logs. `upsert_vectors` remains useful for small inline batches and is
126-
automatically split below the service JSON limit, but it does not replace
127-
bulk loading for large files.
128-
129-
```python
130144
results = vecdb.query(
131-
table_name="demo",
145+
table_name="demo_byov",
132146
query_by={"vector": [0.15, 0.1]},
133147
filters={"genre": {"$eq": "drama"}},
134148
top_k=1,
@@ -138,33 +152,28 @@ for index in range(len(results)):
138152
item = results[index]
139153
row = item if isinstance(item, dict) else item.model_dump()
140154
print(row["metadata"]["genre"])
141-
142-
# Collection endpoints support ORDS pagination. Existing calls without these
143-
# arguments retain the server's default page size.
144-
tables_page = vecdb.list_vector_tables(limit=25, offset=25)
145-
models_page = vecdb.list_models(limit=25, offset=0)
146155
```
147156

148-
### 🔧 Indexing & tuning
157+
### 🔧 Indexing and tuning
158+
159+
#### Create indexes after loading data
149160

150-
Delay index creation until `create_index()`
161+
Create the table first and build its index explicitly when the data-loading
162+
workflow is complete.
151163

152164
```python
153165
vecdb.create_vector_table(
154-
name="demo_byuser",
155-
index_params={
156-
"vector_index_params": {
157-
"auto_index": False,
158-
}
159-
},
166+
name="demo_manual",
167+
index_params={"vector_index_params": {"auto_index": False}},
160168
)
161169

162-
vecdb.create_index(
163-
table_name="demo_byuser",
164-
)
170+
vecdb.create_index(table_name="demo_manual")
165171
```
166172

167-
Create HNSW index instead of default IVF
173+
#### Create an HNSW index
174+
175+
Use `INMEMORY GRAPH` organization for an HNSW (Hierarchical Navigable Small
176+
World) vector index.
168177

169178
```python
170179
vecdb.create_vector_table(
@@ -183,7 +192,11 @@ vecdb.create_vector_table(
183192
)
184193
```
185194

186-
Query-time HNSW tuning
195+
#### Query-time HNSW tuning
196+
197+
Use `advanced_options` to adjust HNSW runtime search behavior. `efsearch` is
198+
HNSW-only; use it to control the candidate pool size and balance recall against
199+
query latency without rebuilding the index.
187200

188201
```python
189202
results = vecdb.query(
@@ -199,28 +212,32 @@ results = vecdb.query(
199212
)
200213
```
201214

215+
## Examples
202216

203-
## 🧪 Sample notebooks & apps
204-
217+
- Samples can be found in the [/examples](./examples/) directory.
205218
- [Sample notebooks](https://github.com/oracle-devrel/oracle-ai-developer-hub/tree/main/notebooks/vecdb) – Guided notebooks for setup, table/index workflows, vector search, and inference via the SDK.
206219
- [Sample applications](https://github.com/oracle-devrel/oracle-ai-developer-hub/tree/main/apps/vecdb) – Oracle AI Developer Hub apps showcasing ingestion, embeddings, search, filtering, and FastAPI + React/Vite integration using this SDK.
207220

208-
## 📚 Documentation & Resources
221+
## Dependencies and Interoperability
209222

210-
Most SDK methods return typed response models. Import stable SDK response types
211-
from `oracle_vecdb.data_types`, and use `.model_dump()` or `.to_dict()` when
212-
you need a plain dictionary representation.
223+
- Python 3.10 or later.
224+
- Oracle AI Database 23.26.3 or later with ORDS 26.2.2+ enabled.
225+
- An Oracle ORDS VecDB endpoint configured with either bearer-token or HTTP Basic authentication.
226+
227+
The SDK can be used in applications, notebooks, retrieval-augmented generation
228+
(RAG) pipelines, and other Python services that need Oracle vector search.
229+
For setup instructions and guidance on getting started with the VecDB APIs, see the [Oracle VecDB documentation](https://docs.oracle.com/en/cloud/paas/autonomous-vector-database/vcapi/overview.html)
230+
231+
## 📚 Documentation and Resources
232+
233+
- [Oracle VecDB documentation](https://docs.oracle.com/en/cloud/paas/autonomous-vector-database/vcapi/overview.html) - for detailed API documentation, including features, usage, and reference information.
234+
- [Customer-managed Oracle AI Database (26ai+) requirements](https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/26.2/) – DB 23.26.3+ with ORDS 26.2.2+, plus TLS/ORDS notes for handling self-signed certificates.
213235

214-
- [Autonomous AI Vector Database docs](https://docs.oracle.com/en/cloud/paas/autonomous-vector-database)
215-
- [Autonomous AI Vector Database setup guide](https://docs.oracle.com/en/cloud/paas/autonomous-vector-database/vecdb/get-started-using-autonomous-ai-vector-database.html)
216-
- [Customer-managed Oracle AI Database (26ai+) requirements](https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/26.2/) – DB 23.26.3+ with ORDS 26.2.2+, plus TLS/ORDS notes for handling self-signed certificates
217-
- [Quickstart guide](./docs/source/quickstart.rst)
218-
- [Installation notes](./docs/source/installation.rst)
219-
- [API reference](https://docs.oracle.com/en/cloud/paas/autonomous-vector-database/vcapi/index.html)
220-
- [Changelog](./CHANGELOG.rst)
221-
- [Examples](./examples/test_client.py)
236+
## Help
222237

238+
Questions can be asked in [GitHub Discussions](https://github.com/oracle/vecdb-python-sdk/discussions).
223239

240+
Problem reports can be raised in [GitHub Issues](https://github.com/oracle/vecdb-python-sdk/issues).
224241

225242
## 🤝 Contributing
226243

‎examples/test_client.py‎

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
##
55

66
import os
7+
78
from oracle_vecdb import OracleVecDB, Configuration
89

910

@@ -17,11 +18,24 @@ def main():
1718
)
1819

1920
vecdb = OracleVecDB(config)
21+
table_name = "TEST_TABLE"
22+
table_created = False
2023

2124
try:
22-
vecdb.create_vector_table(name="TEST_DB")
23-
vecdb.upsert_vectors(
24-
table_name="TEST_DB",
25+
print("Vector database summary:")
26+
print(vecdb.describe_vector_database())
27+
vecdb.create_vector_table(
28+
name=table_name,
29+
comment="Oracle VecDB Python SDK example",
30+
annotations={"application": "sdk-example"},
31+
)
32+
table_created = True
33+
34+
print(f"Created table:{table_name}")
35+
print(vecdb.describe_vector_table(name=table_name))
36+
37+
upsert_result = vecdb.upsert_vectors(
38+
table_name=table_name,
2539
vectors=[
2640
{
2741
"id": "A",
@@ -45,8 +59,25 @@ def main():
4559
},
4660
],
4761
)
62+
print("Upsert result:")
63+
print(upsert_result)
64+
65+
print("Vectors in the table:")
66+
print(vecdb.list_vectors(table_name=table_name, limit=10))
67+
68+
vecdb.update_vector_table_annotation(
69+
name=table_name,
70+
comment="Updated Oracle VecDB Python SDK example",
71+
annotations={
72+
"application": "sdk-example",
73+
"stage": "demonstration",
74+
},
75+
)
76+
print("Updated table metadata:")
77+
print(vecdb.describe_vector_table(name=table_name))
78+
4879
result = vecdb.query(
49-
table_name="TEST_DB",
80+
table_name=table_name,
5081
query_by={
5182
"vector": [
5283
-0.00337490835,
@@ -59,12 +90,28 @@ def main():
5990
0.0645009279,
6091
]
6192
},
93+
filters={"genre": {"$eq": "comedy"}},
6294
top_k=2,
6395
)
6496

97+
print("Filtered query results:")
6598
print(result)
99+
100+
delete_result = vecdb.delete_vectors(table_name=table_name, ids=["D"])
101+
print("Delete result:")
102+
print(delete_result)
103+
104+
print("Vectors after deletion:")
105+
print(vecdb.list_vectors(table_name=table_name, limit=10))
66106
except Exception as exc:
67107
print("An error occurred:", exc)
108+
finally:
109+
if table_created:
110+
try:
111+
vecdb.drop_vector_table(name=table_name)
112+
print(f"Dropped table: {table_name}")
113+
except Exception as exc:
114+
print(f"Could not drop table {table_name}: {exc}")
68115

69116

70117
if __name__ == "__main__":

0 commit comments

Comments
 (0)