Oracle AI Database Integration for LangChain — in-database embeddings, vector search, and server-side text processing.
Three primitives form the foundation of the Oracle AI Database integration layer. Each operates inside the database, eliminating round-trips to external services.
From raw document ingestion through to scored similarity search results. Every processing step occurs inside the Oracle Database.
Detailed configuration parameters and internal specifications for each component.
| Parameter | Value |
|---|---|
| provider | database (in-DB ONNX runtime) |
| model | ALL_MINILM_L12_V2 |
| dimensions | 384 |
| data_type | FLOAT32 |
| normalization | L2 normalized |
| Parameter | Value |
|---|---|
| normalize | "all" — whitespace + unicode |
| split | Recursive character splitting |
| execution | PL/SQL (DBMS_VECTOR_CHAIN) |
| max_chunk | 500 tokens (configurable) |
| overlap | 50 tokens |
Each collection maps 1:1 to an Oracle Database table. OracleVS manages table creation, document storage, and vector indexing independently per collection.
The bridge class in the agentic RAG system. Manages multiple OracleVS instances, sanitizes metadata, and applies monkeypatches for compatibility.
Oracle AI Vector Search requires metadata values to be primitive types. The sanitizer strips any complex nested structures before insertion.
str values — preserved as-isint values — preserved as-isfloat values — preserved as-isbool values — preserved as-isOracleVS may return metadata as either a Python dict or a JSON string depending on the Oracle driver version. The monkeypatch normalizes this.
Oracle Database connection with TLS encryption and wallet-based authentication for Autonomous Database deployments.
oracle:
dsn: "(description=(retry_count=20)
(retry_delay=3)(address=
(protocol=tcps)(port=1522)
(host=adb.region.oraclecloud.com))
(connect_data=(service_name=
xxx_high.adb.oraclecloud.com))
(security=(ssl_server_dn_match=yes)))"
user: "ADMIN"
wallet_location: "/opt/oracle/wallet"
wallet_password: "${WALLET_PASSWORD}"
embeddings:
provider: "database"
model: "ALL_MINILM_L12_V2"
collections:
- PDFCOLLECTION
- WEBCOLLECTION
- REPOCOLLECTION
- GENERALCOLLECTION
| Parameter | Description |
|---|---|
| dsn | TNS descriptor with TLS (tcps) |
| user | Database username (ADMIN for ADB) |
| wallet_location | Path to unzipped wallet directory |
| wallet_password | Wallet encryption password |
| retry_count | Connection retry attempts (20) |
| retry_delay | Seconds between retries (3) |
| protocol | tcps (TLS-secured TCP) |
| port | 1522 (ADB default TLS port) |
Complete view of how all components interact, from the LangChain application layer down through the Oracle Database internals.