Langchain: Improve accuracy for text-to-mql by leveraging better schema sampling

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: AI/ML, LangChain
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      The text-to-mql feature in LangChain uses naive sampling for generating the user schema for their collections. This schema is part of the prompt prepared for the LLM that generated the MQL from the user's natural language.
      We want to integrate improved schema sampling to better account for the variability in the user's schema, which is typical in MongoDB. 

      Ideally, this should be available in a library that can be leveraged in various AI frameworks with this functionality. Currently, it is langchain, shortly, we will have CrewAI and MCP.

              Assignee:
              Unassigned
              Reporter:
              Prakul Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: