feat(langchain-db2): Beta support for Vector Indexes on a Vector Store #146
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.
📝 Description
Related Issue:
💡 Summary of Changes
✅ PR Checklist
PR Title Format:
{TYPE}({SCOPE}): {DESCRIPTION}{TYPE}values:feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert,release{SCOPE}values (optional):langchain-ibm,langchain-db2PR Description: The Description section clearly lists what was changed, why, and how it was tested.
** Implemented end‑to‑end creation and setup of Db2 vector (DiskANN) indexes in
libs/langchain-db2/langchain_db2/db2vs.py.** Create vector index driven by create_index which calls _create_diskann_index. This creates 32K pagesize tablespaces and bufferpools to contain the index (largest pages required to fit 768 dimension float vectors). It then creates or recreates the vector index on the specified vector store. There's a bit more to it than that, but this is the high level summary.
libs/langchain-db2/docs/db2.ipynb.The purpose of this change is to provide an interface to create a vector index using Db2 LUW's vector index solution which is currently in Early Access. Ongoing development will take place in the
db2_vector_indexbranch. Once the feature has been made GA, this work will be merged into main.Testing was primarily achieved by running the Jupyter notebook and validating that the Db2 LUW server behaves as expected. More testing i.e. unit testing should be delivered before merging this into main.
Run the following commands from the root of the modified package(s):
make format make lint make testSee the contribution guidelines for more details.
🧪 Testing (optional)
Testing was primarily achieved by running the Jupyter notebook and validating that the Db2 LUW server behaves as expected. More testing i.e. unit testing should be delivered before merging this into main.
I ran
make formatandmake lintand both report the follow error on changes that existed prior to this PR:🗒️ Notes (optional)
Thank you again for helping improve LangChain-IBM! 🚀
Your contribution makes the project better for everyone.