feat: Add Oracle 26ai as default vector database#310
feat: Add Oracle 26ai as default vector database#310ssraghavan-oci wants to merge 1 commit intoNVIDIA-AI-Blueprints:developfrom
Conversation
Replace Milvus with Oracle AI Database 26ai as the default vector store. This provides CPU-optimized IVF indexes with optional hybrid search support. Changes: - Add OracleVDB class implementing VDBRagIngest interface - Add oracle_queries.py with DDL and SQL query helpers - Register Oracle as default in vdb/__init__.py (Milvus as fallback) - Add oracledb dependency to pyproject.toml - Add Oracle environment variables to deploy/compose/.env - Add oracle-26ai Docker service profile to vectordb.yaml - Add comprehensive migration guide in docs/migration-oracle-26ai.md Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
e17ec82 to
2c37c4b
Compare
| interval: 30s | ||
| timeout: 20s | ||
| retries: 3 | ||
| profiles: ["", "milvus", "elasticsearch", "minio"] |
There was a problem hiding this comment.
Kindly add "oracle" profile for minio container as well. As it is used internally for Image/Table/charts/etc. citations
| "pyarrow>=21.0,<22.0", | ||
| # Elasticsearch support | ||
| "langchain-elasticsearch>=0.3", | ||
| # Oracle 26ai support |
There was a problem hiding this comment.
Kindly update the uv.lock file based on the library updates
| "protobuf>=6.33.5", | ||
| "lark>=1.2.2", | ||
| "python-dateutil>=2.9.0.post0", | ||
| ] |
There was a problem hiding this comment.
Kindly add:
"oracledb>=2.0.0",
"langchain-community>=0.4",
in common dependencies as well. So they could be used installed in ingestor-server and rag-server containers
| ) | ||
| row = cursor.fetchone() | ||
| if row and row[0]: | ||
| return json.loads(row[0]) |
There was a problem hiding this comment.
The code structure looks great and aligns well with the requirements! 💯
I did run into an issue during ingestion that I wanted to bring to your attention:
Error in src/nvidia_rag/utils/vdb/oracle/oracle_vdb.py:617:
ERROR:nvidia_rag.ingestor_server.main:Ingestion failed due to error: the JSON object must be str, bytes or bytearray, not list
Traceback (most recent call last):
File "/workspace/.venv/lib/python3.13/site-packages/nvidia_rag/ingestor_server/main.py", line 480, in __run_background_ingest_task
metadata_schema = vdb_op.get_metadata_schema(collection_name)
File "/workspace/.venv/lib/python3.13/site-packages/nvidia_rag/utils/vdb/oracle/oracle_vdb.py", line 617, in get_metadata_schema
return json.loads(row[0])
~~~~~~~~~~^^^^^^^^
File "/usr/lib/python3.13/json/__init__.py", line 345, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
f'not {s.__class__.__name__}')
TypeError: the JSON object must be str, bytes or bytearray, not listFor testing:
- Kindly add Oracle test sequence in
tests/integration/test_sequences.yaml(similar to the Elasticsearch one at lines 37-42) - Integration tests can be run with:
pip install -r tests/integration/requirements.txtandpython -m tests.integration.main --sequence oracle
Let me know if you need any additional details. Thanks for your work on this integration!
Summary
Replace Milvus with Oracle AI Database 26ai as the default vector store for the NVIDIA RAG Blueprint. This provides CPU-optimized IVF indexes with optional hybrid search support.
Changes
OracleVDBclass implementingVDBRagIngestinterfaceoracle_queries.pywith DDL and SQL query helpersvdb/__init__.py(Milvus remains as fallback)oracledbdependency topyproject.tomldeploy/compose/.envoracle-26aiDocker service profile tovectordb.yamldocs/migration-oracle-26ai.mdKey Features
Configuration
Testing
pip install nvidia_rag[oracle]docker compose -f deploy/compose/docker-compose-rag-server.yaml up -d --buildcurl http://localhost:8081/v1/health?check_dependencies=true