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

Community: Azure CosmosDB No Sql Vector Store: Full Text and Hybrid Search Support #28716

Merged
merged 31 commits into from
Dec 15, 2024

Conversation

aayush3011
Copy link
Contributor

@aayush3011 aayush3011 commented Dec 13, 2024

Thank you for contributing to LangChain!

  • Added full text and hybrid search support for Azure CosmosDB NoSql Vector Store

  • Added a new enum called CosmosDBQueryType which supports the following values:

    • VECTOR = "vector"
    • FULL_TEXT_SEARCH = "full_text_search"
    • FULL_TEXT_RANK = "full_text_rank"
    • HYBRID = "hybrid"
  • User now needs to provide this query_type to the similarity_search method for the vectorStore to make the correct query api call.

  • Added a couple of work arounds as for the FULL_TEXT_RANK and HYBRID query functions we don't support parameterized queries right now. I have added TODO's in place, and will remove these work arounds by end of January.

  • Added necessary test cases and updated the

  • Add tests and docs: If you're adding a new integration, please include

    1. a test for the integration, preferably unit tests that do not rely on network access,
    2. an example notebook showing its use. It lives in docs/docs/integrations directory.
  • Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:

  • Make sure optional dependencies are imported within a function.
  • Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
  • Most PRs should not touch more than one package.
  • Changes should be backwards compatible.
  • If you are adding something to community, do not re-import it in langchain.

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.

Copy link

vercel bot commented Dec 13, 2024

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 Dec 15, 2024 8:54pm

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. community Related to langchain-community Ɑ: vector store Related to vector store module labels Dec 13, 2024
@efriis
Copy link
Member

efriis commented Dec 14, 2024

could you check the ci failures?

Also, if you're interested in maintaining this integration without us in the loop, we'd love to get an integration package out! Future PRs against langchain would just be {docs updates, as well as registering your package in libs/packages.yml, deprecating this community integration in favor of your integration package}

Here's the guide, and if you have questions, feel free to leave them in the comments on those pages so others can see them! https://python.langchain.com/docs/contributing/how_to/integrations/

would probably live out of https://github.com/langchain-ai/langchain-azure repo

@aayush3011
Copy link
Contributor Author

@efriis, we are already working with you guys on porting all the azure integrations to the above repo you mentioned. Once everything is ported we would maintain the langchain-azure repo.

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 15, 2024
@efriis efriis merged commit d417e4b into langchain-ai:master Dec 15, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community lgtm PR looks good. Use to confirm that a PR is ready for merging. size:XL This PR changes 500-999 lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants