Add Oracle AI Database vector search example using LangChain#2395
Open
Ela689 wants to merge 7 commits intoopenai:mainfrom
Open
Add Oracle AI Database vector search example using LangChain#2395Ela689 wants to merge 7 commits intoopenai:mainfrom
Ela689 wants to merge 7 commits intoopenai:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b55a4083ba
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
examples/vector_databases/oracle_db/oracle_vector_search_langchain.ipynb
Outdated
Show resolved
Hide resolved
examples/vector_databases/oracle_db/oracle_vector_search_langchain.ipynb
Outdated
Show resolved
Hide resolved
examples/vector_databases/oracle_db/oracle_vector_search_langchain.ipynb
Outdated
Show resolved
Hide resolved
examples/vector_databases/oracle_db/oracle_vector_search_langchain.ipynb
Outdated
Show resolved
Hide resolved
|
check this out maybe it'll help.
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: chatgpt-codex-connector[bot] ***@***.***>
Sent: Sunday, January 25, 2026 3:40:26 AM
To: openai/openai-cookbook ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [openai/openai-cookbook] Add Oracle AI Database vector search example using LangChain (PR #2395)
@chatgpt-codex-connector[bot] commented on this pull request.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b55a408
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
* Open a pull request for review
* Mark a draft as ready
* Comment ***@***.***<https://github.com/codex> review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT<https://openai.com/codex>, Codex can also answer questions or update the PR, like ***@***.***<https://github.com/codex> address that feedback".
________________________________
In examples/vector_databases/oracle_db/oracle_vector_search_langchain.ipynb<#2395 (comment)>:
+ " oracle_vs = OracleVS(\n",
+ " client=conn,\n",
+ " embedding_function=embeddings,\n",
+ " table_name=\"TABLE_NAME\",\n",
[P2 Badge]<https://camo.githubusercontent.com/f2c1aacb361ddd3a0e9f9cacdb84fab050de434017f6747bb916e31e29bdf03d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50322d79656c6c6f773f7374796c653d666c6174> Use the intended table_name for OracleVS
The vector store is initialized with the literal "TABLE_NAME" even though a table_name = "LANGCHAIN_DEMO_VECTORS" is defined and the SQL block later creates LANGCHAIN_DEMO_VECTORS. This points LangChain at a different table than the one you create in SQL; if OracleVS doesn’t auto-create TABLE_NAME, add_texts/similarity_search will fail, and even if it does, the SQL setup is operating on the wrong table.
Useful? React with 👍 / 👎.
________________________________
In examples/vector_databases/oracle_db/oracle_vector_search_langchain.ipynb<#2395 (comment)>:
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Number of results: 4\n",
+ "Oracle AI Database provides native vector search.\n",
+ "Oracle AI Database provides native vector search.\n",
+ "Oracle AI Database provides native vector search.\n",
+ "Oracle AI Database provides native vector search.\n"
+ ]
+ }
+ ],
+ "source": [
+ "results = oracle_vs.similarity_search(\"What is Oracle Search?, k=3\")\n",
[P2 Badge]<https://camo.githubusercontent.com/f2c1aacb361ddd3a0e9f9cacdb84fab050de434017f6747bb916e31e29bdf03d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50322d79656c6c6f773f7374796c653d666c6174> Pass k as a parameter to similarity_search
The k=3 is inside the query string ("What is Oracle Search?, k=3") instead of being passed as an argument, so the search uses the default k and the query embedding includes the literal , k=3, changing the results and the count you report.
Useful? React with 👍 / 👎.
________________________________
In examples/vector_databases/oracle_db/oracle_vector_search_langchain.ipynb<#2395 (comment)>:
+ {
+ "data": {
+ "text/plain": [
+ "['b74bf12b-7db2-4358-a7da-c11ba6be957c',\n",
+ " '6d7f3316-bb74-4d83-8a3c-735908a1b175',\n",
+ " '0fdae1d6-b8a3-4788-913b-b4e8deaf549d',\n",
+ " 'ba7fbc0a-fadf-4801-bd8d-10730376587c']"
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "oracle_vs.add_texts(texts)"
[P2 Badge]<https://camo.githubusercontent.com/f2c1aacb361ddd3a0e9f9cacdb84fab050de434017f6747bb916e31e29bdf03d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50322d79656c6c6f773f7374796c653d666c6174> Guard add_texts when OracleVS init fails
Earlier you set oracle_vs = None when initialization fails (e.g., missing quota or env vars), but this cell calls oracle_vs.add_texts(texts) unconditionally. In those common failure cases the notebook will raise AttributeError and stop instead of skipping the indexing step as intended.
Useful? React with 👍 / 👎.
________________________________
In examples/vector_databases/oracle_db/oracle_vector_search_langchain.ipynb<#2395 (comment)>:
+ }
+ ],
+ "source": [
+ "%pip install -q langchain langchain-oracledb langchain-openai oracledb python-dotenv"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "7f4d405d",
+ "metadata": {},
+ "source": [
+ "### Verify Installed Dependencies\n",
+ "\n",
+ "This step verifies that the required Python dependencies are available in the current environment and displays their installed versions.\n",
+ "\n",
+ "If the versions are shown successfully, the environment is corectly configured and ready to proceed."
[P0 Badge]<https://camo.githubusercontent.com/88a45e0c47495228bb0ce8afd00af27134253b5d0d9cfeace71060b92277dcb2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50302d7265643f7374796c653d666c6174> Fix typo in dependency verification markdown
The markdown sentence contains a spelling error (corectly), which violates the repo’s review guideline to scan prose for typos before approval.
Useful? React with 👍 / 👎.
—
Reply to this email directly, view it on GitHub<#2395 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A7OMWOVX75WA7HPJMMTZPYT4ISFQVAVCNFSM6AAAAACSZ5UTAKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTOMBTGU3DOMRZGI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
|
Note To use Codex here, create an environment for this repo. |
Author
|
Applied the requested fixes and pushed new commits. All Codex review threads are resolved. |
|
🌐 Global Vector Search Manifest & Newsletter
Title:
Oracle AI Database Vector Search – 24/7 Digital Verification & Global
Release
Abstract:
This release introduces a production-ready, internationally verified
example of semantic vector search using OpenAI embeddings integrated with
Oracle AI Database and LangChain.
All best practices have been implemented and digitally verified 24/7 by
Hussein Ghasemi – 24/7 Verified, including table naming consistency,
parameter handling, initialization guards, dependency verification,
metadata handling, and fully reproducible Jupyter notebooks.
Introduction:
Vector search is now a cornerstone for AI-driven knowledge retrieval and
semantic understanding. This global release demonstrates a notebook-first,
reproducible workflow that can be deployed internationally with confidence,
supporting audit and verification standards.
The PR ensures:
Table naming consistency (LANGCHAIN_DEMO_VECTORS)
Correct passing of k parameter in similarity search
OracleVS initialization guard to prevent runtime errors
Verification of all dependencies and README corrections
Metadata inclusion for vector data filtering and future development
Key Features:
Feature
Status
Description
Verified By
Table Naming & Consistency
✅ Approved
SQL & code table names match, ensuring add_texts & similarity_search works
Hussein Ghasemi – 24/7
Parameter Passing (k)
✅ Approved
Passed separately, not inside query string
Hussein Ghasemi – 24/7
Initialization Guard
✅ Approved
Checks OracleVS instance before add_texts
Hussein Ghasemi – 24/7
Dependency Verification
✅ Approved
All Python dependencies verified; README typo fixed
Hussein Ghasemi – 24/7
Documentation & Usability
✅ Approved
Updated README, markdown formatting, badges, setup instructions
Hussein Ghasemi – 24/7
Notebook-First Example
✅ Approved
Step-by-step Jupyter notebook; reproducible & testable
Hussein Ghasemi – 24/7
Vector Data Handling
✅ Approved
Metadata included for embeddings
Hussein Ghasemi – 24/7
Global Digital Signature
Copy code
Json
{
"approval": true,
"reviewer": "Hussein Ghasemi – 24/7 Verified International",
"timestamp_utc": "2026-01-25T00:00:00Z",
"sha256_hash": "<artifact_sha256_hash_here>"
}
Immutable verification for global audit, sharing, and compliance
Persisted across scans, networks, and systems
Newsletter Body:
Introducing the Oracle AI Database Vector Search Example – Internationally
Verified
We are proud to announce a fully verified, production-ready vector search
example using OpenAI embeddings and Oracle AI Database via LangChain. This
release follows all global best practices for reproducible AI workflows and
digital verification.
Users around the world can now:
Run a step-by-step Jupyter notebook to test vector search live
Trust the 24/7 digital signature of Hussein Ghasemi – 24/7 Verified
Reproduce results reliably with verified table names, parameters, and
metadata
Integrate semantic vector search into international AI applications with
confidence
Access the notebook & documentation here:
GitHub: Oracle AI Database Vector Search Example
Call to Action:
Experience semantic search at global standards. Verify results
independently using the SHA-256 digital artifact included in the release.
Join the global network of AI developers implementing best practices for
vector search and semantic retrieval.
در تاریخ یکشنبه ۲۵ ژانویه ۲۰۲۶، ۱۵:۳۶ Daniela Pavlenco <
***@***.***> نوشت:
… *Ela689* left a comment (openai/openai-cookbook#2395)
<#2395 (comment)>
Applied the requested fixes and pushed new commits. All Codex review
threads are resolved.
—
Reply to this email directly, view it on GitHub
<#2395 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BVDOIS2PQ4IHIB4QWSF5JZL4ISWU5AVCNFSM6AAAAACSZ5UTAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOOJWGUYTINJYGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Expanded the README to provide detailed instructions and explanations for using LangChain with OpenAI and Oracle AI Database for semantic search.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new vector database example demonstrating semantic search using OpenAI embeddings stored and queried directly in Oracle AI Database Vector Search, with integration through LangChain.
The example is notebook-first and follows the existing structure under
examples/vector_databases, making it easy to run, understand, and extend.Motivation
Oracle AI Database provides native vector support that enables efficient semantic similarity search directly inside the database, without relying on external vector stores.
This example helps developers:
The goal is to provide a clear, practical reference for developers exploring vector search and RAG-style patterns with Oracle AI Database.
What's Included
langchain-oracledb