Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4337

Langchain: Support hybrid search

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: AI/ML
    • None
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Provide support for combined keyword and semantic search using RRF.
      The hybrid search in Atlas is performed like this - https://www.mongodb.com/docs/atlas/atlas-vector-search/tutorials/reciprocal-rank-fusion/

      The request focused on implementing Hybrid search using the $unionWith operator as is given in the tutorial above.
      There is a dedicated hybrid search MQL stage that's under consideration, but not prioritized yet. That dedicated hybrid search MQL stage only makes the process of writing this complex query but does not introduce any new functionality. The hybrid search exposed in LangChain allows us to provide the necessary syntactic ease of use to the users, as they would only interact with high level abstraction of LangChain and not need to learn complex MQL syntax

      The Hybrid search retriever in LangChain shows up like this :
      https://python.langchain.com/docs/integrations/vectorstores/elasticsearch/#example-approx-with-hybrid
      https://python.langchain.com/docs/integrations/providers/pinecone/#pinecone-hybrid-search

       

       

            Assignee:
            casey.clements@mongodb.com Casey Clements
            Reporter:
            prakul.agarwal@mongodb.com Prakul Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: