Skip to content

Adding documentation for PGVectorStore #30950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

dishaprakash
Copy link

Thank you for contributing to LangChain!

  • Adding documentation for PGVectorStore:
    docs: Adding documentation for the new PGVectorStore as a part of langchain-postgres

  • Add docs: The notebook for PGVectorStore is now added to the directory docs/docs/integrations.
    As a part of this change, we've also updated the VectorStore features table and VectorStoreTabs

Copy link

vercel bot commented Apr 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2025 2:09pm

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Apr 21, 2025
@dosubot dosubot bot added Ɑ: vector store Related to vector store module 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels Apr 21, 2025
Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing a few errors in build.

One is straightforward: we require a standard set of headers in integrations pages:

ValueError: Document /home/runner/work/langchain/langchain/docs/docs/integrations/vectorstores/pgvectorstore.ipynb is missing headers:
- ## Setup
- ## Initialization
- ## Manage vector store
- ## Query vector store
- ## Usage for retrieval-augmented generation
- ## API reference

Separate from this, it's possible that we're not escaping a comparison operator correctly:

Error: MDX compilation failed for file "/vercel/path0/docs/docs/integrations/vectorstores/pgvectorstore.md"
Cause: Unexpected character `)` (U+0029) before name, expected a character that can start a name, such as a letter, `$`, or `_`
Details:
{
  "column": 27,
  "message": "Unexpected character `)` (U+0029) before name, expected a character that can start a name, such as a letter, `$`, or `_`",
  "line": 327,
  "name": "327:27",
  "place": {
    "line": 327,
    "column": 27,
    "offset": 10428,
    "_index": 0,
    "_bufferIndex": 12
  },
  "reason": "Unexpected character `)` (U+0029) before name, expected a character that can start a name, such as a letter, `$`, or `_`",
  "ruleId": "unexpected-character",
  "source": "micromark-extension-mdx-jsx",
  "url": "https://github.com/micromark/micromark-extension-mdx-jsx#unexpected-character-at-expected-expect"
}
error Command failed with exit code 1.

Found this if helpful.

@dishaprakash
Copy link
Author

@ccurme thanks for the help, escaping the comparison operator did the trick.
The PR is now ready for review.

Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be confusing to users to have PGVector and PGVectorStore side by side. When should they use one vs. the other? Are we going to deprecate PGVector? Should we remove it from the docs (adding redirects to the v0.2 docs)?

@dishaprakash
Copy link
Author

dishaprakash commented May 5, 2025

@ccurme
PGVectorStore is a 2.0 version of the langchain-postgres vectorstore, which is newly released and more information about it can be found in the readme here.
We will be deprecating PGVector, but we plan on supporting it for the time being so the users can migrate over to PGVectorStore.

We can update the docs to redirect to v2 once the support for PGVector will be stopped.
@averikitsch what would you suggest?

@averikitsch
Copy link
Contributor

We are working with Eugene to deprecate PGVector; however, there are a few additional features Eugene is requesting before the deprecation.
To reduce confusion, it might be good to list both of them and add a deprecated label or warning to PGVector, so developers coming to the docs from other examples have the full context. Ultimately, we should remove or redirect docs to PGVectorStore because it uses recommend Postgres practices for better production use and enterprise scaling.

@eyurtsev
Copy link
Collaborator

@averikitsch where there any remaining features that were not on parity with PGVector? I think you added db agnostic filtering already?

@eyurtsev eyurtsev self-assigned this May 15, 2025
@averikitsch
Copy link
Contributor

@averikitsch where there any remaining features that were not on parity with PGVector? I think you added db agnostic filtering already?

That is correct. We don't current support nested JSON metadata, but overall we have filtering support. There are no other missing features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder size:XL This PR changes 500-999 lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants