Skip to content
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

Standardize vector store docs #24800

Open
1 task done
isahers1 opened this issue Jul 30, 2024 · 0 comments
Open
1 task done

Standardize vector store docs #24800

isahers1 opened this issue Jul 30, 2024 · 0 comments
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder help wanted Good issue for contributors integration-docs Ɑ: vector store Related to vector store module

Comments

@isahers1
Copy link
Collaborator

isahers1 commented Jul 30, 2024

Privileged issue

  • I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

Issue Content

Issue

To make our vector store integrations as easy to use as possible we need to make sure the docs for them are thorough and standardized. There are two parts to this: updating the vector store docstrings and updating the actual integration docs.

This needs to be done for each VectorStore integration, ideally with one PR per VectorStore.

Related to broader issues #21983 and #22005.

Docstrings

Each VectorStore class docstring should have the sections shown in the Appendix below. The sections should have input and output code blocks when relevant.

To build a preview of the API docs for the package you're working on run (from root of repo):

make api_docs_clean; make api_docs_quick_preview API_PKG=openai

where API_PKG= should be the parent directory that houses the edited package (e.g. community, openai, anthropic, huggingface, together, mistralai, groq, fireworks, etc.). This should be quite fast for all the partner packages.

Doc pages

Each vector store docs page should follow this template.

You can use the langchain-cli to quickly get started with a new vectorstore integration docs page (run from root of repo):

poetry run pip install -e libs/cli
poetry run langchain-cli integration create-doc --name "foo-bar" --name-class FooBar --component-type VectorStore --destination-dir ./docs/docs/integrations/vectorstores/

where --name is the integration package name without the "langchain-" prefix and --name-class is the class name without the "VectorStore" prefix. This will create a template doc with some autopopulated fields at docs/docs/integrations/vectorstores/foo_bar.ipynb.

To build a preview of the docs you can run (from root):

make docs_clean
make docs_build
cd docs/build/output-new
yarn
yarn start

Appendix

Expected sections for the VectorStore class docstring.

    """__ModuleName__ vector store integration.

    Setup:
      ...

    Key init args - indexing params:
      ...

    Key init args - client params:
      ...

    See full list of supported init args and their descriptions in the params section.

    Instantiate:
      ...

    Add Documents:
      ...

    Update Documents:
      ...

    Delete Documents:
      ...

    Search:
      ...

    Search with score:
      ...

    Use as Retriever:
      ...

    """  # noqa: E501
@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 Jul 30, 2024
@baskaryan baskaryan added the help wanted Good issue for contributors label Jul 30, 2024
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 help wanted Good issue for contributors integration-docs Ɑ: vector store Related to vector store module
Projects
None yet
Development

No branches or pull requests

2 participants