[LangChain] Make usage of text_key more obvious

XMLWordPrintableJSON

    • Python Drivers
    • Not Needed
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      As reported in https://github.com/langchain-ai/langchain-mongodb/issues/211, it can be easy to miss that the results are filtered by default by text_key. I think there are two things we could do while maintaining backwards compat:

      • Add text_key to the example as suggested by evgeniishch
      • Warn if no documents match the key, with the current value of text_key in the warning.

      Definition of done

      Address the usability of text_key

      Pitfalls

      Make sure that existing tests pass to preserve backwards compatibility.

            Assignee:
            Steve Silvester
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: