Skip to content

Conversation

nchandrappa
Copy link
Contributor

  • Description: The langchain-yugabytedb package implementations of core LangChain abstractions using YugabyteDB Distributed SQL Database.

YugabyteDB is a cloud-native distributed PostgreSQL-compatible database that combines strong consistency with ultra-resilience, seamless scalability, geo-distribution, and highly flexible data locality to deliver business-critical, transactional applications.

YugabyteDB combines the power of the pgvector PostgreSQL extension with an inherently distributed architecture. This future-proofed foundation helps you build GenAI applications using RAG retrieval that demands high-performance vector search.

  • tests and docs:

    1. langchain-yugabytedb github repo.
    2. YugabyteDB VectorStore example notebook showing its use. It lives in langchain/docs/docs/integrations/vectorstores/yugabytedb.ipynb directory.
    3. Running langchain-yugabytedb unit tests
  • Setting up a Development Environment

This document details how to set up a local development environment that will
allow you to contribute changes to the project.

Acquire sources and create virtualenv.

git clone https://github.com/yugabyte/langchain-yugabytedb
cd langchain-yugabytedb
uv venv --python=3.13
source .venv/bin/activate

Install package in editable mode.

uv pip install pipx  
pipx install poetry
poetry install
uv pip install pytest pytest_asyncio pytest-timeout langchain-core langchain_tests sqlalchemy psycopg psycopg-binary numpy pgvector

Start YugabyteDB RF-1 Universe.

docker run -d --name yugabyte_node01 --hostname yugabyte01 \
  -p 7000:7000 -p 9000:9000 -p 15433:15433 -p 5433:5433 -p 9042:9042 \
  yugabytedb/yugabyte:2.25.2.0-b359 bin/yugabyted start --background=false \
  --master_flags="allowed_preview_flags_csv=ysql_yb_enable_advisory_locks,ysql_yb_enable_advisory_locks=true" \
  --tserver_flags="allowed_preview_flags_csv=ysql_yb_enable_advisory_locks,ysql_yb_enable_advisory_locks=true"

docker exec -it yugabyte_node01 bin/ysqlsh -h yugabyte01 -c "CREATE extension vector;"

Invoke test cases.

pytest -vvv tests/unit_tests/yugabytedb_tests

Copy link

vercel bot commented Aug 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
langchain Ready Ready Preview Comment Aug 18, 2025 6:38pm

Copy link

codspeed-hq bot commented Aug 15, 2025

CodSpeed WallTime Performance Report

Merging #32571 will not alter performance

Comparing yugabyte:langchain-yugabytedb (80a9c64) with master (a6690eb)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched benchmarks

Copy link

codspeed-hq bot commented Aug 15, 2025

CodSpeed Instrumentation Performance Report

Merging #32571 will not alter performance

Comparing yugabyte:langchain-yugabytedb (80a9c64) with master (a6690eb)

Summary

✅ 14 untouched benchmarks

@mdrxy mdrxy added the integration Related to a provider partner package integration label Aug 15, 2025
@mdrxy mdrxy changed the title feat(yugabytedb): support for YugabyteDB Distributed SQL database as a VectorStore. docs: support for YugabyteDB Distributed SQL database Aug 15, 2025
@mdrxy
Copy link
Collaborator

mdrxy commented Aug 15, 2025

looks like some linting issues

@nchandrappa
Copy link
Contributor Author

@mdrxy I have updated the PR to fix the lint issues. Can you please review the PR. Thanks

@nchandrappa
Copy link
Contributor Author

@mdrxy Bumping this up. Can you please review the PR and let us know if anything else needs to be done for merging the PR?

@mdrxy mdrxy added documentation Improvements or additions to documentation INTERNAL-MAINTAINER-NOTE-move-to-new-repo FOR LANGCHAIN STAFF labels Sep 8, 2025
@mdrxy mdrxy self-assigned this Sep 8, 2025
@mdrxy mdrxy changed the title docs: support for YugabyteDB Distributed SQL database docs: add YugabyteDB Distributed SQL database Sep 11, 2025
@mdrxy
Copy link
Collaborator

mdrxy commented Sep 12, 2025

Hello! Thank you for your patience - we've been in the middle of a docs hiatus while we port things over to the new docs site.

I'll merge this, but I'd ask that you synchronize the changes to the new docs repo, as these changes will soon become invisible as we deprecate the current docs pages.

Please view the new contributing guide for further info. Don't hesitate to ask questions, as we've rewritten parts of it and may have missed something.

I've opened an issue in the new repo - when you make the new PR, make sure to include the words Fixes #528 so that the issue is automatically closed when the changes are merged in.

@mdrxy mdrxy merged commit e6b5ff2 into langchain-ai:master Sep 12, 2025
23 checks passed
rujeetjahagirdar pushed a commit to rujeetjahagirdar/langchain that referenced this pull request Sep 14, 2025
- **Description:** The `langchain-yugabytedb` package implementations of
core LangChain abstractions using `YugabyteDB` Distributed SQL Database.
  
YugabyteDB is a cloud-native distributed PostgreSQL-compatible database
that combines strong consistency with ultra-resilience, seamless
scalability, geo-distribution, and highly flexible data locality to
deliver business-critical, transactional applications.

[YugabyteDB](https://www.yugabyte.com/ai/) combines the power of the
`pgvector` PostgreSQL extension with an inherently distributed
architecture. This future-proofed foundation helps you build GenAI
applications using RAG retrieval that demands high-performance vector
search.

- [ ] **tests and docs**: 
1. `langchain-yugabytedb`
[github](https://github.com/yugabyte/langchain-yugabytedb) repo.
2. YugabyteDB VectorStore example notebook showing its use. It lives in
`langchain/docs/docs/integrations/vectorstores/yugabytedb.ipynb`
directory.
  3. Running `langchain-yugabytedb` unit tests 
  
- Setting up a Development Environment

This document details how to set up a local development environment that
will
allow you to contribute changes to the project.

Acquire sources and create virtualenv.
```shell
git clone https://github.com/yugabyte/langchain-yugabytedb
cd langchain-yugabytedb
uv venv --python=3.13
source .venv/bin/activate
```

Install package in editable mode.
```shell
uv pip install pipx  
pipx install poetry
poetry install
uv pip install pytest pytest_asyncio pytest-timeout langchain-core langchain_tests sqlalchemy psycopg psycopg-binary numpy pgvector
```

Start YugabyteDB RF-1 Universe.
```shell
docker run -d --name yugabyte_node01 --hostname yugabyte01 \
  -p 7000:7000 -p 9000:9000 -p 15433:15433 -p 5433:5433 -p 9042:9042 \
  yugabytedb/yugabyte:2.25.2.0-b359 bin/yugabyted start --background=false \
  --master_flags="allowed_preview_flags_csv=ysql_yb_enable_advisory_locks,ysql_yb_enable_advisory_locks=true" \
  --tserver_flags="allowed_preview_flags_csv=ysql_yb_enable_advisory_locks,ysql_yb_enable_advisory_locks=true"

docker exec -it yugabyte_node01 bin/ysqlsh -h yugabyte01 -c "CREATE extension vector;"
```

Invoke test cases.
```shell
pytest -vvv tests/unit_tests/yugabytedb_tests
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation integration Related to a provider partner package integration INTERNAL-MAINTAINER-NOTE-move-to-new-repo FOR LANGCHAIN STAFF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants